Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ARQUM21/Prescripto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

25 Commits

Repository files navigation

Prescripto

Prescripto โ€” Smart Healthcare Management System

Transforming the way clinics & hospitals manage appointments, prescriptions, and patient care.


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.


๐Ÿ“‹ Table of Contents


๐ŸŒŸ Why Prescripto?

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

โœจ Features

๐Ÿง‘โ€โš•๏ธ Patient Portal

  • 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

๐Ÿฉบ Doctor Portal

  • 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

๐Ÿ›ก๏ธ Admin Portal

  • 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

๐Ÿ“ธ Screenshots

๐Ÿง‘โ€โš•๏ธ Patient Portal

Register Page
Register Login Page
Login
Home / Hero Section
Home โ€” Hero Section
Browse Doctors
Browse Doctors by Speciality Book Appointment
Appointment Booking
My Appointments
My Appointments Prescription View
Digital Prescription
Patient Profile
Patient Profile

๐Ÿฉบ Doctor Portal

Doctor Login
Doctor Login Doctor Dashboard
Doctor Dashboard
Doctor Appointments
Appointments List Patient History
Patient History
Doctor Profile
Doctor Profile

๐Ÿ›ก๏ธ Admin Portal

Admin Login
Admin Login Admin Dashboard
Admin Dashboard
Add Doctor
Add Doctor Doctors List
Doctors List
All Appointments
All Appointments Appointment History
Appointment History

๐Ÿ›  Tech Stack

Frontend & Admin Panel

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

Backend

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

Infrastructure & Deployment

Service Purpose
Vercel Frontend, Admin & Backend hosting
MongoDB Atlas Cloud database
Cloudinary Image CDN
Gmail SMTP Email delivery

๐Ÿ“ Project Structure

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

โš™๏ธ Installation & Setup

Prerequisites

  • Node.js >= 18.x
  • MongoDB Atlas account
  • Cloudinary account
  • Gmail account (with App Password enabled)

Step 1 โ€” Clone the Repository

git clone https://github.com/ARQUM21/Prescripto.git
cd Prescripto

Step 2 โ€” Backend Setup

cd backend
npm install

Create .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


Step 3 โ€” Frontend Setup

cd ../frontend
npm install

Create .env in frontend/:

VITE_BACKEND_URL=http://localhost:4000
npm run dev

โœ… Patient portal at: http://localhost:5173


Step 4 โ€” Admin Panel Setup

cd ../admin
npm install

Create .env in admin/:

VITE_BACKEND_URL=http://localhost:4000
npm run dev

โœ… Admin panel at: http://localhost:5174


๐Ÿ” Environment Variables

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"


๐Ÿ”Œ API Reference

Base URL: https://your-backend.vercel.app


๐Ÿ‘ค User Routes /api/user

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

๐Ÿฉบ Doctor Routes /api/doctor

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

๐Ÿ›ก๏ธ Admin Routes /api/admin

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

๐Ÿ”ฎ Future Roadmap

Prescripto is architected with scalability in mind. Here is the planned evolution for clinics and hospitals who want enterprise-grade capabilities:

๐Ÿ—๏ธ Phase 1 โ€” Core Enhancements

  • 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

๐Ÿฅ Phase 2 โ€” Hospital-Grade Features

  • 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

๐Ÿ“Š Phase 3 โ€” Analytics & Intelligence

  • 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

๐Ÿ“ฑ Phase 4 โ€” Mobile & Scale

  • 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

๐Ÿ”’ Phase 5 โ€” Compliance & Enterprise Security

  • Audit Logs โ€” Full activity logs for regulatory compliance
  • Data Export โ€” Patient data as PDF / Excel reports
  • HIPAA / HL7 FHIR Compliance โ€” International healthcare standards

๐Ÿ™ Acknowledgements

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 ๐ŸŒ

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit: git commit -m 'Add: your feature'
  4. Push: git push origin feature/your-feature
  5. Open a Pull Request

๐Ÿ‘จโ€๐Ÿ’ป Author

Muhammad Arqum Full Stack Developer โ€” Building digital solutions for the healthcare industry


LinkedIn Email Phone

๐Ÿ“ Karachi, Pakistan


Interested in deploying Prescripto for your clinic or hospital? Feel free to reach out!


๐Ÿ“„ License

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

About

๐Ÿฅ Smart clinic & hospital management system โ€” Book appointments, write digital prescriptions & track patient history in real-time | Patient โ€ข Doctor โ€ข Admin Portals | MERN Stack โšก

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle ใซใ‚ˆใฃใฆๅค‰ๆ›ใ•ใ‚ŒใŸใƒšใƒผใ‚ธ (->ใ‚ชใƒชใ‚ธใƒŠใƒซ) /