A modern, full-stack MERN platform for seamless doctor appointments, prescriptions, and clinic administration.
Features β’ System Design β’ Tech Stack β’ Setup β’ Deployment
| Portal | Link | Description |
|---|---|---|
| π€ Patient Portal | doctors-booking-appointment.vercel.app | Search doctors, book appointments, pay online, chat with AI |
| π οΈ Admin & Doctor Console | doctors-booking-appointment-j23z.vercel.app | Manage doctors, appointments, prescriptions & analytics |
Prescripto connects patients, doctors, and clinic administrators in one unified platform. Patients can discover doctors, book appointments, pay online, chat with an AI health assistant, and access digital prescriptions β while doctors and admins manage the entire clinical workflow from dedicated dashboards.
| π€ Patient Portal | π©» Doctor Dashboard | π οΈ Admin Console |
| Book, pay, chat, track | Manage schedule & prescriptions | Oversee doctors, payments, analytics |
- π Secure authentication with a global Route Guard
- π Search & filter doctors by speciality β General Physician, Gynecologist, Dermatologist, Pediatrician, Neurologist, Gastroenterologist
- π Flexible appointment booking with real-time slot selection
- π³ Dual payment modes β Pay at Clinic (Cash) or Online via Stripe
- π€ Interactive AI Chatbot powered by Gemini 2.5 Flash for symptom checks & recommendations
- π§Ύ Downloadable/printable digital prescriptions
- π Analytics at a glance β total doctors, appointments, patients, recent bookings
- π¨ββοΈ Manage doctors β add, edit experience/bio, update availability, or remove
- π View all appointments and update payment/cancellation status
- ποΈ Manage scheduled appointments β mark completed or cancel
- π Issue digital prescriptions directly on an appointment
- π° Monitor earnings and personal profile
flowchart TB
subgraph Clients["π₯οΈ Client Applications"]
A["Patient Portal<br/>React + Vite<br/>:5173"]
B["Admin / Doctor Dashboard<br/>React + Vite<br/>:5174"]
end
subgraph Backend["βοΈ Backend β Node.js + Express (:4000)"]
direction TB
R["API Routes"] --> M["Auth Middlewares<br/>(JWT Route Guards)"]
M --> C["Controllers<br/>Users β’ Admin β’ Doctors β’ Chatbot"]
end
subgraph External["βοΈ Third-Party Services"]
D[("MongoDB Atlas<br/>via Mongoose ODM")]
E["Cloudinary<br/>Image Hosting"]
F["Stripe<br/>Payment Gateway"]
G["Google Gemini 2.5 Flash<br/>AI Chatbot Engine"]
end
A -- "Axios / REST" --> R
B -- "Axios / REST" --> R
C --> D
C --> E
C --> F
C --> G
style A fill:#61DAFB,stroke:#333,color:#000
style B fill:#61DAFB,stroke:#333,color:#000
style Backend fill:#f5f5f5,stroke:#333
style D fill:#4EA94B,stroke:#333,color:#fff
style E fill:#3448C5,stroke:#333,color:#fff
style F fill:#626CD9,stroke:#333,color:#fff
style G fill:#8E75B2,stroke:#333,color:#fff
sequenceDiagram
actor P as Patient
participant FE as Frontend (React)
participant API as Backend API
participant DB as MongoDB
participant ST as Stripe
P->>FE: Search doctor by speciality
FE->>API: GET /api/doctor/list
API->>DB: Fetch doctors
DB-->>API: Doctor list
API-->>FE: Return doctors
P->>FE: Select doctor + slot
FE->>API: POST /api/user/book-appointment
API->>DB: Save appointment
alt Pay Online
FE->>API: POST /api/user/payment-stripe
API->>ST: Create checkout session
ST-->>P: Redirect to payment
P->>ST: Complete payment
ST-->>API: Payment confirmation
API->>DB: Update payment status
else Pay at Clinic
API->>DB: Mark as "Pay at Clinic"
end
API-->>FE: Booking confirmed β
FE-->>P: Show confirmation
erDiagram
USER ||--o{ APPOINTMENT : books
DOCTOR ||--o{ APPOINTMENT : accepts
APPOINTMENT ||--o| PRESCRIPTION : generates
ADMIN ||--o{ DOCTOR : manages
USER {
ObjectId _id
string name
string email
string password
string image
object address
}
DOCTOR {
ObjectId _id
string name
string speciality
string degree
number experience
number fees
boolean available
object slotsBooked
}
APPOINTMENT {
ObjectId _id
ObjectId userId
ObjectId docId
string slotDate
string slotTime
boolean cancelled
boolean payment
boolean isCompleted
}
PRESCRIPTION {
ObjectId _id
ObjectId appointmentId
string medicines
string notes
date issuedDate
}
flowchart LR
subgraph Backend["Backend/"]
cfg["config/<br/>MongoDB & Cloudinary"]
ctrl["controllers/<br/>API logic"]
mid["middlewares/<br/>Auth & uploads"]
mdl["models/<br/>Mongoose schemas"]
rts["routes/<br/>Express endpoints"]
seed["seed.js"]
srv["server.js"]
end
subgraph FE["frontend/ β Patient Portal"]
end
subgraph AD["admin/ β Admin & Doctor Console"]
end
srv --> rts --> mid --> ctrl --> mdl --> cfg
FE -.REST calls.-> srv
AD -.REST calls.-> srv
| Layer | Technologies |
|---|---|
| Frontend & Admin | React.js (Vite) Β· Tailwind CSS Β· React Router DOM Β· Axios Β· React Toastify |
| Backend | Node.js Β· Express Β· MongoDB (Mongoose ODM) |
| Media Hosting | Cloudinary β doctor & user profile pictures |
| Payments | Stripe β secure online checkout with dynamic redirection |
| AI | Google Gemini 2.5 Flash β NLP-powered virtual health assistant |
βββ Backend/ # Express API server
β βββ config/ # MongoDB & Cloudinary connectors
β βββ controllers/ # API business logic (users, admin, doctors, chatbot)
β βββ middlewares/ # Auth guards, file upload configs
β βββ models/ # Mongoose schemas
β βββ routes/ # Express API endpoints
β βββ seed.js # Database initial seeder script
β βββ server.js # Entry point
βββ frontend/ # Patient portal client
βββ admin/ # Admin & Doctor dashboard client
PORT=4000
MONGO_URI=your_mongodb_connection_string
CLOUDINARY_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
ADMIN_EMAIL=admin@prescripto.com
ADMIN_PASSWORD=your_admin_password
JWT_SECRET=your_jwt_secret_token
STRIPE_SECRET_KEY=your_stripe_secret_key
GEMINI_API_KEY=your_gemini_api_keyVITE_BACKEND_URL='http://localhost:4000' # Change to production URL when liveVITE_BACKEND_URL='http://localhost:4000' # Change to production URL when livePre-populate the database with 16 doctor profiles and Cloudinary-hosted images:
cd Backend
npm install
node seed.jsnpm run serverRuns at
http://localhost:4000usingnodemon(auto-reloads on file changes).
cd ../frontend
npm install
npm run devRuns at
http://localhost:5173.
cd ../admin
npm install
npm run devRuns at
http://localhost:5174(or next available port).
- Deploy to Render, Railway, or AWS.
- Add all environment variables from
Backend/.envto the platform's environment settings. - Whitelist relevant IP addresses if your MongoDB cluster restricts access.
- Deploy both as separate static sites on Vercel or Netlify.
- Set the root directory to
frontendandadminrespectively. - Build command:
npm run buildΒ· Output directory:dist. - Set
VITE_BACKEND_URLto your live backend URL (e.g.https://your-api.onrender.com).
Made with β€οΈ using the MERN stack