This is the backend API for the Healthcare Appointment Booking App. It handles user authentication, appointment booking, dentist management, and scheduling logic.
- User Authentication: Manage users securely.
- Appointment Management: Book, cancel, and reschedule appointments.
- Dentist Availability: Tracks available time slots and prevents double booking.
- Database Persistence: Uses a JSON-based mock database (
db.json). - Express.js API: RESTful API built with Node.js & Express.js.
Ensure you have the following installed:
- Node.js (LTS recommended)
- npm (Comes with Node.js)
- Postman (Optional, for API testing)
git clone https://github.com/itsmessc/Test-Backend.git
cd Test-Backendnpm installTo start the backend API, run:
npm startThe API will be available at:
http://localhost:8000
GET /dental-offices→ Fetch all dental officesGET /services→ Get available services
GET /dentists→ Fetch all dentistsGET /dentists/:id→ Get a specific dentistGET /dentists/office/:officeId→ Get dentists by office
POST /appointments/book→ Book an appointmentGET /appointments/user/:userId→ Get all user appointmentsPUT /appointments/reschedule/:id→ Reschedule an appointmentDELETE /appointments/cancel/:id→ Cancel an appointment
- The API_URL should be configured in the frontend to match the backend server URL.
- For Google Maps or location-based features, the GEOAPIFY_API_KEY is required and configured in frontend.
- This backend uses a JSON-based mock database (
db.json) for simplicity.