Skip to content

Full-stack medical appointment platform with patient, doctor, and admin dashboards. Supports bookings, payments, and scheduling.

Notifications You must be signed in to change notification settings

anishghanwat/Prescripto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Prescripto

Prescripto is a full-stack medical appointment management platform. It enables patients to book appointments with doctors, allows doctors to manage their schedules, and provides an admin dashboard for overall management.


Table of Contents


Deployment

The project is live at: https://prescripto-1-buk4.onrender.com/


Features

  • User registration and login (JWT-based)
  • Doctor registration (admin only) and login
  • Book, view, and cancel appointments
  • Online payments (Stripe and Razorpay integration)
  • Doctor availability and slot management
  • Admin dashboard for managing doctors, appointments, and users
  • Profile management for users and doctors

Project Structure

prescripto-final/
  ├── admin/      # Admin dashboard (React app)
  ├── backend/    # Backend server (Node.js/Express)
  ├── frontend/   # Main user-facing frontend (React app)
  └── README.md   # Project documentation

Tech Stack

  • Frontend & Admin: React, Vite, Tailwind CSS
  • Backend: Node.js, Express.js, MongoDB (Mongoose)
  • Authentication: JWT
  • Payments: Stripe, Razorpay
  • File Uploads: Cloudinary, Multer

Setup Instructions

Prerequisites

  • Node.js (v16+)
  • npm or yarn
  • MongoDB instance (local or cloud)
  • Cloudinary account (for image uploads)
  • Stripe and Razorpay accounts (for payments)

1. Clone the Repository

git clone <repo-url>
cd prescripto-final

2. Backend Setup

cd backend
npm install
# Create a .env file (see Environment Variables section)
npm run server

3. Frontend Setup

cd ../frontend
npm install
npm run dev

4. Admin Dashboard Setup

cd ../admin
npm install
npm run dev

Backend API Overview

The backend exposes RESTful APIs for users, doctors, and admins.

User Endpoints (/api/user)

  • POST /register — Register a new user
  • POST /login — User login
  • POST /book-appointment — Book an appointment (auth required)
  • POST /payment-stripe — Initiate Stripe payment (auth required)
  • POST /payment-razorpay — Initiate Razorpay payment (auth required)
  • POST /verify-stripe — Verify Stripe payment (auth required)
  • POST /verify-razorpay — Verify Razorpay payment (auth required)
  • GET /profile — Get user profile (auth required)
  • PUT /profile — Update user profile (auth required)
  • GET /appointments — List user appointments (auth required)
  • POST /cancel-appointment — Cancel an appointment (auth required)

Doctor Endpoints (/api/doctor)

  • POST /login — Doctor login
  • GET /list — List all doctors
  • GET /dashboard — Doctor dashboard data (auth required)
  • GET /profile — Get doctor profile (auth required)
  • PUT /profile — Update doctor profile (auth required)
  • GET /appointments — List doctor appointments (auth required)
  • POST /cancel-appointment — Cancel appointment (auth required)
  • POST /complete-appointment — Mark appointment as complete (auth required)
  • POST /change-availability — Change doctor availability (auth required)

Admin Endpoints (/api/admin)

  • POST /login — Admin login
  • POST /add-doctor — Add a new doctor (with image upload)
  • GET /doctors — List all doctors
  • GET /appointments — List all appointments
  • GET /dashboard — Admin dashboard data

Frontend Overview

  • Built with React and Vite.
  • Main features: Home, About, Doctors list, Book Appointment, My Appointments, Profile, Login.
  • Uses context for global state management.
  • Communicates with backend via REST APIs.

Admin Dashboard Overview

  • Built with React and Vite.
  • Features: Dashboard, Add Doctor, Doctors List, All Appointments.
  • Uses context for admin and doctor state.
  • Communicates with backend via REST APIs.

Database Models

User

  • name, email, password
  • Profile info
  • Appointments (referenced)

Doctor

  • name, email, password, image
  • speciality, degree, experience, about
  • available, fees, slots_booked
  • address, date

Appointment

  • userId, docId
  • userData, docData
  • amount, slotTime, slotDate, date
  • Status fields

Environment Variables

Create a .env file in the backend directory with the following:

PORT=4000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
STRIPE_SECRET_KEY=your_stripe_secret_key
RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_key_secret
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=your_admin_password

License

This project is licensed under the MIT License.

About

Full-stack medical appointment platform with patient, doctor, and admin dashboards. Supports bookings, payments, and scheduling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages