Skip to main contentSkip to footer
    Back to Case Studies
    LONGEVITYBEVERLY HILLS
    E-CommerceWellnessNext.js 16

    Longevity Beverly Hills

    A members-only store for a physician-guided wellness brand in Beverly Hills. Visitors take a quiz, apply for membership, then order programs that a clinician must approve before any charge. Peptides are education pages with no checkout.

    33
    Programs and profiles in the catalog
    7
    Care categories, peptides included
    $0
    Charged before a clinician approves
    15
    Screens in the admin portal

    A quiz with no way out

    The Find My Program quiz has no site menu, no footer and no outside link on any screen. Each screen has its own address, so the browser Back button moves one screen back. A script searches the running site for an exit and must find none.

    Membership by application

    One membership opens the member store and The Longevity Circle community. A database index refuses a second open plan, and the database function that makes an order is the only path to a purchase.

    No charge before approval

    Checkout saves the payment method and charges nothing. A database trigger refuses a capture until the clinical case is approved, so a declined case leaves nothing to refund.

    Peptides behind a sale lock

    The six peptides are education pages with an interest list. Each has a sale lock that only an admin can open, with a written approval reference. Staff cannot delete, rename or move a locked product.

    No health data stored

    The store database holds no intake answers, history, doses or clinician notes. Quiz answers stay in the browser unless the visitor agrees to save them, and funnel events carry step names only.

    Admin, affiliates, community

    A 15-screen admin portal with clinical and billing simulators, an affiliate program with tracking links and a dashboard, and a community with free guest accounts for open events.

    The brief

    Longevity Beverly Hills is a physician-guided wellness brand in Beverly Hills. The client gave us a full developer brief: a premium store with large product images, animation, a quiz and a complete product journey, in the visual style of the brand's sister business. A visitor must apply and become a member before any purchase. Prescription programs need a clinical review, and some products, the peptides among them, must not be sold until their status is confirmed.

    Rules we built into the code

    • One membership: Membership by application opens the store and the community. The database refuses a second plan.
    • No charge before a clinician approves: The payment method is saved at checkout, and the charge happens only on approval.
    • No health data in the store: Clinical intake happens with the clinical partner. The store keeps a case reference and a status only.
    • Nothing invented is shown as real: No seeded reviews, clinicians, credentials or before and after images. Product images carry the note "Images are illustrative."

    How it works

    From the quiz to an approved order

    The quiz recommends a program category. The visitor then applies for membership, and the approval link that we send to the mailbox proves the email address. A member chooses a program and checks out, and the store saves the payment method. The order goes to clinical review through a driver for the clinical partner. Only an approved case lets the payment capture run, and a decline closes the order with nothing to refund.

    Payments and clinical review behind adapters

    The brief leaves the live payment processor open, so payments sit behind a driver. The preview uses a simulated driver, and the live stage refuses it at startup. The clinical handoff works the same way, with a simulated driver until the partner supplies its API. The reconcile job retries a charge with the same idempotency key when the result is unknown, and a refund request that times out stays open until the processor answers.

    Security in the database

    The browser has no database client. Pages read through server components and write through server actions, and row level security checks every table. Staff-only columns are not granted to public roles, and each admin action starts with a role check that the database checks again. Over 16 migrations, the sale lock, the one-membership rule and the approval rule live in Postgres, not only in page code.

    What we delivered

    Home, treatments, seven care categories, program pages, membership, The Longevity Circle, Our Standards, affiliate program and legal drafts
    Find My Program quiz with results, as a closed circuit with one address per screen
    Membership application, email proof by approval link, member store, bag and checkout
    Clinical review flow with approve, decline, more information and shipped states
    Admin portal (15 screens): catalog, orders, members, plans, billing, legal and consents
    Affiliate tracking links and dashboard, and guest accounts for open community events
    A set of 92 brand images, with prompts kept in the repository
    Test scripts for the database, member journey, routes, accessibility, keyboard use, phone layouts and copy rules

    Problems worth talking about

    A lock that staff cannot go around

    In a review, a staff session could delete and remake a product to escape its lock. We removed the wider grants: staff now change four things in the catalog and no others, and a locked product cannot be deleted.

    No answer is not a no

    A payment or refund that gets no answer is retried with the same key. Only a definite refusal from the processor closes it as failed, so a member is never charged twice or left without a refund.

    Back button without hijacking

    The quiz keeps visitors inside it, but it never blocks the Back button on the first screen. Google demotes pages that trap a visitor, so each screen is a real history entry instead.

    Images that match their products

    The first image run saved images under the wrong names. The runner now takes each image from its own generation job, and a check confirms that every product, price and image lines up.

    Where it stands

    What we can and cannot claim

    This is a preview build for the client's review, not a launched store. Offers, prices and availability are placeholders that need clinical and legal review, payments and the clinical handoff are simulated, and the site is not indexed. The catalog, category, screen and migration counts on this page come from the code. We make no claims about any treatment or product: peptide topics appear as research interests, not benefits. There is no traffic, conversion or revenue data yet, so this page gives none.

    What This Project Does Well

    33 programs and profiles in 7 care categories: weight management, longevity and wellness, peptides, men's sexual health, hair restoration, prescription skincare and women's hormonal health
    Every product shows the placeholder price of the brief and an image made from its own prompt; a check script confirms that products, prices and images line up
    Webhooks check the signature over the raw body and apply each event once; an event for an unknown payment changes nothing
    Five scheduled jobs (run jobs, sweep, payment reconcile, renewal notices, purge) are safe to run twice and take a lease before they start
    Marketing email goes out only with recorded consent, with an opt-out link and the one-click unsubscribe header
    Phone checks in a real browser: no page scrolls sideways at 320, 360 or 390 pixels, no text is cut at phone size, and every text on a photo stays readable

    Technologies Used

    Next.js 16.4 App Router with Cache Components, React 19.3, TypeScript, Tailwind CSS 4.3, Motion 14, GSAP 3 ScrollTrigger, Zod 4, Supabase (Auth and Postgres with row level security), Resend, Vercel with scheduled jobs, Higgsfield for the image set

    Ready to Build Something Similar?

    Let's discuss how we can help transform your business with a custom digital solution.