zsty.us

Before / After · Case Study

OG Life — 17 brands finally recognize the same customer

  • Hemp / CBD
  • Painting & Trades
  • Aviation

A portfolio of 17 brand sites each kept its own sign-up form, its own chat box, and its own customer list — so a customer who liked two brands was treated as two strangers. One shared layer now handles sign-ups, preferences, and live chat for every brand: the customer opts in once, and every conversation lands in a single team inbox.

Don't make a returning customer opt in four times. Make every brand smarter on the first inbound.
🔒oglife.app
jackiej.events — modern site

At a glance

What this rebuild covers.

  • Customer notifications

    The moment a visitor sends a first chat message and nobody's watching, the on-call person's phone gets a push — inquiry to notification in under 30 seconds.

  • Agents

    If no one has joined a chat within 45 seconds, an AI drafts a contextual reply so the visitor is never left hanging — and inside the inbox an AI-suggest button drafts responses in the operator's own voice.

  • Design

    One scan-to-sign-up flow: a customer scans a brand's code, lands on a single opt-in page with 15 interest categories grouped into 5 buckets, and can later pause or drop any category from a personal preferences page.

  • App builds

    The shared inbox works like an ops app from a phone — conversations filtered by brand and status, a referral leaderboard per team member, and one-tap export of the numbers.

  • Security

    The team inbox is invite-only and signs people in with a one-time email link, so there are no passwords to steal or reuse.

  • Email

    Sign-in links and preference emails ride on mail infrastructure the business already owns, which let a paid email-service bill be dropped entirely.

The story

Problem · Insight · Build · Outcome.

  1. 01 · Problem

    A multi-brand operator's customer is one person but every brand sees a stranger.

    BMH, LGP, Buck Mountain, Fuel1st, palisades, the foundation — each brand owned its own opt-in form, its own chat widget, its own customer record. A returning customer who liked two brands ended up as two strangers in two databases.

  2. 02 · Insight

    Identity is a layer, not a vertical.

    One opt-in surface. One preferences page. One chat widget that knows who's on the other end across every brand. Brand storefronts stay independent; identity lives between them.

  3. 03 · Build

    Cloudflare Workers + Durable Objects + Neon + a 7KB widget.

    QR redirect handler on the Worker. Opt-in + preferences editor on Next.js 15. Inbox app on Next.js 15 with magic-link sign-in. Durable-Object-per-conversation chat at the edge. Embeddable widget any brand drops in as a script tag.

  4. 04 · Outcome

    One inbox, one identity, one preferences page — across every brand.

    Phase 1A + 1B shipped in ~two weeks. BMH storefront's old ChatWidget became a 70-line wrapper around the OgLife script. Every other brand follows the same pattern.

For the technically curiousHow it was done
  1. 01

    Where it started

    One operator, many brands — a hemp store, a painting brand, an aviation project, a foundation, and more across 17 domains. Each brand had grown its own opt-in form, its own chat widget, and its own customer records. A returning customer who liked two brands existed as two strangers in two databases, and every new brand repeated the same plumbing from scratch.

  2. 02

    The insight

    Identity is a layer, not a vertical. Instead of teaching every storefront to manage its own customers, one shared surface handles opt-in, preferences, and chat for all of them — the brand sites stay independent, and the identity layer sits between them and the customer.

  3. 03

    The build

    A scan-redirect handler resolves which brand issued a QR code, logs the scan with campaign and location context to a managed database, drops a 30-day cookie, and routes the visitor to the shared opt-in page — 15 categories in 5 buckets, with an email-link preferences editor for per-category pause or unsubscribe. Live chat runs at the network edge with isolated per-conversation state, every message archived to the same managed database, and any brand site adds the whole thing by dropping in a single lightweight script tag.

  4. 04

    The chat pipeline

    When a visitor sends a first message and no agent is online, the system fires a team-chat alert plus a push notification to the on-call operator's phone in under 30 seconds. If the conversation is still unanswered at 45 seconds, an AI model drafts a contextual autoreply. Inside the inbox, operators get brand-and-status filters, an AI-suggest button that drafts replies in their voice, and per-agent referral leaderboards with export.

  5. 05

    What runs now

    The first two phases shipped in about two weeks. The hemp storefront's old standalone chat widget collapsed into a 70-line wrapper around the shared one, and every other brand follows the same drop-in pattern. Along the way a paid email-sending subscription was retired in favor of mail infrastructure the operation already runs — same sign-in and preference emails, one less bill.

After

  • modern web framework
  • edge compute
  • stateful edge runtime
  • managed Postgres
  • push notifications
  • AI models
  • transactional email rails

What changed, with evidence

Design

QR → opt-in → preferences, in one flow

`oglife.app/r/{slug}` resolves an agent slug, logs scan + UTM + geo to Neon, drops a 30-day cookie, and 302s to a 15-category opt-in grouped into 5 buckets. Magic-link preferences editor lets the customer pause or unsubscribe per category.

Agent backbone

Durable-Object-per-conversation chat at the edge

`wss /ws` upgrades to a `ChatConversation` Durable Object — SQLite-backed, one DO per conversation_id, persists every message to Neon. Slack + Web Push fires on first visitor message when no agent is online. Claude Sonnet drafts an autoreply at 45s if still unanswered.

Real-time push

Cross-brand agent inbox with referral leaderboards

Allowlist agent admin, magic-link sign-in, conversations filtered by brand × status, AI-suggest button drafts replies in the operator's voice. Per-agent referral leaderboard + CSV export.

Retention

Removed Resend — saved a SaaS bill, used existing SMTP

Replacing Resend with SMTP via existing infra (AWS SES SMTP or Hetzner Stalwart) ships the same magic-link emails without a paid-plan upgrade.

While the owner sleeps.

Autonomous surfaces

The agent backbone keeps the brand earning after hours. The owner approves; the system runs.

  • Routes scans into the right brand pipeline

    real-time

    Worker resolves the agent slug, logs the scan, routes the opt-in to the brand that issued the QR.

  • Fires AI autoreply when no agent is online

    real-time

    Claude Sonnet drafts a contextual reply 45s after first visitor message if no agent has joined.

  • Pushes inbound visitors to the on-call operator

    real-time

    Web Push (VAPID) wakes the on-call operator's phone the moment a visitor sends the first message and no one's in the inbox.

← All rebuilds

OG Life — 17 brands finally recognize the same customer — zsty.us