A local pharmacy, trusted online.
Independent community pharmacy · Stoke-on-Trent, UK
Longton Pharmacy is an independent, owner-run community pharmacy in Stoke-on-Trent. We built its online pharmacy from scratch: a shop for pharmacy and general sale medicines, six private online clinics, private prescriptions, and a staff portal where a pharmacist checks every order before a penny is taken.
Built with a modern, owned stack
- Next.js
- TypeScript
- React
- Expo
- Tailwind CSS
- Supabase
- Neon
- PostgreSQL
- Medusa
- Stripe
- Resend
- FastAPI
- Cloudinary
- Node.js
- Vercel
- Next.js
- TypeScript
- React
- Expo
- Tailwind CSS
- Supabase
- Neon
- PostgreSQL
- Medusa
- Stripe
- Resend
- FastAPI
- Cloudinary
- Node.js
- Vercel
The challenge
Selling medicines online is not like selling anything else. Every product has a legal class, every pharmacy medicine needs a pharmacist's check, prescription-only treatments need a proper consultation, and the data is health data. Longton needed a shop patients would trust and a regulator would recognise, without losing the people behind the counter.
- Client
- Longton Pharmacy, est. 2018
- Scope
- Shop, clinics, staff portal
- Build
- Custom, no platform fees
- Timeline
- January to November 2026
What we built
Two apps, one pharmacy.
A catalogue that knows the law
Every product carries its legal class (general sale, pharmacy or prescription-only), its form and its active ingredient, with variants for strength and pack size, each with its own price and stock. Prescription-only medicines are kept out of every promotion, and codeine and pseudoephedrine are limited to one pack per order.
Health questions before the basket
Pharmacy medicines open a short health questionnaire before they reach the basket. Answers are saved as their own record, not tucked into cart data, and anything that needs a second look raises a flag for the pharmacist. Flags never decide on their own: the pharmacist does.
Online clinics built from real PGDs
Six consultations, adapted line by line from the pharmacy's Patient Group Directions, cover conditions people would rather not discuss at a counter. Patients answer first and choose a treatment at the end, never before, exactly as the GPhC's online guidance expects. Only the age and sex eligibility question can stop a patient outright.
Payment only after a pharmacist says yes
When an order needs review, Stripe authorises the card but does not charge it. Approve, and the payment is captured. Reject, and the hold is released and the patient is told why. Cards, Apple Pay and Google Pay all work the same way, and general sale orders go straight through.
A staff portal for the whole pharmacy
One portal runs the day: the review queue, orders, prescriptions, messages, products, customers and settings. Pharmacists approve or reject with notes, export consultations as PDFs, and raise invoices, with live counts in the sidebar so nothing waits unseen.
Private prescriptions, kept private
Uploaded prescriptions go to private, encrypted storage with a key the pharmacy controls. The shop can only upload, staff open files through short-lived links, and every view of a patient's record is written to an access log that answers "who has seen my data?" in one query.
Secure messages with patients
A questionnaire is not always enough, so pharmacists can message a patient from any consultation, prescription or order. The patient replies from their account, the thread stays with their record, and the email alert never names the treatment.
Built to be found, within the rules
Structured data for the pharmacy, every product and every clinic, a sitemap that rebuilds hourly, and health guides linked from the categories they explain. Clinic pages talk about the condition and the consultation, never a named prescription drug, so the SEO stays on the right side of medicines advertising law.
Compliance
Built around the rules.
A pharmacy site answers to more regulators than most businesses have heard of. We mapped every rule before we drew a screen, then built each one into the system rather than a policy page.
A pharmacist checks every supply
Every pharmacy and prescription-only order waits in the review queue. Treatments are chosen after the consultation, not before.
No promoting prescription medicines
Prescription-only products are excluded from the homepage and promotions. Clinic pages are about the condition, not the drug.
Health data handled as health data
The database lives in London, patient files sit in encrypted EU storage, and a DPIA and record of processing come with the build.
Consultations that match the paperwork
Each form mirrors its signed PGD and stores the reference, the answers, the flags and the pharmacist's decision as a full supply record.
Limits on medicines that can be misused
One pack per order for codeine, dihydrocodeine and pseudoephedrine, with order history in front of the pharmacist.
Every view of a record is accountable
Mandatory two-factor sign-in for staff, separate staff and patient sessions, and an append-only log of who opened what.
From start to finish
How it all came together.
From learning how a community pharmacy really runs to a portal the superintendent pharmacist signs off on day one. Here is how we got there, and the order flow at the heart of it.
The Longton Pharmacy order flow
Discovery
We spent time with the pharmacy before writing a line of code: what sells over the counter, which conditions patients ask about quietly, how prescriptions arrive, and who checks what. The brief was simple to say and hard to build: take medicines online without cutting a single corner.
Rules first
Before any design, we mapped the GPhC's guidance for online pharmacies, the MHRA's rules on medicines advertising, UK GDPR for health data, and the PGDs themselves into one working checklist. Every screen that followed had to pass it.
Brand and design
We built a visual system around the pharmacy's existing cross and leaf: a Bottle Green and brass palette, warm cream surfaces, Bricolage Grotesque headings and a plain-spoken voice that sounds like a local pharmacist, not a call centre.
Build
Two Next.js apps, the storefront and the staff portal, share one Postgres database and a set of packages for orders, consultations, one-time codes, file storage and invoices. No commerce platform underneath, so nothing the pharmacy needs is out of reach.
Tracking with GA4, GTM and Search Console
We set up Google Tag Manager and GA4 so the pharmacy can see what works without ever sending health data. Nothing loads until a visitor accepts analytics cookies (Consent Mode v2, with ad storage always denied), every URL is cleaned before it reaches Google, and prescription items are reported only as "Prescription treatment". GA4 follows the full shop funnel from product view to purchase, with consultations, prescription uploads and enquiries as key events, and Google Search Console is linked in so search performance sits right next to the sales data.
Launch and governance
The superintendent pharmacist's first sign-in sets out everything that needs signing, in one guided flow: the DPIA, the breach procedure, the record of processing and each clinic's PGD. Staff get a guided tour of the portal, and we stay on to host, support and improve it.
The stack
The outcome
A pharmacy counter, open nationwide.
A shop, six online clinics and private prescriptions for patients across the UK, with the same pharmacist checking every order before the card is charged.
Longton Pharmacy now has an online pharmacy it owns outright, built around how a community pharmacy actually works. Patients can buy pharmacy medicines, start a private consultation or send a prescription from home, and the team runs every review, order and message from one portal, with the regulatory paperwork built in from the start rather than bolted on.
- Of pharmacy and clinic orders checked by a pharmacist before payment
- 100%
- Products across 13 categories, each with its legal class
- 68
- Online clinic consultations built from the pharmacy's PGDs
- 6
Further reading

