DEV3 Capsora – Pharmacy Delivery Laravel Script with Prescription Review, Rider App & Pharmacist App

Self-hosted pharmacy ordering and delivery on Laravel 12, Filament 4 and Flutter: salt search, prescription upload and pharmacist review, substitutes, age and ID checks, cold-chain orders, refills, batches, plus customer, rider and pharmacist apps.

by DEV3 TechnologiesVerified Author(0) 0 sales 1 viewsUpdated 04 Nov 2026

Video tour. Pick a section below to browse 120 screenshots in 40 sections.

Capsora is a pharmacy ordering and delivery platform you host yourself, built by DEV3 Technologies on Laravel 12 and Filament 4, with three Flutter apps for customers, riders and pharmacists. A customer searches for a medicine by name, salt or condition, uploads a prescription when one is needed, and follows the order to the door. A pharmacist checks every prescription before anything is dispensed, and a rider hands the parcel over against a code. The whole chain is in one codebase: a public website, an admin panel, a pharmacist panel, a customer account and the three apps.

No live demo: the 120 grouped screenshots and the video tours above show every screen, from the landing page to the pharmacist's annotation tools. Install it with the bundled demo data (a fictional city, "Lumen Bay", with invented brands) to try every role on your own server.

What the platform does

  • Search by medicine, salt or condition. Results for one salt are sorted cheapest first with the saving shown on each pack. A medicine page lists its composition, a generic label-style text, storage notes, Rx and cold-chain badges and same-salt substitutes.
  • Prescription upload and review. The customer photographs a prescription, picks the family member it belongs to and adds a note. It enters a queue with an SLA timer. The pharmacist marks up the image, enters the doctor and the medicine lines, and approves, rejects with a reason, or asks for clarification. Every step is written to an audit trail.
  • Prescriptions only unlock what they cover. An approved prescription opens the same medicine, or the same salt and strength, for the same patient. An order with no verified prescription waits in Awaiting Rx and cannot be dispensed.
  • Age and ID checks. Restricted items need a date of birth that meets the minimum age, and a typed date cannot override the one on the patient's profile. At the door the rider records the last four digits of an ID and confirms it matches before the delivery code completes the drop.
  • Substitutions. The pharmacist can propose a same-salt substitute; the customer approves or declines it before dispensing. The customer pays the lower of the two prices.
  • Partial fulfilment and refunds. Short lines are marked clearly. The shortfall goes back to the wallet, or comes off the amount due on cash-on-delivery orders.
  • Refills and reminders. Refill subscriptions and a medicine schedule with reminder times, kept per family member.
  • Cold chain. Medicines can be flagged cold-chain. Those orders add a cold-chain fee and are offered only to riders who carry a cold box.
  • Batches and stock. Stock per branch with reorder levels and bins, batch numbers with manufacture and expiry dates, earliest-expiry-first suggestions when picking, write-off for expired batches and a stock ledger.
  • Pharmacies and branches. Licence numbers and expiry dates, KYC documents with verify and reject actions, branch coverage, cold storage and the pharmacist in charge.
  • Dispatch. Riders go online, accept offers, navigate a route on a stylised map and earn per delivery. The admin sees a live map and a 3D dispatch widget.
  • Money. Card, cash on delivery and wallet payments. Amounts are integer cents. The wallet is a ledger with top-ups, payments and refunds. Unpaid card orders expire after 30 minutes, releasing stock and the coupon.

Three panels, three apps

  • Admin (/admin): dashboard with KPIs, a verification funnel and a live 3D dispatch city; orders with per-line dispensing; a live map; riders; returns; the prescription register; the medicine catalogue; stock and batches; pharmacies and branches; customers; coupons and banners; reports with CSV export; roles, audit log and settings.
  • Pharmacist (/pharmacist): desk, verification queue, verify screen with annotation, dispensing with batch picking, printable PDF labels and branch stock.
  • Customer account (/account): orders, prescriptions, family profiles, addresses, refills, reminders and the wallet.
  • Customer app: onboarding with a 3D capsule, search, medicine detail, prescription upload and status timeline, cart, checkout, live tracking, refills, medicine schedule with local notifications, wallet and family profiles.
  • Rider app: online toggle, job offers with cold-chain badge, navigation, code and ID drop, earnings and history.
  • Pharmacist app: queue with SLA chips, prescription detail with annotation, and approve, reject and clarify actions.

