MediSync is a full-stack MERN healthcare web application that empowers patients to compare medicine prices across pharmacies and securely manage their medical records โ all in one unified, intelligent platform.
- Problem Statement
- Solution
- Features
- Tech Stack
- Project Architecture
- System Architecture
- User Roles
- Project Workflow
- Figma Design
- Getting Started
- Future Enhancements
- Conclusion
Healthcare systems across the world are plagued by two deeply impactful and often overlooked challenges:
Patients frequently pay significantly different prices for the same medicine depending on the pharmacy they visit. Without access to a centralized comparison tool, patients โ especially those with chronic conditions โ are left in the dark, often overpaying for essential medications.
๐ A 2023 survey found that the price of common drugs can vary by up to 10x across different pharmacies in the same city.
Medical history is scattered across multiple hospitals, clinics, and diagnostic centers. Patients carry physical files, forget test results, or lose critical reports โ making it nearly impossible for doctors to get a complete picture of a patient's health at a glance. This fragmentation leads to delayed diagnoses, redundant tests, and poor patient outcomes.
MediSync addresses both problems with two core systems:
| Feature | Description |
|---|---|
| ๐ Medicine Price Comparison | A real-time search & compare engine that aggregates medicine prices from multiple pharmacies and highlights the cheapest option |
| ๐ Medical Record Hub | A centralized, secure vault for uploading, organizing, and sharing medical records with doctors through controlled access |
- ๐ Smart Search โ Search any medicine by name, salt, or brand
- ๐ Price Comparison โ View prices from multiple pharmacies side by side
- ๐ข Cheapest Highlight โ The lowest-priced option is automatically highlighted for quick decision-making
- ๐ Price Alerts โ Get notified when a medicine's price drops at any registered pharmacy
- ๐ค Upload Reports โ Upload PDFs, images, prescriptions, lab reports, and discharge summaries
- ๐๏ธ Timeline View โ Visualize your complete medical history in a clean, chronological timeline
- ๐ Secure Sharing โ Share records with specific doctors using access-controlled, time-limited links
- ๐ Privacy First โ Only you control who sees your data
| Feature | Description |
|---|---|
| ๐จ Emergency Mode | Instantly share critical records (allergies, blood type, conditions) in emergencies |
| ๐ฃ Notifications & Alerts | Real-time alerts for price changes, appointment reminders, and shared record access |
| ๐ฅ Role-Based Access | Separate, tailored dashboards for Patients, Doctors, and Admins |
| ๐ฑ Responsive Design | Fully optimized for desktop, tablet, and mobile |
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React.js | Component-based, dynamic UI |
| Backend | Node.js + Express.js | RESTful API server |
| Database | MongoDB + Mongoose | Flexible NoSQL data storage |
| Authentication | JWT + Google OAuth 2.0 | Secure, stateless session management |
| File Storage | Cloudinary / Firebase Storage | Medical report upload & retrieval |
| Notifications | Firebase Cloud Messaging (FCM) | Real-time alerts & price drop notifications |
| Design | Figma | UI/UX prototyping |
| Version Control | Git + GitHub | Collaborative development |
MediSync follows a Modular Monolith structure for the backend and a Feature-Based Design for the frontend to ensure maximum scalability and maintainability.
mediSync/
โโโ ๐ป frontend/ # Client-side Application (React + Vite)
โ โโโ ๐ public/ # Static assets & manifest files
โ โโโ ๐ src/
โ โโโ ๐ assets/ # Media, Global Styles & Fonts
โ โโโ ๐ components/ # Reusable UI Components
โ โ โโโ ๐ common/ # Atomic elements (Buttons, Inputs, Cards)
โ โ โโโ ๐ layout/ # Structural parts (Navbar, Sidebar, Footer)
โ โโโ ๐ features/ # Feature-specific logic (Auth, Records, etc.)
โ โโโ ๐ pages/ # Full-screen route components
โ โโโ ๐ services/ # API Client (Axios) & Interceptors
โ โโโ ๐ store/ # Global State Management (Context/Redux)
โ โโโ ๐ hooks/ # Custom React hooks
โ โโโ ๐ routes/ # Route configuration & Role-based guards
โ โโโ ๐ utils/ # Helper functions & Date formatters
โ โโโ ๐ firebase.js # Firebase Configuration & Auth Setup
โ โโโ ๐ App.jsx # Application Root
โ โโโ ๐ main.jsx # Entry Point
โ
โโโ โ๏ธ backend/ # Backend API (Node.js + Express)
โ โโโ ๐ src/
โ โ โโโ ๐ config/ # Database & Environment settings
โ โ โโโ ๐ controllers/ # Route logic (Business logic)
โ โ โโโ ๐ middleware/ # Auth, Validation & Error Handling
โ โ โโโ ๐ models/ # Database schemas (Mongoose)
โ โ โโโ ๐ routes/ # API endpoint definitions
โ โ โโโ ๐ services/ # External integrations (SMS, Mail)
โ โ โโโ ๐ utils/ # Global utility functions
โ โ โโโ ๐ uploads/ # Temporary file storage
โ โ โโโ ๐ app.js # App configuration
โ โ โโโ ๐ server.js # Server entry point
โ โโโ ๐ .env # Local environment variables
โ โโโ ๐ package.json # Backend dependencies
โ
โโโ ๐ .env.example # Environment variables template
โโโ ๐ README.md # Project Documentation
| Section | Patterns & Principles |
|---|---|
| Frontend | Atomic Design Principles for components, Feature-Sliced modules for business logic, and RBAC (Role-Based Access Control) for routing. |
| Backend | MVC (Model-View-Controller) pattern, RESTful API design, and JWT-based stateless authentication. |
| Security | CORS enabled, Environment variable protection, and encrypted medical data flow. |
features/: Each module (e.g.,auth/,medicine/) contains its own logic, keeping the code modular.services/: Centralized Axios instance with interceptors for automatic token handling.routes/: ImplementsPrivateRouteandPublicRouteto handle session-based navigation.
controllers/: Separates business logic from routing for cleaner code.middleware/: Handles security checks (Auth, Input Validation) before reaching controllers.models/: Defines the structure of healthcare data using Mongoose for MongoDB.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CLIENT LAYER โ
โ React.js (Frontend) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Medicine โ โ Records โ โ Dashboard โ โ
โ โ Search โ โ Manager โ โ (Role-Based)โ โ
โ โโโโโโโฌโโโโโ โโโโโโโฌโโโโโ โโโโโโโโฌโโโโโโโโ โ
โโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ API LAYER โ
โ Node.js + Express.js (Backend) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Medicine โ โ Record โ โ Auth & โ โ
โ โ API โ โ API โ โ User API โ โ
โ โโโโโโโฌโโโโโ โโโโโโโฌโโโโโ โโโโโโโโฌโโโโโโโโ โ
โโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DATA LAYER โ
โ MongoDB (Database) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Medicine โ โ Medical โ โ Users & โ โ
โ โ Pharmacy โ โ Records โ โ Roles โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Data Flow:
- The React frontend communicates with the backend via HTTP REST APIs
- The Express.js server handles business logic, authentication middleware, and routes requests
- MongoDB stores all persistent data โ users, medicine listings, pharmacy details, and encrypted medical records
- JWT tokens are issued on login and validated on every protected API request
MediSync implements a structured Role-Based Access Control (RBAC) system:
- Search and compare medicine prices
- Upload and manage personal medical records
- Share records with specific doctors via secure links
- Access emergency mode
- Receive price drop notifications
- View patient-shared medical records (with explicit permission)
- Add consultation notes to shared records
- Manage their own profile and availability
- Manage pharmacy and medicine listings
- Oversee user and doctor accounts
- Monitor platform activity and analytics
- Handle reported issues and moderation
User Visits โ Sign Up / Google Login โ JWT Issued โ Role-Specific Dashboard
Search Medicine โ View All Pharmacies โ Compare Prices โ Cheapest Highlighted โ Navigate to Pharmacy
Upload Report (PDF/Image) โ Auto-Categorized โ Timeline View โ Generate Secure Link โ Share with Doctor โ Doctor Views Record
Emergency Mode Activated โ Critical Info Surfaced โ Share QR / Link โ Medical Staff Accesses Data
The UI/UX for MediSync was designed in Figma, following a modern healthcare aesthetic:
- ๐จ Clean Green-White Theme โ Inspired by trust, health, and clarity; using a calming palette of medical green (
#00897B) and crisp white - ๐ Dashboard-Based Layout โ Role-specific dashboards with card-based UI, sidebar navigation, and data-rich panels
- ๐ฑ๏ธ Intuitive UX โ Designed for patients of all tech comfort levels, with large CTAs, clear iconography, and minimal friction flows
- ๐ฑ Mobile-First Responsiveness โ All screens designed for both mobile and desktop breakpoints
๐ View Figma Prototype
- Node.js
v18+ - MongoDB (local or Atlas)
- npm or yarn
# 1. Clone the repository
git clone https://github.com/priyabratasahoo780/mediSync.git
cd mediSync
# 2. Install backend dependencies
# 2. Install backend dependencies
cd backend
npm install
# 3. Install frontend dependencies
cd ../frontend
npm installCreate a .env file in the /backend directory:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
GOOGLE_CLIENT_ID=your_google_oauth_client_id
GOOGLE_CLIENT_SECRET=your_google_oauth_client_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
# Firebase Configuration
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id# Start backend server
cd backend
npm run dev
# Start frontend (in a new terminal)
cd frontend
npm run devThe app will be running at
http://localhost:5173(frontend) andhttp://localhost:5000(backend).
| Enhancement | Description |
|---|---|
| ๐ Real-Time Pharmacy APIs | Live integration with pharmacy databases for up-to-date pricing |
| ๐ค AI-Powered Suggestions | Smart medicine alternatives and dosage recommendations using AI |
| ๐ฑ Mobile Application | Cross-platform React Native app for iOS and Android |
| ๐ฌ Telemedicine Integration | In-app video consultations with registered doctors |
| ๐งฌ Health Analytics Dashboard | Personalized health insights from medical history trends |
| ๐ Multi-language Support | Accessibility for regional language speakers |
MediSync is more than just an application โ it's a step toward democratizing healthcare access.
- ๐ฐ Cost Savings โ Transparent pricing ensures patients never overpay for medicines
- ๐ฉบ Better Diagnosis โ Complete, centralized records help doctors make faster, more accurate decisions
- โก Efficient Healthcare โ Reducing paperwork and record fragmentation saves time for both patients and providers
"Healthcare should be simple, transparent, and accessible to everyone."