This is a project that will help in swift and efficient management of Hospital Data - Doctor and Patient Appointment System and many other features.
This project demonstrates a secure, scalable REST API with authentication, authorization, role-based access control, and a frontend UI to interact with backend APIs.
- User registration and login APIs with argon2 secure password hashing algorithm
- JWT-based authentication for protected routes
- Role-Based Access Control (RBAC) implemented using:
admindoctorpatient
- Versioned REST APIs using
/api/v1/* - Proper HTTP status codes and centralized error handling
- Input validation and request sanitization
- Modular, scalable project structure for future feature expansion
- Resource - Service Design for scalability
- Appointment entity with full CRUD support:
- Create appointment
- Retrieve appointment(s)
- Update (reschedule) appointment
- Delete (cancel) appointment
- Treatment records as an additional managed resource:
- Diagnosis
- Notes
- Prescriptions
- Relational database schema designed using SQLAlchemy ORM
- Clear entity relationships between users, appointments, and treatments
- Architecture easily portable to PostgreSQL / MySQL for production environments
- REST APIs designed to be easily testable via Postman
- Endpoint structure compatible with Swagger / OpenAPI documentation
- Frontend UI built to interact with backend APIs using Vue.js
- User workflows implemented:
- User registration and login
- Role-based dashboards (Admin / Doctor / Patient)
- Protected routes requiring JWT authentication
- CRUD interactions with backend APIs:
- Appointment creation, update, and deletion
- Clear display of API success and error messages
- Secure JWT token handling for authenticated requests
- Password hashing and role validation enforced at API level
- Redis caching implemented for frequently accessed queries
- Asynchronous background processing using Celery for:
- Scheduled reminders
- Monthly reports
- CSV exports
- Scalable architecture designed around:
- Stateless REST APIs
- Caching layer
- Background workers
- Future Docker-based deployment
- Redis caching for performance optimization
- Celery-based background jobs
- CSV export functionality for reporting
- Scheduling logic for reminders and analytics
-
OpenAPI Specification:
docs/OpenAPI.yaml -
Postman Collection:
docs/postman/collections/Hospital Management System API.postman_collection.jsonThe Postman collection was generated directly from the OpenAPI specification to ensure consistency.
This project utilizes the following technologies:
- Backend: Flask (lightweight Python framework), Celery, Redis, WSL2
- Database: SQLAlchemy (ORM for database management)(SQLite3 DB)
- Frontend: Bootstrap CSS (responsive PWA design), Vue.JS, JavaScript
- Version Control: Git & GitHub
- IDE: Visual Studio Code
- Backend: WSL2
- Pip: Install dependencies from
req.txt
To run this project, you’ll need to have Python 3.7+ installed on your system.
-n, make sure to check the box to Add Python to PATH.
-
Windows: Download Python and check Add Python to PATH.
-
macOS:
brew install python -
Linux:
sudo apt install python3To confirm Python is installed, run this in your terminal:
python --version
-git clone https://github.com/KH-Coder865/HealthLink---HMS.gitA virtual environment is recommended to keep project dependencies isolated.
-
Create a Virtual Environment:
In your project’s root directory, run the following command to create the virtual environment:
python -m venv venv
This will create a venv directory where the isolated Python environment will reside.
-
Activate the Virtual Environment:
- Windows:
venv\Scripts\activate
- macOS/Linux:
source venv/bin/activateAfter activation, your terminal prompt should change to something like:
(venv) $
-cd backend
-pip install -r req.txt -cd backend
-python app.py -npm install
-npm run devThe app should now be running.
- Backend Celery Tasks Not working properly
- Frontend/Backend ports clash while using WSL2
- Caching was previously on resources, not working properly then moved to the services. Worked
- Ensuring proper RBAC
- Handling the props and states of a vue SFC
Kaushik Harsha
- GitHub: @KH-Coder865