Built to be extended

A REST API under /api/v1 uses Sanctum tokens scoped per app, so a customer token cannot reach pharmacist routes. An interactive reference sits at /api/docs and an OpenAPI file at /api/v1/openapi.json. The web installer at /install checks the server, writes the configuration, creates the admin account and loads demo or empty data. The interface ships in English with a right-to-left Arabic layout on the website and in the apps.

Quality checks

Capsora 1.0.0 passed the seven release gates of the DEV3 Laravel suite: static analysis (Larastan level 6, 0 errors), 146 Pest tests with 1218 assertions, a front-end budget (14.4 KB of JS and 28.0 KB of CSS gzipped on the public pages), migration and seeding on MySQL 8 and SQLite, a headless-browser pass over 57 pages, an installer test from the packaged zip and a secret scan. The Flutter apps pass their analysis, tests and a debug Android build: customer 35, rider 19 and pharmacist 14 tests.

Good to know

  • Not a licensed pharmacy. This is software with a fictional demo catalogue. Running a real pharmacy needs the licences, qualified pharmacists and legal review your country requires. The schedule classes (OTC, Rx, restricted, controlled) are generic and do not map to any country's law. Replace the demo catalogue and the disclaimer with your own, and review data-protection duties for health data such as uploaded prescriptions.
  • Payments, SMS and push were not tested with live accounts. Stripe, PayPal and Razorpay drivers, Twilio and Vonage SMS drivers and FCM and APNs push drivers are included, but nothing was run against a real account. The simulated gateway is the default, with SMS and push simulated or logged.
  • The customer app does not open a real gateway's checkout page yet. A real gateway returns a checkout_url and the app does not open it. Card payment in the app works with the simulated gateway; with a real one you must add that step. Website checkout uses a redirect.
  • Not tested on physical devices. The apps were checked with analysis, unit and widget tests, parsers run against recorded server responses, not on phones. They were not driven through their screens against the live server.
  • Android build. Debug APKs build for all three apps in the final check run. They are debug builds only: build your own signed release and test it on your devices.
  • Partial refunds are narrower than full ones. A shortfall refund covers the goods net of discount, but not the tax on OTC lines that were missing, nor the delivery fee. Only a full cancellation refunds those.
  • Apps start in demo mode. Each app runs offline with a built-in mock API. For your server, set the API address in the app and build with CAPSORA_DEMO=false. Change the application IDs and replace the simulated push, biometric and payment drivers before publishing to a store.
  • Folder and file names. The documentation and START-HERE file inside the download still call the application folder medrop in places. The folder in the zip is capsora.
  • No hosted demo. The listing shows screenshots and video tours instead.

How it's built

Architecture, stack, key decisions and the quality gates DEV3 Capsora passed before release.

The engineering behind Capsora: Laravel 12 and Filament 4 on a shared core, prescriptions that unlock only what they cover, signed prescription images, scoped app tokens, payment-first order state and three Flutter apps on one API.

The problem it solves

A pharmacy order is not a shopping cart. Some lines cannot be sold without a prescription, and that prescription belongs to one patient and covers specific medicines. Restricted items need an age check before payment and an ID check at the door. Stock has batches and expiry dates, some medicines must travel cold, and the pharmacist may be unable to supply a line or may propose a same-salt substitute at a different price. Money has to stay correct through all of it: a card payment, a shortfall refund and a cash-on-delivery order that collects less at the door. Three kinds of user work from three different apps, and a customer's login must never be able to approve a prescription.

Architecture and approach

Capsora is a Laravel 12 application with three Filament 4 panels on one user table: /admin, /pharmacist and /account. The public website is Blade with a small amount of vanilla JavaScript and a lazy-loaded three.js scene. Three Flutter apps share one package and talk to /api/v1.

