Work / Web app · 2026
Non-profit medical dispensary
An internal system for a non-profit medical dispensary: staff record donations, medicine purchases and dispensing, expenses, patients and lab tests, and management gets financial and inventory reports for any date range. It is a Next.js app with server actions, Prisma and PostgreSQL, where every action checks permissions, money is stored as fixed-precision decimals and changes go to an audit log. After the first build I added search and filters, UI/UX fixes, lab-test fixes and responsive layouts. It is live.
- live
- client work
- web app
- client anonymized
- Client
- Non-profit medical dispensary
- Type
- Web app · Non-profit healthcare: internal management system
- Built with
- TypeScript, Next.js, React, Prisma, PostgreSQL (Neon), Auth.js, Tailwind CSS, shadcn/ui, React Hook Form + Zod, TanStack Table, Recharts
- Also uses
- Vercel
- Last active
- 2026
What it does
- Dashboard with monthly summary, trends, low-stock and expiry alerts and recent audit activity.
- Roles and granular permissions enforced in every server action.
- Donations with printable receipts; donors and suppliers.
- Medicine catalog, purchases, derived stock and stock-checked dispensing.
- Patients and lab-test visits with line items, charges and receipts.
- Date-filtered financial reports with CSV export and print-to-PDF.
- Audit log of create, update and delete actions.
How it is built
- A Next.js App Router app whose server actions are the API layer, with Prisma models for 11 entities on PostgreSQL. Every action checks permissions server-side; middleware is only a convenience gate. Money is Decimal(12,2), and financial and patient records are soft-deleted and audit-logged.
My part
- Developer for the non-profit client: started the build with an AI agent, then merged its PRs and reworked search, filters, UI/UX, lab tests and responsiveness across most modules.
- Directed an AI agent for the initial scaffold and app build, and merged its two PRs.
- Added search and filters and reworked UI/UX across lab tests, medicine, reports, contributions and patients.
- Documented setup and a Vercel + Neon deployment.
Decisions
- Enforce permissions inside every server action rather than relying on middleware.
- Store money as fixed-precision decimals and soft-delete financial and patient records.
- Derive stock from purchases and dispensing, and block dispensing beyond stock.
Challenges
- Keeping financial records trustworthy: no floating-point money, no hard deletes, and an audit trail.
Skills
- Full-stack Next.js (server actions)
- Relational data modelling (Prisma, PostgreSQL)
- Role-based access control
- Financial data integrity (decimals, soft deletes, audit log)
- Reporting UI (tables, charts, CSV export)