React Node.js MongoDB Express TailwindCSS Vercel License
Built for modern clinics & hospitals โ A production-ready, full-stack appointment booking and prescription management platform with dedicated portals for Patients, Doctors, and Admins.
- ๐ Why Prescripto?
- โจ Features
- ๐ธ Screenshots
- ๐ Tech Stack
- ๐ Project Structure
- โ๏ธ Installation & Setup
- ๐ Environment Variables
- ๐ API Reference
- ๐ฎ Future Roadmap
- ๐ Acknowledgements
- ๐ค Contributing
- ๐จโ๐ป Author
- ๐ License
Most clinics and hospitals still rely on manual appointment books, phone calls, and paper prescriptions. Prescripto replaces all of that with a seamless digital platform โ reducing no-shows, eliminating paperwork, and giving every stakeholder (patient, doctor, admin) their own intelligent portal.
| Problem | Prescripto Solution |
|---|---|
| ๐ Patients call to book appointments | ๐ฅ๏ธ Self-service online booking, 24/7 |
| ๐ Paper prescriptions get lost | ๐ Digital prescriptions, always accessible |
| ๐๏ธ No patient history tracking | ๐ Complete history with edit trail |
| โ No-shows waste doctor time | โฐ OTP-verified accounts, slot-based booking |
| ๐ No data security | ๐ก๏ธ JWT auth + bcrypt encryption |
| ๐ No admin oversight | ๐ Real-time dashboard with stats |
- Account Management โ Register, login, update profile with photo
- Unique Patient ID โ Auto-generated immutable ID for every patient
- Doctor Discovery โ Browse doctors by 6 specialities with availability status
- Slot-Based Booking โ Real-time 30-minute slot availability (10 AM โ 9 PM)
- Appointment Management โ View and cancel appointments
- Digital Prescriptions โ View complete prescriptions issued by doctors
- Secure Password Reset โ 3-step OTP flow via email (2-minute expiry + resend)
- Responsive Design โ Works perfectly on mobile, tablet, and desktop
- Personalized Dashboard โ Earnings, appointment count, patient count at a glance
- Appointment Management โ View all appointments, complete or cancel them
- Prescription Writing โ Detailed digital prescription with:
- Diagnosis & Symptoms
- Medicines & Instructions
- Lab Tests & Documentation
- Next Visit date
- Prescription Editing โ Edit issued prescriptions with full edit history tracking
- Patient History โ View complete history of all treated patients
- Profile Management โ Update fees, address, and availability status
- Platform Dashboard โ Total doctors, appointments, and patients overview
- Doctor Management โ Add, edit, or toggle availability of doctors
- Image Upload โ Doctor profile photos via Cloudinary
- Appointment Oversight โ View and cancel any appointment on the platform
- Appointment History โ View completed appointments, delete records
- Dual Login โ Admin and Doctor login from the same panel
Home โ Hero Section
Patient Profile
Doctor Profile
| Technology | Version | Role |
|---|---|---|
| React | 19.2.0 | UI Framework |
| Vite | 7.x | Lightning-fast build tool |
| Tailwind CSS | 4.x | Utility-first styling |
| React Router DOM | 7.9.6 | Client-side routing |
| Axios | 1.13.2 | HTTP client |
| Lucide React | 0.555+ | Beautiful icons |
| React Toastify | 11.0.5 | Toast notifications |
| Technology | Version | Role |
|---|---|---|
| Node.js + Express | 5.1.0 | REST API server |
| MongoDB + Mongoose | 8.20.0 | NoSQL database & ODM |
| JWT | 9.0.2 | Stateless authentication |
| Bcrypt | 6.0.0 | Password hashing |
| Multer | 2.0.2 | File upload middleware |
| Cloudinary | 2.8.0 | Cloud image storage |
| Nodemailer | 7.0.12 | Transactional email (OTP) |
| Validator | 13.x | Input validation |
| Dotenv | 17.x | Environment config |
| Service | Purpose |
|---|---|
| Vercel | Frontend, Admin & Backend hosting |
| MongoDB Atlas | Cloud database |
| Cloudinary | Image CDN |
| Gmail SMTP | Email delivery |
Prescripto/
โ
โโโ ๐ฆ frontend/ # Patient-facing app (Port: 5173)
โ โโโ src/
โ โโโ assets/ # Images, SVGs, speciality data
โ โโโ components/
โ โ โโโ Navbar.jsx # Sticky responsive navbar
โ โ โโโ Footer.jsx # Footer with contact info
โ โ โโโ Header.jsx # Hero section
โ โ โโโ Banner.jsx # CTA banner
โ โ โโโ TopDoctors.jsx # Featured doctors grid
โ โ โโโ RelatedDoctors.jsx # Same-speciality suggestions
โ โ โโโ SpecialityMenu.jsx # Scrollable speciality filter
โ โ โโโ CountdownTimer.jsx # OTP resend countdown
โ โโโ context/
โ โ โโโ AppContext.jsx # Global state + all API calls
โ โโโ pages/
โ โโโ Home.jsx
โ โโโ Doctors.jsx # Browse & filter doctors
โ โโโ Appointment.jsx # Book appointment page
โ โโโ Login.jsx # Sign up / Login
โ โโโ MyProfile.jsx # Patient profile editor
โ โโโ About.jsx
โ โโโ Contact.jsx
โ โโโ EmailVerify.jsx # Password reset: Step 1
โ โโโ OtpVerify.jsx # Password reset: Step 2
โ โโโ ResetPassword.jsx # Password reset: Step 3
โ
โโโ ๐ฆ admin/ # Admin + Doctor panel (Port: 5174)
โ โโโ src/
โ โโโ components/
โ โ โโโ Navbar.jsx
โ โ โโโ Sidebar.jsx # Role-based sidebar (Admin/Doctor)
โ โโโ context/
โ โ โโโ AdminContext.jsx # Admin state + API calls
โ โ โโโ DoctorContext.jsx # Doctor state + API calls
โ โ โโโ AppContext.jsx # Shared utilities
โ โโโ pages/
โ โโโ Login.jsx # Shared login for Admin & Doctor
โ โโโ Admin/
โ โ โโโ Dashboard.jsx # Stats + latest bookings
โ โ โโโ AppointmentHistory.jsx
โ โ โโโ AddDoctor.jsx
โ โ โโโ DoctorsList.jsx
โ โโโ Doctor/
โ โโโ DoctorDashboard.jsx
โ โโโ DoctorAppointments.jsx
โ โโโ DoctorProfile.jsx
โ โโโ PatientHistory.jsx
โ
โโโ ๐ฆ backend/ # Express REST API (Port: 4000)
โโโ config/
โ โโโ mongodb.js # Mongoose connection
โ โโโ cloudinary.js # Cloudinary SDK config
โ โโโ nodemailer.js # Gmail transporter
โ โโโ EmailTemplates.js # HTML OTP email template
โโโ middlewares/
โ โโโ authUser.js # Verify user JWT
โ โโโ authDoctor.js # Verify doctor JWT (dToken)
โ โโโ authAdmin.js # Verify admin JWT (aToken)
โ โโโ multer.js # Disk storage for uploads
โโโ models/
โ โโโ userModel.js # Patient schema (patientId, OTP, etc.)
โ โโโ doctorModel.js # Doctor schema (slots_booked, etc.)
โ โโโ appointmentModel.js # Appointment schema
โ โโโ prescriptionModel.js # Prescription + edit history schema
โ โโโ counterModel.js # Auto-increment for Patient IDs
โโโ controllers/ # Route handlers / business logic
โโโ routes/
โ โโโ userRoute.js
โ โโโ doctorRoute.js
โ โโโ adminRoute.js
โโโ server.js # App entry point
- Node.js
>= 18.x - MongoDB Atlas account
- Cloudinary account
- Gmail account (with App Password enabled)
git clone https://github.com/ARQUM21/Prescripto.git
cd Prescriptocd backend
npm installCreate .env in backend/ directory โ see the Environment Variables section below.
npm run server # Development with auto-restart # OR npm start # Production
โ
API running at: http://localhost:4000
cd ../frontend
npm installCreate .env in frontend/:
VITE_BACKEND_URL=http://localhost:4000
npm run dev
โ
Patient portal at: http://localhost:5173
cd ../admin
npm installCreate .env in admin/:
VITE_BACKEND_URL=http://localhost:4000
npm run dev
โ
Admin panel at: http://localhost:5174
Create a .env file inside the backend/ folder:
# โโโ Server โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ PORT=4000 # โโโ Database โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net # โโโ Authentication โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ JWT_SECRET=your_strong_random_jwt_secret_key # โโโ Admin Credentials โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ADMIN_EMAIL=admin@yourclinicdomain.com ADMIN_PASSWORD=your_secure_admin_password # โโโ Cloudinary (Image Storage) โโโโโโโโโโโโโโโโโโโโโโโโโโโ CLOUDINARY_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_SECRET_KEY=your_cloudinary_api_secret # โโโ Email / OTP (Gmail) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ SENDER_EMAIL=your_gmail@gmail.com APP_PASSWORD=your_16_digit_gmail_app_password
Gmail App Password Setup: Google Account โ Security โ 2-Step Verification โ App Passwords โ Generate for "Mail"
Base URL: https://your-backend.vercel.app
| Method | Endpoint | Auth | Description |
|---|---|---|---|
POST |
/register |
โ | Register new patient |
POST |
/login |
โ | Patient login |
POST |
/send-reset-otp |
โ | Send OTP to email |
POST |
/verify-reset-otp |
โ | Verify 6-digit OTP |
POST |
/reset-password |
โ | Set new password |
GET |
/get-profile |
โ token | Fetch patient profile |
POST |
/update-profile |
โ token | Update profile + photo |
POST |
/book-appointment |
โ token | Book appointment |
GET |
/appointments |
โ token | List appointments |
POST |
/cancel-appointment |
โ token | Cancel appointment |
POST |
/get-prescription |
โ token | Get prescription |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
GET |
/list |
โ | All doctors list |
POST |
/login |
โ | Doctor login |
GET |
/appointments |
โ dToken | Doctor's appointments |
POST |
/complete-appointment |
โ dToken | Complete + write prescription |
POST |
/cancel-appointment |
โ dToken | Cancel appointment |
GET |
/patient-history |
โ dToken | All treated patients |
POST |
/edit-prescription |
โ dToken | Edit prescription |
GET |
/dashboard |
โ dToken | Dashboard stats |
GET |
/profile |
โ dToken | Doctor profile |
POST |
/update-profile |
โ dToken | Update profile |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
POST |
/login |
โ | Admin login |
POST |
/add-doctor |
โ aToken | Add new doctor |
POST |
/update-doctor |
โ aToken | Edit doctor |
POST |
/all-doctors |
โ aToken | All doctors |
POST |
/change-availability |
โ aToken | Toggle availability |
GET |
/appointments |
โ aToken | All appointments |
GET |
/appointment-history |
โ aToken | Completed appointments |
POST |
/delete-appointment-history |
โ aToken | Delete history |
POST |
/cancel-appointment |
โ aToken | Cancel appointment |
GET |
/dashboard |
โ aToken | Platform stats |
Prescripto is architected with scalability in mind. Here is the planned evolution for clinics and hospitals who want enterprise-grade capabilities:
- Online Payments โ Stripe / JazzCash / Easypaisa for appointment fees
- SMS Notifications โ Appointment reminders via Twilio SMS
- Email Confirmations โ Auto booking confirmation emails
- Doctor Search & Filters โ Search by name, fee range, rating, experience
- Ratings & Reviews โ Patients can rate and review doctors
- Multi-Branch Support โ One admin managing multiple clinic locations
- Department Management โ Organize doctors by hospital departments
- Bed / Room Management โ Track inpatient availability
- Lab Test Module โ Order tests, upload results, share with patients
- Medical Records Vault โ Upload X-rays, MRIs, and reports securely
- Pharmacy Integration โ Send prescriptions directly to hospital pharmacy
- Advanced Analytics Dashboard โ Revenue, peak hours, doctor performance
- Patient Demographics โ Age, gender, location-based insights
- No-Show Prediction โ ML model to reduce appointment no-shows
- AI Symptom Checker โ Pre-appointment chatbot assessment
- Smart Doctor Recommendations โ Suggest best doctor based on symptoms
- React Native Mobile App โ iOS & Android for patients
- Doctor Mobile App โ Manage appointments on the go
- Video Consultation โ WebRTC-based telemedicine
- Real-time Chat โ In-app messaging between patient and doctor
- Multi-language Support โ Urdu, Arabic, and regional languages
- Audit Logs โ Full activity logs for regulatory compliance
- Data Export โ Patient data as PDF / Excel reports
- HIPAA / HL7 FHIR Compliance โ International healthcare standards
This project was built with the help of some amazing open-source tools, services, and communities:
- React โ The UI library that powers all three portals
- Vite โ Blazing fast frontend build tool
- Tailwind CSS โ Utility-first CSS framework for rapid UI development
- Express.js โ Minimal and flexible Node.js web framework
- MongoDB Atlas โ Cloud-hosted NoSQL database
- Mongoose โ Elegant MongoDB object modeling for Node.js
- Cloudinary โ Cloud image storage and delivery
- Nodemailer โ Node.js module for sending emails
- JWT โ Secure stateless authentication standard
- Lucide React โ Beautiful & consistent icon library
- Vercel โ Seamless deployment platform for frontend & backend
- Shields.io โ Beautiful README badges
- The entire open-source community whose tools made this project possible ๐
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit:
git commit -m 'Add: your feature' - Push:
git push origin feature/your-feature - Open a Pull Request
Muhammad Arqum Full Stack Developer โ Building digital solutions for the healthcare industry
๐ Karachi, Pakistan
Interested in deploying Prescripto for your clinic or hospital? Feel free to reach out!
This project is licensed under the MIT License โ free to use, modify, and distribute.
โญ If Prescripto helps your clinic or hospital, please give it a star! โญ
Built with โค๏ธ for the healthcare community of Pakistan and beyond
ยฉ 2026 Prescripto โ All Rights Reserved