Prescriptions that cover only what they cover

  • Coverage rule. Prescription::covers accepts the same medicine, or the same salt set and strength, for the same patient. OrderService::place applies it, so an approved prescription for one drug cannot unlock another.
  • Date of birth. A typed date of birth cannot override the one on the patient profile, so an adult date on a child's profile is refused.
  • Audit trail. Claim, annotation, clarification, re-upload, approval, rejection and expiry each write a prescription_events row.
  • Signed images. Prescription::imageUrl() returns a signed link so app image loaders and panels can fetch it, while unsigned access is limited to the owner and staff.

Scoped tokens

App tokens are issued with empty ability lists plus a per-app ability. The framework default of a wildcard ability would satisfy every ability: check, so a customer token could have approved prescriptions. A test now issues a real token and checks this, and the pharmacist controller also requires the prescription.verify permission.

Payment before dispensing

  • All card money goes through the configured gateway, for orders and wallet top-ups alike, and is applied only on a PaymentSucceeded event.
  • Unpaid card orders cannot be dispensed and expire after 30 minutes through capsora:expire-unpaid, which releases stock and the coupon. A decline cancels at once.
  • Money is integer cents. The wallet is a ledger of customer, rider-earnings and platform accounts.

Substitutes and shortfalls

A substitute needs the customer's approval, and the customer pays the lower of the two prices. A shortfall refund is proportional to the coupon discount; cash-on-delivery orders collect less at the door instead.

Dispatch

Orders flow from placed through awaiting prescription, verified, packing, ready and dispatched to delivered. The nearest online rider is offered the job, and cold-chain orders go only to riders with a cold box. Delivery needs the customer's four-digit code, plus the last four digits of an ID for restricted orders.

Three apps, one API

The customer, rider and pharmacist apps run offline in demo mode against an in-app mock that follows the same JSON shapes as the backend, and switch to the real API with a build flag. Parsers are tested against recorded server responses.

Quality gates and results

Capsora 1.0.0 passed the seven release gates of the DEV3 Laravel suite on the packaged build:

  • Static analysis: Composer validation, Pint clean, Larastan level 6 with 0 errors and a syntax check of 369 PHP files.
  • Tests: 146 Pest tests with 1218 assertions, including money-path tests for checkout totals, wallet payment, partial fulfilment, substitution price difference, returns, rider earnings and cash on delivery. The Flutter apps add 35 (customer), 19 (rider) and 14 (pharmacist) tests.
  • Front-end budget: 14.4 KB of JavaScript and 28.0 KB of CSS gzipped on the public pages, with the 3D scene loaded lazily.
  • Database: migrate and seed on MySQL 8 and SQLite.
  • Browser pass: 57 pages checked in a headless browser.
  • Installer and secrets: the installer wizard run from the packaged zip, and a clean secret scan.

Limits: payment, SMS and push drivers were not run against live accounts, the apps were not tested on physical devices or driven through their screens against a live server, and the customer app does not yet open a real gateway's checkout page.

Tech stack

Area Technologies
Backend Laravel 12, Filament 4 panels per role, Livewire 3, Sanctum per-app tokens, Scheduler and queue, PDF dispensing labels
Pharmacy domain Prescription coverage rule, Audit trail events, Batch and expiry stock, Substitution flow, Refill scheduler, Age and ID checks
Mobile Flutter customer app, Flutter rider app, Flutter pharmacist app, Shared Flutter core package, Offline demo mode
Frontend Blade, Tailwind CSS 4, Vite, three.js lazy scene, Arabic right-to-left
Data and money MySQL 8, SQLite, Integer cents, Wallet ledger, Deterministic demo seeder
Integrations Stripe, PayPal, Razorpay drivers, Twilio and Vonage SMS drivers, FCM and APNs push drivers, OpenAPI reference

Inside the build

Signature hero: A glossy capsule and pill bottle float over a stylised city map with a glowing courier route. Signature hero — A glossy capsule and pill bottle float over a stylised city map with a glowing courier route.

Scroll story: The camera follows a prescription as it scans and slips into the capsule. Scroll story — The camera follows a prescription as it scans and slips into the capsule.

Guides & articles

Practical guides and engineering write-ups for DEV3 Capsora.

Pharmacy delivery script: following a prescription from upload to the door

Last updated
Pharmacy delivery script: following a prescription from upload to the door: DEV3 Capsora

