A secure, full-stack hospital management web application designed to streamline patient record handling and role-based operations. Built with Flask (Python) for the backend and React.js + Tailwind CSS + TypeScript for the frontend, it supports multiple roles such as Admin, Nurse, and Receptionist, with secure JWT authentication and MongoDB integration.
-
🔐 JWT-based Authentication & Authorization
- Secure login system for Admin, Nurse, and Receptionist roles
- Role-based access control (RBAC) for protected routes
- Configurable password hashing with bcrypt
- Rate limiting for security
-
🏥 Patient Management (CRUD)
- Create, read, update, and delete patient records
- Input validation and error handling
- Advanced search with pagination
- Data compression for better performance
-
🔍 Search with Pagination
- Efficient server-side filtering of patient records with indexed queries
- Supports pagination for large datasets
- Real-time search capabilities
-
📊 Admin Dashboard & Analytics
- Admin-only interface to view all registered users
- Patient demographics and disease distribution analytics
- Real-time charts and statistics
- Excludes sensitive info like passwords and MongoDB
_id
-
🎨 Frontend
- Clean and responsive UI using React and Tailwind CSS
- Authentication-aware navigation and route protection
- Progressive Web App features
- Optimized performance with React Query
-
🛡️ Security & Performance
- Environment-based configuration
- Health check endpoints
- Comprehensive error handling
- Database connection monitoring
- Rate limiting and compression
- React.js
- Tailwind CSS
- Axios
- React Router DOM
- Python (Flask)
- Flask-JWT-Extended
- Flask-CORS
- Flask-PyMongo
- Flask-Limiter (Rate Limiting)
- Flask-Compress (Data Compression)
- Gunicorn (Production Server)
- MongoDB (NoSQL)
- Indexing for optimized search and filtering
- Python 3.x
- Node.js + npm
- MongoDB running locally or cloud (e.g., MongoDB Atlas)
cd Project/healthcare_patient_system
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python app.py
Flask app will start at: http://localhost:5000
Environment Configuration:
Copy env.example
to .env
and configure your environment variables:
cp env.example .env
cd Project/healthcare-frontend
npm install
npm start
React app will start at: http://localhost:3000
Method | Endpoint | Description | Protected |
---|---|---|---|
POST | /api/login |
Login for all roles | ❌ |
POST | /api/patients |
Create patient record | ✅ |
GET | /api/patients?page=1 |
Get patients with pagination | ✅ |
PUT | /api/patients/:id |
Update patient details | ✅ |
DELETE | /api/patients/:id |
Delete patient | ✅ |
GET | /api/admin/users |
View all users (Admin only) | ✅ |
GET | /api/health |
Health check endpoint | ❌ |
GET | /api/analytics/age |
Patient age distribution | ✅ |
GET | /api/analytics/diseases |
Disease distribution | ✅ |
Role | Access Privileges |
---|---|
Admin | Full access, manage users & patients |
Nurse | View & edit patient data |
Receptionist | Add/view patient entries |
📦 project-root
├── backend
│ ├── app.py
│ ├── routes/
│ ├── models/
│ └── utils/
├── frontend
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ └── App.js
├── README.md
- ✅ Email verification & password reset
- ✅ Deploy on Render/Netlify + MongoDB Atlas
- ⏳ Role-based analytics dashboard
- ⏳ Export patient data to PDF/Excel
- ⏳ Add doctor role and appointment module
This project demonstrates a full-stack solution for healthcare systems with secure authentication, clean UI, and scalable architecture. Perfect for hospitals, clinics, or medical institutions.
Feel free to connect:
- LinkedIn: linkedin.com/in/raunak0400
- GitHub: github.com/raunak0400
- Email: [email protected]
Special thanks to:
- The professors for their guidance
- The open-source community for inspiration
- Project collaborators for their valuable input
Created with ❤️ by a passionate programmer
RAUNAK KUMAR JHA