A simple, local-first prescription generator app built with Next.js. Manage lists of medicines, tests/exams, and chief complaints; create a prescription with patient details and dosages; preview and print to PDF with clean print styles.
- Local lists: medicines, exams, chief complaints (editable in Settings)
- Manual dosage entry per medicine (e.g., "3 ml", "1 tablet", "1 spray", "4 puffs")
- Patient details: name, age, weight, sex
- Add recommended tests/exams and chief complaints to each prescription
- Preview page with print-ready layout and one-click
Print(use browser “Save as PDF”) - All data stored in
localStorage(no backend required)
- Install dependencies
- Ensure Node.js 18+ is installed
- Run:
npm install
- Start the dev server
npm run dev
- Open the app
- Visit
http://localhost:3000
- Visit
- Go to
Settingsto customize the lists of Medicines, Exams, and Complaints. - Use the
Prescriptionpage to:- Enter patient details
- Select complaints and exams (and add new ones inline if needed)
- Add medicines; pick from your list or type a new one; enter dosage and optional instructions
- Click
Preview & Printto open the printable view, then clickPrintand choose "Save as PDF".
- The app is local-first: your lists and the last built prescription are saved in the browser’s
localStorage. - The printable view uses browser printing; no external PDF library is required.
- You can change the header (doctor/clinic info) in
components/PrintablePrescription.tsxas desired.
app/— Next.js app directory routes/— Prescription builder/settings— Manage lists/print— Printable view
components/— Reusable UI pieceslib/storage.ts— Local storage helpers and data typesstyles/globals.css— App and print styles
- Add your clinic header and signature line in
PrintablePrescriptioncomponent. - Adjust print margins via
.print-pageinglobals.css. - Seed lists are in
lib/storage.tsunderDEFAULTS.
Built with Next.js 14 + React 18.