Most pharmacy delivery scripts are a shop with a "prescription" checkbox. The checkbox is the easy part. The hard part is everything after it: who looks at the prescription, what it actually lets the customer buy, what happens when a pharmacy cannot supply a line, and who checks an ID at the door. This guide follows one order through DEV3 Capsora, a self-hosted pharmacy delivery script on Laravel 12, Filament 4 and Flutter, and lists what to test at each stop in any script you evaluate.

The Capsora landing page: a glossy capsule and pill bottle float over a stylised city map with a glowing courier route

Stop 1: finding the medicine

A customer rarely knows a brand. They know a condition, or the salt on an old strip. Capsora searches by medicine name, salt or condition, and a salt search lists same-salt packs cheapest first with the saving on each card. Medicine pages show composition, a generic label-style text, storage notes, and badges for prescription-only and cold-chain items.

Test: search for a salt, not a brand. Does the script find alternatives, and does it show the saving?

Salt search results sorted cheapest first with the saving shown on each pack

Stop 2: the prescription

The customer uploads a photo, chooses which family member it is for, and adds a note. The upload joins a queue with a timer. The customer sees a status timeline rather than a silent wait, and if the pharmacist cannot read something they send a question back and the customer re-uploads.

Test: what does the customer see while waiting, and what happens when the image is unclear?

The customer's prescription status timeline

Stop 3: the pharmacist's desk

The pharmacist panel opens on a queue ordered oldest first, with SLA timers and each patient's age and allergies. The verify screen shows the image with a drawing layer for boxes labelled "doctor signature", "drug 1" or "illegible", the doctor's registration number, the issue date and the matched medicine lines. Approve, reject with a reason, or ask for clarification. Each action is a row in an audit trail that cannot be edited from the screen.

The pharmacist verify screen with the prescription marked up and the medicine lines to confirm

Test: is there a record of who approved what and when? And does an approval cover only the patient and medicines on the prescription? In Capsora an approved prescription unlocks the same medicine, or the same salt and strength, for the same patient, and nothing else.

Stop 4: substitutes and short lines

At dispensing the pharmacist picks batches (earliest expiry suggested), records partial quantities, or proposes a same-salt substitute. The customer approves or declines it, and pays the lower of the two prices. If a line is short, the difference returns to the wallet, or comes off the cash due at the door.

Test: can the customer refuse a substitute? Who pays the price difference?

Stop 5: age, ID and cold chain

Restricted items need a date of birth that meets the minimum age, and a typed date cannot override the one on the patient's profile. Cold-chain orders add a fee and are offered only to riders who carry a cold box. At the door, the rider enters the customer's four-digit code, and for restricted orders also the last four digits of an ID and a confirmation that it matches. Only those four digits are stored.

Test: where is the age rule enforced, at checkout or only on the product page?

Stop 6: after delivery

Customers can set refill subscriptions and a medicine schedule with reminder times, per family member. A scheduled job creates refill orders and expires old prescriptions. The admin side covers returns, stock per branch, batch expiry with write-off, pharmacy licences and KYC documents, and reports.

Video tour of Capsora

What else to compare

  • Apps: three Flutter apps (customer, rider, pharmacist) that run offline in demo mode and switch to your server with a build flag. Each has its own Arabic right-to-left layout and dark theme.
  • Tokens: API tokens are scoped to one app, and a test checks that a customer token cannot reach pharmacist routes.
  • Quality: 146 Pest tests with 1218 assertions, Larastan level 6 with no errors, and Flutter tests of 35, 19 and 14 for the customer, rider and pharmacist apps.
  • Limits: payment, SMS and push drivers were not run with live accounts, the apps were not tested on physical devices, and the customer app does not yet open a real gateway's checkout page. It is software, not a licence: running a pharmacy needs the permits and qualified staff your country requires.

Instead of a live demo, the listing has 120 grouped screenshots and video tours, and the "How it's built" section explains the design in more detail.

Frequently asked questions

The complete source code (version 1.0.0) as a download from your account, with the setup and usage guides shown on this page. You can modify the code to suit your product.

Buying guides: Laravel scripts with Filament panels and a web installer · Next.js or Laravel for a SaaS script?

More from this author

View all

Related in Web Scripts & Software

View all