A modern pharmacy management system with a beautiful glass morphism UI for registering medicines and creating prescriptions with PDF export.
- 💊 Medicine Registration: Add and manage medicines with details like dosage, type, and manufacturer
- 📋 Prescription Builder: Create prescriptions by selecting medicines and timing
- 📄 PDF Export: Generate and download prescription PDFs instantly
- ✨ Glass Morphism UI: Beautiful, modern interface with smooth animations
- 🌓 Dark Mode Support: Seamless light/dark theme switching
- 📱 Responsive Design: Works perfectly on desktop and mobile devices
- Frontend: Next.js 15, TypeScript, Tailwind CSS v4
- UI Components: shadcn/ui (all components pre-installed)
- Database: Convex (real-time, reactive database)
- PDF Generation: jsPDF
- Animations: Framer Motion
- Forms: React Hook Form + Zod validation
- Node.js 18+ installed
- A Convex account (free at convex.dev)
- Clone the repository:
git clone <your-repo-url>
cd medicine-manager- Install dependencies:
npm install- Set up Convex:
npx convex devThis will:
- Create a new Convex project (or connect to existing)
- Generate your Convex URL
- Start the Convex development server
- Create
.env.localfile:
cp .env.local.example .env.local- Add your Convex URL to
.env.local:
NEXT_PUBLIC_CONVEX_URL=https://your-project.convex.cloud
- Start the development server:
npm run dev- Open http://localhost:3000 in your browser
- Navigate to the Medicines tab
- Click Register to add new medicines
- Fill in the form with medicine details
- View all registered medicines in the Browse tab
- Navigate to the Prescriptions tab
- Click Create to build a new prescription
- Search and select medicines from your inventory
- Set timing (Morning/Afternoon/Night) for each medicine
- Optionally specify custom dosage
- Click Create & Download PDF to generate the prescription
- View all created prescriptions in the History tab
- Download PDFs of previous prescriptions
- Delete old prescriptions when needed
npm run dev- Start development server with Turbopacknpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpx convex dev- Start Convex development servernpx convex deploy- Deploy Convex to production
src/
├── app/ # Next.js app router
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ ├── medicine-form.tsx # Medicine registration
│ ├── medicine-list.tsx # Medicine browser
│ ├── prescription-builder.tsx
│ └── prescription-list.tsx
├── convex/ # Backend
│ ├── schema.ts # Database schema
│ ├── medicines.ts # Medicine functions
│ └── prescriptions.ts # Prescription functions
└── lib/ # Utilities
Medicines Table:
name: Medicine namedosage: Dosage strengthtype: Medicine type (tablet, syrup, etc.)manufacturer: Manufacturing company
Prescriptions Table:
medicines: Array of prescribed medicines with timingcreatedAt: Timestamp for ordering
- Push your code to GitHub
- Import project to Vercel
- Add environment variable:
NEXT_PUBLIC_CONVEX_URL - Deploy!
npx convex deployMIT