bronze-pharmacy

byHARDIK CHAPLE

Build a production-ready, full-stack pharmacy web application for: Business Name: Trimurti Medical Store Location: Nagpur, India Business Type: Hyperlocal Retail Pharmacy + Online Delivery + Subscription Healthcare Platform GOAL: Create a scalable healthcare platform similar to Tata 1mg and PharmEasy but focused only on Nagpur with 30-minute express delivery. --------------------------------------------------- TECH STACK --------------------------------------------------- Frontend: Next.js (React) Backend: Node.js + Express Database: MongoDB (Mongoose ODM) Authentication: JWT + OTP login Payments: Razorpay Notifications: Firebase Cloud Messaging Hosting: Vercel (frontend) + AWS/Render (backend) --------------------------------------------------- CORE FEATURES (CUSTOMER SIDE) --------------------------------------------------- 1. OTP-based Login & Authentication 2. Medicine Search & Ordering System 3. Upload Prescription (Image Upload + Verification) 4. 30-Minute Express Delivery Tracking 5. Wallet Cashback System 6. Family Health Dashboard 7. Medicine Reminder System 8. Subscription & Chronic Care Packages 9. Doctor Appointment Booking 10. Basic AI Assistant (FAQ + availability bot) 11. Multi-language (English + Hindi) 12. Senior Citizen Mode UI 13. Invoice Download (PDF) 14. Coupon System 15. WhatsApp Integration --------------------------------------------------- ADMIN PANEL --------------------------------------------------- - Admin login (role-based access) - Dashboard analytics - Inventory management - Order management - Prescription approval - Delivery staff management - Doctor management - Subscription management - Wallet management - Coupon management - Sales & GST reports - Low stock alerts - Delivery radius configuration --------------------------------------------------- MONGODB DATABASE SCHEMA (COMPLETE COLLECTIONS) --------------------------------------------------- Use proper indexing and references (ObjectId relationships). 1️⃣ USERS COLLECTION - _id - name - mobileNumber (unique, indexed) - email - password (if needed) - role (customer/admin/delivery) - walletBalance - referralCode - referredBy - addresses: [ { label, fullAddress, city, pincode, latitude, longitude } ] - createdAt - updatedAt --------------------------------------------------- 2️⃣ MEDICINES COLLECTION - _id - name (indexed) - brand - categoryId (ref Category) - description - composition - requiresPrescription (boolean) - mrp - sellingPrice - stockQuantity - expiryDate - manufacturer - imageUrl - createdAt - updatedAt --------------------------------------------------- 3️⃣ CATEGORIES COLLECTION - _id - name - description - imageUrl - createdAt --------------------------------------------------- 4️⃣ ORDERS COLLECTION - _id - userId (ref User) - medicines: [ { medicineId (ref Medicine), quantity, price } ] - totalAmount - discountAmount - walletUsed - finalAmount - paymentMethod (COD/UPI/Razorpay) - paymentStatus (Pending/Paid/Failed) - orderStatus (Placed/Packed/OutForDelivery/Delivered/Cancelled) - deliveryAddress - deliveryBoyId (ref User) - prescriptionId (ref Prescription) - createdAt - updatedAt --------------------------------------------------- 5️⃣ PRESCRIPTIONS COLLECTION - _id - userId (ref User) - imageUrl - verificationStatus (Pending/Approved/Rejected) - verifiedBy (ref Admin) - notes - createdAt --------------------------------------------------- 6️⃣ WALLET TRANSACTIONS COLLECTION - _id - userId (ref User) - type (credit/debit) - amount - reason (cashback/referral/redeem/manual) - orderId (optional ref Order) - createdAt --------------------------------------------------- 7️⃣ SUBSCRIPTIONS COLLECTION - _id - userId (ref User) - medicines: [ { medicineId, quantity } ] - planType (monthly/custom) - nextDeliveryDate - status (active/paused/cancelled) - autoRenew (boolean) - createdAt --------------------------------------------------- 8️⃣ REMINDERS COLLECTION - _id - userId (ref User) - medicineName - dosage - time - frequency (daily/weekly/custom) - startDate - endDate - isActive - createdAt --------------------------------------------------- 9️⃣ DOCTORS COLLECTION - _id - name - specialization - experience - consultationFee - availableSlots: [ { date, time, isBooked } ] - clinicAddress - createdAt --------------------------------------------------- 🔟 APPOINTMENTS COLLECTION - _id - userId (ref User) - doctorId (ref Doctor) - appointmentDate - timeSlot - status (Booked/Completed/Cancelled) - paymentStatus - createdAt --------------------------------------------------- 1️⃣1️⃣ DELIVERY TRACKING COLLECTION - _id - orderId (ref Order) - deliveryBoyId (ref User) - status - currentLatitude - currentLongitude - updatedAt --------------------------------------------------- 1️⃣2️⃣ COUPONS COLLECTION - _id - code (unique) - discountType (percentage/fixed) - discountValue - minOrderValue - expiryDate - isActive --------------------------------------------------- 1️⃣3️⃣ BLOG POSTS COLLECTION - _id - title - content - author - imageUrl - createdAt --------------------------------------------------- INDEXING REQUIREMENTS --------------------------------------------------- - Index medicine name - Index mobile number - Index order status - Index category - Add compound indexes where required --------------------------------------------------- SECURITY --------------------------------------------------- - Hash sensitive data - Validate all inputs - Role-based authorization - Secure file uploads - Rate limiting - Proper error handling --------------------------------------------------- SCALABILITY --------------------------------------------------- - Modular folder structure - RESTful API design - Environment-based configs - Production-ready code - Logging system - Proper validation Build this as a real healthcare startup platform, not a demo project. Ensure clean UI, scalable backend, and optimized database relationships.

No preview

Comments (0)

No comments yet. Be the first!

Architecture

Service Dependenciesv6
External
Storage
AI
Backend
Frontend
Client
Azure
MariaDB
Postgres
Redis
LiteLLM
FastAPI
React
Browser

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

No user flows yet.

The User Flow Agent will generate per-persona navigation diagrams after SRD updates.

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

No user flows yet.

The User Flow Agent will generate per-persona navigation diagrams after SRD updates.