Read me update A Node.js and Express-based web application for an automated medicine dispenser system using QR code authentication and payment. The system allows users to log in, scan or generate QR codes for authentication, view and manage their medicine bills, and make payments securely.
- User Authentication: Simple login system for access control.
- QR Code Generation: Generate QR codes for user login and payment.
- QR Code Scanning: Scan QR codes to authenticate and connect users.
- Medicine Management: View, add, and manage medicines for each user.
- Billing: Automatic calculation of total bill based on selected medicines.
- Payment Integration: Generate payment QR codes and update payment status.
- Status Tracking: Real-time status updates for connection and payment.
├── data.js # Sample user and medicine data
├── index.js # Main Express server
├── package.json # Project dependencies and scripts
├── vercel.json # Vercel deployment config
├── views/ # HTML views for UI
│ ├── bill.html
│ ├── doPayment.html
│ ├── login.html
│ ├── paymentQR.html
│ ├── qrCodeGenrator.html
│ └── qrCodeScanner.html
└── README.md
- Clone the repository:
git clone <repo-url> cd automated-macine-dispencer
- Install dependencies:
npm install
- Start the server:
npm start
- Open in browser: Visit http://localhost:3002
- Login: Go to
/login
and useadmin
/admin
as credentials. - Generate QR: Visit
/gen
to generate a QR code for login. - Scan QR: Visit
/scan
to scan a QR code and connect. - View Bill: Go to
/bill
to see and manage medicines and billing. - Payment: Go to
/payment
to pay via QR code./do/payment
simulates payment status update.
GET /api/gen/string
– Get the QR string for loginGET /api/gen/status
– Get connection statusPOST /api/status
– Update connection statusPOST /api/get/medicine
– Get medicines for a userGET /api/payment/status
– Get payment statusPOST /api/payment/status
– Update payment statusGET /api/gen/user
– Get connected user info
- express
- body-parser
- nodemon (dev)
- qrcode
This project is ready for deployment on Vercel using the provided vercel.json
.
MIT