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.
π DocNow
- β¨ Features
- π¦ Project Structure
- π Technologies Used
- π Installation
- πΉ Usage Guide
- π’ API Endpoints (Backend)
- π€ Contributing
- π Motivation
- Secure JWT-based login/registration for Patients, Doctors, and Admins
- Role-based access control
- Add, update, or remove doctor profiles
- Book, reschedule, or cancel appointments
- View doctor directory and availability
- Doctors issue and manage prescriptions digitally
- Patients can view prescription history
- Razorpay integration for handling consultation payments
- Admins can track all transactions
- Monitor all appointments, doctors, and users
- View analytics reports and payment history
π 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
- Node.js, Express.js
- MongoDB + Mongoose
- Cloudinary
- JWT Authentication
- Multer
- Razorpay (Payments)
- React.js
- Tailwind CSS
- React Router DOM
- Axios
- lucide-react
- react-toastify
- Razorpay Checkout
git clone https://github.com/arman61-hub/DocNow.git
cd DocNow
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
cd ../frontend
npm install
Set up environment:
VITE_BACKEND_URL = ''
VITE_RAZORPAY_KEY_ID = ''
VITE_CURRENCY = ''
Start the frontend:
npm run dev
- Register/Login
- Browse doctors
- Book/reschedule appointments
- Pay securely via Razorpay
- Login with doctor credentials
- Manage profile
- Issue prescriptions
- View appointment schedules
- Secure login
- Add/remove doctors
- View/manage all appointments & prescriptions
- Track payments & platform analytics
POST /api/auth/register
β Register a new userPOST /api/auth/login
β Login & receive a JWT token
GET /api/doctors
β Fetch all doctorsGET /api/doctors/:id
β Get doctor detailsPOST /api/doctors
β Add a doctor (Admin)PUT /api/doctors/:id
β Update doctor info (Admin)DELETE /api/doctors/:id
β Remove a doctor (Admin)
POST /api/appointments
β Book an appointmentGET /api/appointments/:id
β Get appointment detailsPUT /api/appointments/:id
β Reschedule/cancel an appointment
POST /api/payments
β Process payments via RazorpayGET /api/payments/:id
β Get payment status
π More endpoints available in API documentation.
We welcome contributions to improve DocNow!
Click the Fork button on the top right of this page.
Open terminal and run:
git clone https://github.com/yourusername/DocNow.git
cd DocNow
Use a clear naming convention:
git checkout -b feature/new-feature
Write clean, documented code and commit:
git add .
git commit -m "β¨ Added: your change description"
git push origin feature/your-feature-name
π‘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!