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!

System Requirements

System Requirement Document

System Requirements Document (SRD)

1. Introduction

Trimurti Medical Store is a hyperlocal retail pharmacy and online healthcare delivery platform based in Nagpur, India. The goal is to create a scalable, production-ready healthcare platform similar to Tata 1mg and PharmEasy but focused exclusively on Nagpur, offering 30-minute express delivery services. This platform will cater to customers, administrators, and delivery staff, ensuring seamless operations, user satisfaction, and subscription-based healthcare services.

2. System Overview

The Trimurti Medical Store platform will consist of:

  • A customer-facing web application for ordering medicines, managing subscriptions, booking doctor appointments, and accessing healthcare services.
  • An admin panel for managing inventory, orders, prescriptions, analytics, delivery staff, and subscriptions.
  • A delivery tracking system for real-time updates on express deliveries.
  • A secure and scalable backend to handle authentication, payments, notifications, and data management.
  • Integration with WhatsApp for notifications and updates.
  • Support for multi-language functionality (English and Hindi) and accessibility features like Senior Citizen Mode UI.
  • OTP-based authentication for secure and convenient user login.
  • AI-powered assistant for FAQs and medicine availability.

3. Functional Requirements as Story Points

Page 1 of 7

Customer Side

  • As a Customer, I should be able to log in using OTP-based authentication.
  • As a Customer, I should be able to search and order medicines.
  • As a Customer, I should be able to upload prescriptions for verification.
  • As a Customer, I should be able to track my orders with 30-minute express delivery updates.
  • As a Customer, I should be able to use a wallet cashback system for discounts.
  • As a Customer, I should be able to manage my family health dashboard.
  • As a Customer, I should be able to set medicine reminders.
  • As a Customer, I should be able to subscribe to chronic care packages.
  • As a Customer, I should be able to book doctor appointments.
  • As a Customer, I should be able to interact with a basic AI assistant for FAQs and medicine availability.
  • As a Customer, I should be able to use the platform in English and Hindi.
  • As a Customer, I should be able to switch to a Senior Citizen Mode UI for accessibility.
  • As a Customer, I should be able to download invoices in PDF format.
  • As a Customer, I should be able to use coupons for discounts.
  • As a Customer, I should be able to integrate my account with WhatsApp for notifications.
Page 2 of 7

Admin Panel

  • As an Admin, I should be able to log in using role-based access.
  • As an Admin, I should be able to view dashboard analytics.
  • As an Admin, I should be able to manage inventory.
  • As an Admin, I should be able to manage orders.
  • As an Admin, I should be able to approve prescriptions.
  • As an Admin, I should be able to manage delivery staff.
  • As an Admin, I should be able to manage doctors.
  • As an Admin, I should be able to manage subscriptions.
  • As an Admin, I should be able to manage wallet transactions.
  • As an Admin, I should be able to manage coupons.
  • As an Admin, I should be able to generate sales and GST reports.
  • As an Admin, I should be able to receive low stock alerts.
  • As an Admin, I should be able to configure delivery radius.
  • As an Admin, I should be able to log in using the credentials: Email: Trimurtimedical98@gmail.com and Password: Admin@9823297673 (hashed securely in the database).

4. User Personas

Customer

  • Primary user of the platform.
  • Can search, order medicines, upload prescriptions, and manage subscriptions.
  • Requires a user-friendly interface with multi-language support and accessibility features.
Page 3 of 7

Admin

  • Responsible for managing inventory, orders, prescriptions, and analytics.
  • Requires role-based access to the admin panel.
  • Admin credentials:

Delivery Staff

  • Responsible for delivering orders within the 30-minute express delivery window.
  • Requires access to delivery tracking features.

5. Visuals Colors and Theme

The platform will use a clean and modern design with the following color scheme:

  • Primary Color: Green (#4CAF50) - Represents health and trust.
  • Secondary Color: White (#FFFFFF) - Clean and professional.
  • Accent Color: Blue (#2196F3) - Highlights actionable elements like buttons.
  • Font: Sans-serif fonts like Roboto or Open Sans for readability.

The header will feature:

  • Logo: "Trimurti Medical Store" in bold, paired with a subtle healthcare-themed icon.
  • Navbar: Options like "Home," "Search Medicines," "Orders," and "Profile."
  • Call-to-Action Button: A prominent "Upload Prescription" button in green for quick access.
Page 4 of 7

6. Non-Functional Requirements

  • Security: Hash sensitive data (e.g., passwords) using bcrypt. Validate all inputs and implement role-based authorization.
  • Performance: Ensure fast response times for all API endpoints.
  • Scalability: Design a modular folder structure and RESTful APIs for future expansion.
  • Reliability: Implement proper error handling and logging systems.
  • Accessibility: Provide multi-language support and a Senior Citizen Mode UI.
  • Indexing: Optimize database queries with proper indexing for high performance.

7. Tech Stack

Frontend

  • Next.js (React) for web application development.

Backend

  • Node.js with Express for scalable and secure backend services.

Database

  • MongoDB for NoSQL database management (with Mongoose ODM).
Page 5 of 7

Authentication

  • JWT for secure token-based authentication.
  • OTP login for customer convenience.

Payments

  • Razorpay for payment processing.

Notifications

  • Firebase Cloud Messaging for real-time notifications.

Hosting

  • Vercel for frontend hosting.
  • AWS or Render for backend hosting.

AI Tools

  • GPT 5.2 for user-friendly responses.
  • Litellm for LLM routing.

Orchestration

  • Docker and docker-compose for local development.
  • Kubernetes for server-side orchestration.
Page 6 of 7

8. Assumptions and Constraints

  • The platform will initially focus only on Nagpur, India.
  • Delivery staff will operate within a predefined radius.
  • All prescriptions requiring approval will be verified by admins.
  • The system will support English and Hindi languages.
  • Payments will be processed via Razorpay, with COD as an alternative.
  • Admin credentials will be securely stored in the database with hashed passwords.
  • Proper indexing will be implemented for database optimization.

9. Glossary

  • OTP: One-Time Password for secure login.
  • JWT: JSON Web Token for authentication.
  • Mongoose ODM: Object Data Modeling library for MongoDB.
  • Razorpay: Payment gateway for online transactions.
  • Firebase Cloud Messaging: Service for sending notifications.
  • Docker: Tool for containerizing applications.
  • Kubernetes: System for automating deployment and scaling.
  • Bcrypt: Library for hashing passwords securely.

This document outlines the requirements for building a scalable, production-ready healthcare platform for Trimurti Medical Store. Let me know if further updates are needed!

Page 7 of 7

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.