This project is fully vibecoded from start to finish.
This repository contains a simple Hospital Management System built with React (frontend), Node.js + Express (backend), and MySQL (database).
- Manage Patients, Doctors, Appointments, Rooms, Bills, and Staff
- CRUD operations for all entities
- Filter appointments by date or doctor
- Display relationships (patient-doctor-room)
- Frontend: React, Vite, Axios, Bootstrap
- Backend: Node.js, Express, mysql2
- Database: MySQL
- Create the database and tables by running the
hospital_management.sqlscript in a MySQL client. - Backend:
cd backend
npm install
copy .env.example .env
# Edit .env to set DB credentials
npm run dev- Frontend:
cd frontend
npm install
npm run dev- /api/patients
- /api/doctors
- /api/appointments
- /api/rooms
- /api/bills
- /api/staff
- The backend uses a connection pool and prepared statements via
mysql2. - The frontend expects the backend at
http://localhost:5000/apiby default; setVITE_API_BASEto change.