Skip to main content
MediTract dashboard with expiry and stock KPI cards
folderFull-Stack
calendar-days11/2026 - Present
layers-3React, TypeScript, Tailwind CSS +

MediTract

A web app for tracking medical supply expiry. Batches are classified as safe, near expiry, urgent or expired, dispensed first-expiry-first-out, and moved through a request queue with alerts, analytics and reports.

App Preview

1 / 6

Tech Stack

ReactTypeScriptTailwind CSSCloudflareSQLite

README

MediTract — Medical Supply Expiry Tracking

A web-based, role-based system that registers medical supplies by batch, tracks expiry, classifies each batch (Safe / Near Expiry / Urgent / Expired), prioritizes dispensing by FEFO (First-Expiry, First-Out), and raises alerts. Deployed to Cloudflare Pages with Pages Functions as the API and D1 as the database.

Features

  • Inventory Management — Register supplies by batch with expiry dates, quantities and barcodes
  • Expiry Classification — Every batch is classified automatically and surfaced in alerts
  • FEFO Dispensing — Deductions always come off the batch that expires first
  • Request Queue — Staff requests move through an approval workflow (Ctrl+N / ⌘N to create one)
  • Alerts — In-app, web push and email digest notifications from a scheduled Worker
  • Analytics & Reports — Usage trends, stock and expiry reports with PDF / XLSX export

Tech Stack

  • Frontend: React 19, TanStack Router and Query, Tailwind CSS 4, Vite
  • UI: Base UI, shadcn/ui, Lucide icons
  • Charts: Visx (D3-based)
  • Backend: Cloudflare Pages Functions, Cloudflare D1, a scheduled Worker for alerts
  • Language: TypeScript

Prerequisites

Getting Started

# Install dependencies
pnpm install

# Start the web app (API + local D1 + Vite)
pnpm web:dev

Open http://localhost:3002. See apps/web/README.md for seeding, migrations, production setup and CI/CD.

Development

# Lint
pnpm lint

# Type checking
pnpm check-types

# Tests
pnpm test
pnpm test:web
pnpm test:cron

# Build
pnpm build

Project Structure

meditract/
├── apps/
│   └── web/              # React SPA + Pages Functions API + D1 migrations
├── packages/
│   ├── config/           # Shared TypeScript configurations
│   └── ui/               # Shared UI components and design system
├── workers/
│   └── cron/             # Scheduled Worker: alerts, web push, email digest
├── scripts/              # Dev, migration and seed scripts for apps/web
├── pnpm-workspace.yaml   # pnpm workspace configuration
└── package.json          # Root package.json

Privacy

See the Privacy Statement.

License

MIT

Last updated: December 4, 2026

Looking for a Software Engineer?

I'm available for remote work.

Portrait of Alistair, a Software Engineer

We use cookies to analyze site traffic and improve your experience.

Learn more about how your data is handled