A modern, secure Patient Management System built with Spring Boot, Spring Security, Thymeleaf, and Spring Data JPA.
Designed for clinics and medical teams to manage patients, appointments, medications, user accounts, and database operations efficiently.
- Secure login & registration
- BCrypt password hashing
- Spring Security authentication flow
- Add, edit, update, delete patients
- View complete patient profiles
- Medical information & history tracking
- Book appointments
- Appointment confirmation screen
- List all appointments
- Postman-tested REST endpoints
- Add medications
- Medication list page
- Medication linked with patient
- Thymeleaf server-rendered UI
- Bootstrap 5 responsive layout
- Clean, simple navigation
- User profile dashboard
Supports multiple databases out of the box:
- H2 (memory mode)
- MySQL
- PostgreSQL
- Pre-built Dockerfile
- Environment variable support
- Optional Docker Compose (included below)
All screenshots are stored under /screenshots/.
Patient System (Spring Boot App)
β
βββ Authentication Layer
β βββ Spring Security, BCrypt
β
βββ MVC Layer
β βββ Controllers (Handle requests)
β βββ Services (Business logic)
β βββ Repositories (Database access)
β βββ Models (Entities)
β
βββ Thymeleaf UI Layer
β βββ HTML templates + Bootstrap 5
β
βββ Database Layer
βββ H2 / MySQL / PostgreSQL
patient-system/
βββ src/main/java/.../controller
βββ src/main/java/.../service
βββ src/main/java/.../repository
βββ src/main/java/.../model
βββ src/main/resources/
β βββ templates/
β βββ static/
βββ screenshots/
βββ Dockerfile
βββ README.md
git clone https://github.com/TheComputationalCore/patient-system.git
cd patient-system./mvnw clean packageUpdate application.properties:
server.port=8085
spring.datasource.url=jdbc:h2:mem:patient_system
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.hibernate.ddl-auto=update
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console
spring.thymeleaf.cache=false
Run:
./mvnw spring-boot:runOpen in browser:
- App β http://localhost:8085
- H2 Console β http://localhost:8085/h2-console
spring.datasource.url=jdbc:mysql://localhost:3306/patient_system
spring.datasource.username=root
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:postgresql://localhost:5432/patient_system
spring.datasource.username=postgres
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=update
docker build -t patient-system:latest .docker run -p 8085:8085 --env-file .env patient-system:latestDB_URL=jdbc:mysql://localhost:3306/patient_system
DB_USERNAME=yourusername
DB_PASSWORD=yourpassword
version: "3.9"
services:
db:
image: mysql:8
container_name: patient_db
environment:
MYSQL_ROOT_PASSWORD: yourpassword
MYSQL_DATABASE: patient_system
ports:
- "3306:3306"
app:
build: .
container_name: patient_app
depends_on:
- db
ports:
- "8085:8085"
environment:
DB_URL: jdbc:mysql://db:3306/patient_system
DB_USERNAME: yourusername
DB_PASSWORD: yourpasswordRun:
docker compose up --build| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Home |
| GET | /register |
Registration page |
| POST | /register |
Register new user |
| POST | /login |
Login user |
| POST | /logout |
Logout user |
| GET | /appointments |
Get all appointments |
| POST | /appointments/book |
Book appointment |
./mvnw test
See: CONTRIBUTING.md
See: SECURITY.md
This project is licensed under the MIT License.
Dinesh Chandra β TheComputationalCore
GitHub: https://github.com/TheComputationalCore
YouTube: https://www.youtube.com/@TheComputationalCore




