Skip to content

🩺 DocNow β€” A smart React web app to book appointments, πŸ’Š manage prescriptions, and πŸ’³ pay securely β€” all in one place.

Notifications You must be signed in to change notification settings

arman61-hub/DocNow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯ DocNow – Complete Healthcare Appointment & Prescription System πŸš€

DocNow is a modern, full-stack healthcare management application that streamlines doctor appointments, digital prescriptions, and secure payments. Built with a modular architecture consisting of a React-based frontend, a powerful admin dashboard, and a secure Node.js/Express backend, DocNow provides a seamless experience for patients, doctors, and administrators alike.


🌐 Live Demo

πŸ”— DocNow


πŸ“š Table of Contents


✨ Features

πŸ” Authentication & Access

  • Secure JWT-based login/registration for Patients, Doctors, and Admins
  • Role-based access control

πŸ‘¨β€βš•οΈ Doctor & Appointment Management

  • Add, update, or remove doctor profiles
  • Book, reschedule, or cancel appointments
  • View doctor directory and availability

πŸ’Š Digital Prescriptions

  • Doctors issue and manage prescriptions digitally
  • Patients can view prescription history

πŸ’³ Secure Payments

  • Razorpay integration for handling consultation payments
  • Admins can track all transactions

πŸ“Š Admin Panel

  • Monitor all appointments, doctors, and users
  • View analytics reports and payment history

πŸ“¦ Project Structure

πŸ“ DocNow/
β”œβ”€β”€ πŸ“ backend/
β”‚   β”œβ”€β”€ πŸ“ config/
β”‚   β”‚   β”œβ”€β”€ cloudinary.js
β”‚   β”‚   └── mongodb.js
β”‚   β”œβ”€β”€ πŸ“ controllers/
β”‚   β”‚   β”œβ”€β”€ adminController.js
β”‚   β”‚   β”œβ”€β”€ doctorController.js
β”‚   β”‚   └── userController.js
β”‚   β”œβ”€β”€ πŸ“ middlewares/
β”‚   β”‚   β”œβ”€β”€ authAdmin.js
β”‚   β”‚   β”œβ”€β”€ authDoctor.js
β”‚   β”‚   β”œβ”€β”€ authUser.js
β”‚   β”‚   └── multer.js
β”‚   β”œβ”€β”€ πŸ“ models/
β”‚   β”‚   β”œβ”€β”€ appointmentModel.js
β”‚   β”‚   β”œβ”€β”€ doctorModel.js
β”‚   β”‚   └── userModel.js
β”‚   β”œβ”€β”€ πŸ“ routes/
β”‚   β”‚   β”œβ”€β”€ adminRoute.js
β”‚   β”‚   β”œβ”€β”€ doctorRoute.js
β”‚   β”‚   └── userRoute.js
β”‚   β”œβ”€β”€ .env
β”‚   └── server.js
β”‚
β”œβ”€β”€ πŸ“ frontend/
β”‚   β”œβ”€β”€ πŸ“ public/
β”‚   β”‚   └── favicon.svg
β”‚   β”œβ”€β”€ πŸ“ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“ admin/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ assets/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ context/
β”‚   β”‚   β”‚   └── πŸ“ pages/
β”‚   β”‚   β”œβ”€β”€ πŸ“ assets/
β”‚   β”‚   β”œβ”€β”€ πŸ“ components/
β”‚   β”‚   β”œβ”€β”€ πŸ“ context/
β”‚   β”‚   β”œβ”€β”€ πŸ“ pages/
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   β”œβ”€β”€ index.css
β”‚   β”‚   └── main.jsx
β”‚   β”œβ”€β”€ .env
β”‚   └── index.html
└── README.md

πŸ›  Technologies Used

πŸ”§ Backend

  • Node.js, Express.js
  • MongoDB + Mongoose
  • Cloudinary
  • JWT Authentication
  • Multer
  • Razorpay (Payments)

🎨 Frontend & Admin Panel

  • React.js
  • Tailwind CSS
  • React Router DOM
  • Axios
  • lucide-react
  • react-toastify
  • Razorpay Checkout

πŸš€ Installation

πŸ”§ 1. Clone the Repository

git clone https://github.com/arman61-hub/DocNow.git
cd DocNow

βš™οΈ 2. Backend Setup (inside /server)

cd backend
npm install

Create a .env file and add:

MONGODB_URI = ''
CLOUDINARY_NAME = ''
CLOUDINARY_API_KEY = ''
CLOUDINARY_SECRET_KEY = '' 
ADMIN_EMAIL = ''
ADMIN_PASSWORD = ''
JWT_SECRET = ''
RAZORPAY_KEY_ID = ''   
RAZORPAY_KEY_SECRET = '' 
CURRENCY = ''

Start the backend server:

npm run server

πŸ’» 3. Frontend Setup (inside /client)

cd ../frontend
npm install

Set up environment:

VITE_BACKEND_URL = ''
VITE_RAZORPAY_KEY_ID = ''
VITE_CURRENCY = ''

Start the frontend:

npm run dev

πŸ•Ή Usage Guide

πŸ‘€ Patients

  • Register/Login
  • Browse doctors
  • Book/reschedule appointments
  • Pay securely via Razorpay

πŸ‘¨β€βš•οΈ Doctors

  • Login with doctor credentials
  • Manage profile
  • Issue prescriptions
  • View appointment schedules

πŸ” Admins

  • Secure login
  • Add/remove doctors
  • View/manage all appointments & prescriptions
  • Track payments & platform analytics

βš™οΈ API Endpoints (Backend)

πŸ”‘ Authentication

  • POST /api/auth/register – Register a new user
  • POST /api/auth/login – Login & receive a JWT token

πŸ‘¨β€βš•οΈ Doctor Management

  • GET /api/doctors – Fetch all doctors
  • GET /api/doctors/:id – Get doctor details
  • POST /api/doctors – Add a doctor (Admin)
  • PUT /api/doctors/:id – Update doctor info (Admin)
  • DELETE /api/doctors/:id – Remove a doctor (Admin)

πŸ“… Appointments

  • POST /api/appointments – Book an appointment
  • GET /api/appointments/:id – Get appointment details
  • PUT /api/appointments/:id – Reschedule/cancel an appointment

πŸ’³ Payments

  • POST /api/payments – Process payments via Razorpay
  • GET /api/payments/:id – Get payment status

πŸ“Œ More endpoints available in API documentation.


🀝 Contributing

We welcome contributions to improve DocNow!

🧩 How to Contribute

1. Fork the Repository

Click the Fork button on the top right of this page.

2. Clone Your Fork

Open terminal and run:

git clone https://github.com/yourusername/DocNow.git
cd DocNow

3. Create a feature branch:

Use a clear naming convention:

git checkout -b feature/new-feature

4. Make & Commit Your Changes

Write clean, documented code and commit:

git add .
git commit -m "✨ Added: your change description"

5. Push to GitHub & Submit PR

git push origin feature/your-feature-name

6. Then go to your forked repo on GitHub and open a Pull Request.


⭐ Motivation

πŸ’‘PS: If you found this project helpful or inspiring, please ⭐ star the repository β€” it keeps me motivated to build and share more awesome projects like this one!


About

🩺 DocNow β€” A smart React web app to book appointments, πŸ’Š manage prescriptions, and πŸ’³ pay securely β€” all in one place.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages