MediCart is a comprehensive, full-stack pharmacy management system designed to streamline the operations of a medical shop. It handles everything from inventory tracking and billing to customer and staff management.
- Authentication: Secure login and signup for staff and administrators.
- Billing & Invoicing: Create bills, apply GST, manage cart items, and generate invoices.
- Inventory Management: Track medicines, stock levels, batches, and expiry dates.
- Customer Management: Maintain customer details and purchase history.
- Staff Management: Add, update, and manage staff roles and permissions.
- Reporting: Generate sales reports and view overall business analytics.
- Responsive UI: A user-friendly front-end designed with HTML, CSS, and vanilla JavaScript.
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Backend: Node.js, Express.js
- Database: MongoDB (via Mongoose)
- Deployment: Configured for Vercel Serverless Functions
├── api/ # Vercel serverless entry point (index.js)
├── middleware/ # Express middlewares (auth, upload, etc.)
├── models/ # Mongoose schema definitions
├── public/ # Frontend assets (HTML, CSS, JS, Images)
├── routes/ # Express API routes
├── .env # Environment variables (create this)
├── package.json # Node dependencies and scripts
├── server.js # Local development server entry point
├── seed.js # Script to seed sample data into the database
└── vercel.json # Vercel deployment configuration
-
Clone the repository:
git clone https://github.com/yourusername/medicart.git cd medicart -
Install dependencies:
npm install
-
Environment Setup: Create a
.envfile in the root directory and add the following variables:PORT=3000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key SHOP_NAME="MediCart Pharmacy" SHOP_ADDRESS="123 Health Street, City" SHOP_PHONE="1234567890" SHOP_GSTIN="22AAAAA0000A1Z5"
-
Seed Sample Data (Optional): To populate the database with sample medicines and an admin account:
npm run seed
-
Run the Development Server:
npm run dev
The app will be available at
http://localhost:3000.
This project is pre-configured for seamless deployment on Vercel.
- Push your code to a GitHub repository.
- Go to Vercel and import your repository.
- In the Vercel project settings, configure the following Environment Variables:
MONGODB_URIJWT_SECRETSHOP_NAMESHOP_ADDRESSSHOP_PHONESHOP_GSTIN
- Deploy the project. The custom
vercel.jsonensures that both the API routes and the staticpublic/files are served correctly.
If you seeded the database, you can log in using:
- Email:
admin@medicart.com - Password:
admin123
This project is licensed under the MIT License.