MediChain is a role-based web application built with Node.js, Express.js, MongoDB, and EJS.
It allows patients to manage their health data, doctors to update medical records, and admins to oversee the system securely.
🚀 Live Demo links:
- 🛡️ Role-Based Access Control — Separate secure dashboards for Patients, Doctors, and Hospitals.
- 🔐 JWT Authentication System — Ensures secure login and session management.
- 👤 Patient Management — Patients can view, update, and upload profile pictures and health data.
- 📂 Cloud File Uploads — Doctors and hospitals can upload lab reports and prescriptions to patient records using Multer + Cloudinary.
- 💬 Chat History & Health Notes — Stores doctor–patient interactions securely.
- ☁️ Cloud-Based Data Storage — All medical data and images are safely hosted via MongoDB Atlas and Cloudinary.
- 🧠 AI Integration (Coming Soon) — Planned Google Gemini AI integration to analyze lab reports and generate medical insights.
- Backend: Node.js, Express.js
- Frontend: EJS, Tailwind CSS
- Database: MongoDB Atlas (Mongoose ODM)
- Authentication: JWT + Cookies
- File Uploads: Multer + Cloudinary
- Deployment: Render (Backend), Netlify (Frontend)
MediVault/
├── backend/
│ ├── controllers/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── config/
│ ├── connect.js
│ ├── server.js
│ ├── .env
│ └── package.json
│
└── frontend/
├── src/
│ ├── components/
│ ├── pages/
│ ├── assets/
│ └── main.jsx
├── vite.config.js
├── index.html
├── .env
└── package.json
Follow these steps to run the project locally:
git clone https://github.com/theadarsh1m/MediChain.git
(open that Medichain folder for simplicity)
cd Backendnpm install# Server Configuration
PORT=5000
# MongoDB Connection
MONGODB_URI=your_mongodb_atlas_connection_string
JWT_SECRET=YourSuperSecretKey
JWT_EXPIRES_IN=7d
Frontend_URL=http://localhost:5173 # local frontend
# File Upload setup
CLOUDINARY_CLOUD_NAME=YOUR_CLOUDINARY_CLOUD_NAME
CLOUDINARY_API_KEY=YOUR_CLOUDINARY_API_KEY
CLOUDINARY_API_SECRET=YOUR_CLOUDINARY_API_SECRET
⚠️ Replace your_mongodb_atlas_connection_string, JWT_SECRET(for dev), CLOUDINARY_CLOUD_NAME, CLOUDINARY_API_KEY, CLOUDINARY_API_SECRET(for file uploads) with your own.
npm startcd Frontendnpm installVITE_Backend_API_URL=http://localhost:5000 # local backend
npm run dev
(Under development)
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.