Prescripto Backend is the secure and scalable API powering Prescripto, a modern healthcare appointment and prescription management system.
It handles user authentication, doctor profiles, appointment bookings, prescriptions, and payments, ensuring a seamless healthcare experience.
🔹 Built with Node.js, Express, and MongoDB
🔹 Secure JWT authentication & role-based access
🔹 RESTful API for smooth frontend communication
🔹 Integrated Razorpay payment gateway
🔗 https://your-backend-api.com
📢 Note: This repository contains only the backend code.
For the frontend, visit: Prescripto Frontend.
✅ User Authentication – Secure JWT-based login & registration
✅ Role-Based Access – Patients, Doctors, and Admins
✅ Doctor Management – Add, update, and fetch doctor details
✅ Appointment Scheduling – Book, reschedule, and cancel appointments
✅ Prescription Management – Issue & store prescriptions digitally
✅ Secure Payments – Integrated Razorpay for easy transactions
✅ API Documentation – Comprehensive Swagger docs for developers
- Backend: Node.js, Express.js
- Database: MongoDB (Mongoose ORM)
- Authentication: JWT (JSON Web Token)
- Payments: Razorpay API
- Validation: Joi for input validation
- Environment Management: dotenv
- Logging: Morgan
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
GET /api/prescriptions
– View patient prescriptionsPOST /api/prescriptions
– Issue a prescription (Doctor)
POST /api/payments
– Process payments via RazorpayGET /api/payments/:id
– Get payment status
📌 More endpoints available in API documentation.
- Clone the repository
git clone https://github.com/yourusername/prescripto-backend.git cd prescripto-backend
- Install Dependencies
npm install
- Configure environment
PORT=5000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret RAZORPAY_KEY=your_razorpay_key RAZORPAY_SECRET=your_razorpay_secret
- Start the server
npm start
- Your API will be live at http://localhost:5000.
1️⃣ Register & Login – Authenticate users securely
- Patients and doctors can create accounts and log in using JWT-based authentication.
- Secure password hashing ensures data protection.
2️⃣ Manage Doctors – Fetch & update doctor profiles
- Patients can browse a list of verified doctors based on specialty and availability.
- Admins can add, update, or remove doctor profiles.
3️⃣ Book Appointments – Schedule & track medical visits
- Patients can select a doctor and book an available appointment slot.
- Appointments can be rescheduled or canceled if needed.
4️⃣ Handle Prescriptions – Issue & view patient prescriptions
- Doctors can issue digital prescriptions after consultations.
- Patients can access their prescription history anytime.
5️⃣ Process Payments – Secure transactions via Razorpay
- Patients can pay for consultations using Razorpay's secure payment gateway.
- Payment status and transaction details are stored for reference.
Contributions are welcome! Please follow these steps:
- Fork the project.
- Create your feature branch:
git checkout -b feature/new-feature
- Commit your changes:
git commit -m "Add new feature"
- Push to the branch:
git push origin feature/new-feature
- Open a Pull Request.