A simple online system for local pharmacies to manage users-role system, medicines, prescriptions, inventory, and orders efficiently.
Pharmacy Management System is a full-stack web application that enables pharmacies to manage:
- Inventory of medicines
- User roles and authentication
- Prescription uploads and approvals
- Order placement and tracking
It supports both administrators and pharmacists in managing pharmacy workflows and assists patients in ordering medicines with or without prescriptions.
Pharmacy management systems often struggle with inefficient inventory tracking and prescription processing, leading to medication errors and operational delays.
- Manual inventory tracking leads to 15-20% medication waste annually
- 40% of pharmacies report prescription processing delays >24 hours
Layer | Technology |
---|---|
Backend | Node.js, Express |
Database | MySQL |
Frontend | NOT SPECIFIED |
Auth | JWT + Role-Based Access |
- User Registration and Role-Based Access (Admin, Pharmacist, Patient/Customer)
- Medicine Inventory Management
- Upload & Approve Prescriptions
- Order Medicines with Cart System
- Track Order History
- User Management
- Authentication
- Inventory Management
- Prescription Handling
- Order Management
- Purpose, Design, and Feature Overview
- Create ER Diagram and Plan DB Schema
- Setup project structure for frontend & backend
- Initialize
package.json
and install dependencies
- JWT-based login & registration
- Role-based access control
Steps:
- Create registration & login forms (React)
- Create
/register
and/login
API routes (Node.js) - Hash passwords using bcrypt and issue JWT tokens
- Store user info in MySQL
users
table - Enforce role-based route access
- Handle different roles: Admin, Pharmacist, Patient, Doctor
- Define role hierarchy and permissions
- Design Entity Relationship (ER) Diagram
- Create MySQL tables from the schema
- Create backend folder structure (Node.js + Express)
- Initialize project using
npm init -y
- Seed database with sample data
- Admin: Add, Edit, Delete, and View Medicines (CRUD)
- Patient: Browse available medicines
- Automatically subtract stock when an order is placed
- Restock when new deliveries arrive
- Alert on low stock levels
- Backend APIs for CRUD operations (Node.js + Express)
- Admin UI for inventory control (React/Next.js)
- Patient UI to browse medicines (React/Next.js)
- Patients can upload prescriptions (PDF or Image)
- Pharmacists/Admins can approve or reject them
- Setup file upload using Multer (Node.js)
- Store file path and metadata in the
prescriptions
table - Admin/Pharmacist UI to view and approve/reject files
- Patients can add medicines to cart
- Checkout process to place orders
- View order history and track statuses
- Implement cart system (Frontend state management + backend persistence)
- Checkout API to insert into
orders
andorder_items
tables
pharmacy-app/
│
├── backend/ # Express + Node + MySQL
├── frontend/ # React (or Next.js if SSR)
├── database/ # SQL schema, ERD, migrations
├── docs/ # Docs, flowcharts, UI mockups
├── .env # Global shared settings (if any)
├── README.md
└── docker-compose.yml # (optional: for dev containers)
backend/
│
├── src/
│ ├── config/ # MySQL config, .env loader
│ ├── controllers/ # Business logic (e.g. userController.js)
│ ├── middlewares/ # auth, error handling, logging
│ ├── models/ # SQL logic or ORM (e.g. Sequelize/Knex)
│ ├── routes/ # Route files grouped by domain
│ ├── services/ # Logic used by controllers (e.g. token, mail)
│ ├── utils/ # Common utilities (validators, helpers)
│ ├── uploads/ # Prescription file storage
│ └── app.js # Express app setup
│
├── tests/ # Backend unit/integration tests
├── server.js # Entry point
├── .env
└── package.json
frontend/
│
├── public/ # Static files
├── src/
│ ├── assets/ # Icons, images
│ ├── components/ # Reusable components (Button, Card, etc.)
│ ├── layouts/ # Page layouts (DashboardLayout, AuthLayout)
│ ├── pages/ # Route-level pages (Login, Inventory, Orders)
│ ├── services/ # API requests (Axios-based)
│ ├── contexts/ # React context (auth, cart, etc.)
│ ├── hooks/ # Custom hooks
│ ├── utils/ # Formatters, converters
│ └── App.jsx
│
├── tests/ # Frontend tests (Jest + Testing Library)
├── .env
└── package.json
database/
│
├── schemas/ # SQL schema definitions
│ └── pharmacy_schema.sql
│
├── migrations/ # Optional: migration scripts
├── seeders/ # Mock data for testing/dev
└── erd/ # PNG/SVG/Draw.io of ER diagram
docs/
│
├── system_design.md
├── feature_checklists/
├── screenshots/
└── api_docs.md
- Admin Dashboard for full system analytics
- Advanced search & filtering on medicines
- Payment integration (Stripe/PayPal)
- Invoice generator on order confirmation
- Multi-store management for chain pharmacies
- Doctor module for digital prescription issuance
- Email notifications for orders and approvals
- Real-time chat support for patient queries