A modern pharmacy billing and customer management system built with MERN stack (MongoDB, Express.js, React/Next.js, Node.js).
pharmly/
├── pharmly-api/ # Backend API (Node.js + Express + TypeScript)
├── pharmly-web/ # Frontend Web App (Next.js + React + TypeScript)
├── pharmly-app/ # Mobile App (To be developed)
└── Documentation Files
- ✅ Store Management - Register, login, manage pharmacy store details
- ✅ Bill Management - Create, view, update, delete bills with auto-calculations
- ✅ Customer Management - Track customers, search by WhatsApp, view purchase history
- ✅ Analytics Dashboard - Sales tracking, growth metrics, daily reports
- ✅ WhatsApp Integration - Auto-generate bill messages for WhatsApp sharing
- ✅ Public Bill View - Customers can view bills without authentication
- ✅ Secure Authentication - JWT-based authentication with bcrypt password hashing
- API_DOCUMENTATION.md - Complete API reference with all endpoints, request/response examples
- FEATURES.md - Detailed features documentation, use cases, and business benefits
- QUICK_REFERENCE.md - Quick API reference guide for developers
- KNOWN_ISSUES.md - Known issues and their fixes (all issues resolved ✅)
- Node.js + Express.js
- TypeScript
- MongoDB + Mongoose
- JWT Authentication
- bcrypt for password hashing
- CORS enabled
- Next.js 15 (App Router)
- React 18
- TypeScript
- Tailwind CSS
- Responsive Design
cd pharmly-api
npm installCreate .env file:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
PORT=5000Run development server:
npm run devBuild for production:
npm run build
npm startcd pharmly-web
npm install
npm run devBase URL: https://pharmly.co.in/api or http://localhost:5000/api
- POST
/stores/register- Register new store - POST
/stores/login- Login store - GET
/stores/details- Get store details (Auth required) - PUT
/stores/details- Update store details (Auth required)
- POST
/bills- Create bill (Auth required) - GET
/bills- Get all bills (Auth required) - GET
/bills/public/:id- Get public bill (No auth) - PUT
/bills/:id- Update bill (Auth required) - DELETE
/bills/:id- Delete bill (Auth required)
- GET
/patients- Get all customers (Auth required) - GET
/patients/search- Search customer (Auth required) - POST
/patients- Create customer (Auth required) - PUT
/patients/:id- Update customer (Auth required)
- GET
/analytics/today- Today's summary (Auth required) - GET
/analytics/history- Sales history (Auth required) - GET
/analytics/recent-bills- Recent bills (Auth required)
Status: All 16 API endpoints are working correctly ✅
The analytics service issue has been fixed and all endpoints are now fully functional:
- ✅ Store authentication and management
- ✅ Bill CRUD operations with calculations
- ✅ Customer management with search
- ✅ Analytics with real-time data
- ✅ Public bill view for customers
Ready for Android app integration! Check these files:
- API_DOCUMENTATION.md - Complete API specs
- QUICK_REFERENCE.md - Quick integration guide with Kotlin examples
- FEATURES.md - All features, use cases, and architecture recommendations
- Implement Retrofit for API calls
- Store JWT token securely (EncryptedSharedPreferences)
- Build authentication screens (Login/Register)
- Create dashboard with analytics
- Implement bill creation flow
- Add customer management
- Integrate WhatsApp sharing
- Add offline support with Room DB
- ✅ JWT authentication (7-day expiry)
- ✅ Password hashing with bcrypt
- ✅ Protected routes with middleware
- ✅ CORS configuration
- ✅ Input validation
- ✅ Authorization checks for edit/delete
For API questions or issues, refer to the documentation files or raise an issue in the repository.
Private - For team use only
Version: 1.0.0
Last Updated: January 16, 2026
Status: Production Ready ✅
All APIs: Working ✅