Back to Projects

Hospital Management System

Enterprise Resource Planning for Healthcare

Node.jsExpress.jsPostgreSQLBootstrap 5JWTBcryptHelmetEJS
5
Core Modules
RBAC
Access Control
100%
RESTful API
JWT
Secure Auth
views
Be the first to rate

The Challenge

Hospitals need efficient systems to manage the complex relationships between patients, doctors, departments, and appointments. Manual scheduling leads to double-bookings, missed appointments, and poor patient experience. This system provides a centralized solution for healthcare administration.

System Architecture Flow

A layered architecture with Express.js server handling API routes, middleware for security, models for data access, and PostgreSQL for persistence.

🌐 CLIENT LAYER (Web Browser)
HTMLCSSJavaScriptBootstrap 5
HTTP/HTTPS
⚡ SERVER LAYER (Node.js)
Express.js Server (server.js)
🛡️ MIDDLEWARE LAYER
Helmet SecurityCORS PolicyRate LimiterJWT VerifyAuth Middleware
🔀 API ROUTES
/api/departments
/api/patients
/api/doctors
/api/appointments
/api/auth
📦 MODELS LAYER
Department ModelPatient ModelDoctor ModelAppointment ModelUser Model
SQL Queries
🗄️ DATABASE LAYER (PostgreSQL)
departmentspatientsdoctorsappointmentsusers

Request Data Flow

1
USER
Browser
2
FRONTEND
HTML/JS
3
ROUTES
API Handlers
4
MODELS
Query Builder
5
DATABASE
PostgreSQL

Key Achievements

Optimized scheduling logic in PostgreSQL to prevent double-booking conflicts

Implemented Role-Based Access Control (RBAC) for doctors, patients, and admins

Built secure authentication with JWT tokens and password hashing

Created RESTful API with proper CRUD operations for all entities

Added rate limiting and security headers for production readiness