MediChain is a full-stack, role-based healthcare web application designed to seamlessly connect Patients, Doctors, and Hospitals. It provides a secure, robust environment for managing long-term medical records, scheduling, prescriptions, and healthcare diagnostics.
🚀 Live Demo links:
- 🛡️ Role-Based Access Control — Separate secure dashboards specifically tailored for Patients, Doctors, and Hospitals.
- 🔐 Comprehensive Authentication — Secure multi-provider JWT authentication including traditional Email/Password processing and Firebase Google OAuth integration cleanly mapped to MongoDB.
- 📊 Modern Patient Portal — A beautifully designed, Notion/Apple Health-inspired responsive dashboard focusing on stable long-term medical data (Medications, Conditions, Allergies).
- 📝 Complete Medical History — Structured tracking of surgical procedures, vaccination records, and active treatment regimens.
- 📂 Cloud File Uploads — Upload, manage, and view sensitive diagnostic lab reports natively using Multer + Cloudinary.
- 💬 Secure Telemedicine Chat — Live, scrollable chat interfaces storing doctor–patient interactions accurately within the database.
- 🌐 Global State Management — Highly optimized frontend data persistence utilizing Redux Toolkit.
- 🧠 AI Integration (Coming Soon) — Planned Google Gemini AI integration to analyze lab reports and generate personalized medical insights.
- Framework: React.js (via Vite)
- Styling: Tailwind CSS, Lucide React (for icons)
- State Management: Redux Toolkit
- Routing: React Router v6
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB Atlas (Mongoose ODM)
- Authentication: JSON Web Tokens (JWT), bcrypt, Firebase Admin
- File Uploads: Multer + Cloudinary
MediVault/
├── Backend/
│ ├── config/ # Database & Cloudinary config
│ ├── controllers/ # Route logic (Auth, Patient, Doctor)
│ ├── middleware/ # JWT verification & Error handling
│ ├── models/ # Mongoose Schemas (Patient, Doctor)
│ ├── routes/ # Express API routes
│ └── server.js # Entry point
│
└── Frontend/
├── src/
│ ├── api/ # Axios API service instances
│ ├── components/ # Reusable UI elements (Cards, Modals)
│ ├── features/ # Redux slices and thunks (Auth, Patient)
│ ├── layouts/ # Route wrappers (PatientLayout)
│ ├── pages/ # Core application views (Dashboard, Chat, Profile)
│ └── main.jsx # CRA Entry point
├── vite.config.js
└── package.json
Follow these steps to run the project locally:
git clone https://github.com/theadarsh1m/MediChain.git
cd MediChaincd Backend
npm installCreate a .env file in the Backend directory:
# Server Configuration
PORT=5000
# MongoDB Connection
MONGO_URI=your_mongodb_atlas_connection_string
# Authentication Strategy
JWT_SECRET=YourSuperSecretKey
JWT_EXPIRES_IN=7d
# File Upload Setup
CLOUDINARY_CLOUD_NAME=YOUR_CLOUDINARY_CLOUD_NAME
CLOUDINARY_API_KEY=YOUR_CLOUDINARY_API_KEY
CLOUDINARY_API_SECRET=YOUR_CLOUDINARY_API_SECRET
# Frontend CORS config
Frontend_URL=http://localhost:5173Start the backend server:
npm startOpen a new terminal window:
cd Frontend
npm installCreate a .env file in the Frontend directory:
# Routing config for Vite
VITE_Backend_API_URL=http://localhost:5000
# Firebase Auth Configuration (Optional, for Google Login)
VITE_FIREBASE_API_KEY=your_key
VITE_FIREBASE_AUTH_DOMAIN=your_domain
VITE_FIREBASE_PROJECT_ID=your_idStart the frontend dev server:
npm run dev
(Fully implemented with Redux & Responsive Routing)
Screenshots coming soon...
Want to improve MediChain? Follow these steps to safely contribute:
- Fork the repo
- Create a new branch (
feature-xyz)
create a new branch for each feature or bug fix. Replacefeature-xyzwith a descriptive name likefix-login-bugoradd-appointment-feature. - Commit changes
save your progress usinggit commit -m "Describe your change". - Open a Pull Request 🚀
open a Pull Request (PR) from your branch to the main repository.