The Clinic Management System is a Spring Boot–based application that simplifies patient, doctor, appointment, and prescription management. It features secure JWT authentication, PostgreSQL database integration, PDF reporting, and email notifications. Designed with a multi-layered architecture and CI/CD pipelines, it provides a scalable, professional solution for modern healthcare operations.
Backend
- Java 21+ • Spring Boot (Web, Security, Validation, Mail, Data JPA)
- JWT (Authentication & Authorization)
- PostgreSQL
- OpenAPI/Swagger • OpenPDF (PDF reports)
Architecture & Quality
- Layered architecture (Controller → Service → Repository → Entity/DTO)
- MapStruct/Manual mappers, Global exception handling
- JUnit 5, Mockito, Testcontainers (opsiyonel), JaCoCo coverage
DevOps
- GitHub Actions (CI/CD) • Docker & Docker Compose
- Doxygen/Javadoc • Pre-commit hooks
Frontend
- React + Vite + TypeScript
- Tailwind CSS
cmd cd C:\Users\yagiz\Desktop\Project\clinic-management-system\clinic-management-app mvn spring-boot:run
Swagger UI: http://localhost:8080/swagger-ui.html
The frontend is a React + Vite app. During development it runs on http://localhost:5173.
CMD
cd C:\Users\yagiz\Desktop\Project\clinic-management-system\frontend npm run dev
Open http://localhost:5173/ in your browser.
Below are example panels from the Clinic Management System frontend (React + Vite):
View daily appointments, approve/cancel them, and create prescriptions

Book appointments, check statuses, and view prescriptions

The frontend depends on the Spring Boot backend running on http://localhost:8080.
If the backend is not running, pages that rely on API calls (patients, doctors, appointments, etc.) will fail.
clinic-management-system/
├── clinic-management-app/ # Backend (Spring Boot) + Frontend (React)
│ ├── docs/ # UML diagrams, coverage badges, guides
│ │ ├── class-diagram.(puml|png|svg|pdf)
│ │ ├── component-diagram.(puml|png|svg)
│ │ ├── deployment-diagram.(puml|png|svg)
│ │ ├── sequence-*.puml # Sequence diagrams
│ │ └── use-case-diagram.(puml|png|svg)
│ │
│ ├── src/main/java/com/yagiz/clinic/
│ │ ├── common/ # Mail, PDF, SMS services
│ │ ├── controller/ # REST Controllers (Patient, Doctor, etc.)
│ │ ├── dto/ # DTOs and CreateRequest objects
│ │ ├── exception/ # Global exception handling
│ │ ├── mapper/ # MapStruct/Manual mappers
│ │ ├── model/ # Entities + enums (User, Doctor, Patient…)
│ │ ├── notification/ # NotificationLog entity
│ │ ├── repository/ # Spring Data JPA repositories
│ │ ├── security/ # Spring Security + JWT auth
│ │ ├── service/ # Services + implementations
│ │ └── ClinicApp.java # Main Spring Boot Application
│ │
│ ├── src/test/java/com/yagiz/clinic/
│ │ ├── appointment_tests/
│ │ ├── doctor_tests/
│ │ ├── patient_tests/
│ │ ├── prescription_tests/
│ │ ├── controller_tests/
│ │ ├── jwt_tests/
│ │ ├── impl_tests/
│ │ ├── exception_and_notification_tests/
│ │ ├── security_tests/
│ │ └── user_tests/
│ │
│ ├── frontend/ # React + Vite + Tailwind UI
│ │ ├── src/
│ │ │ ├── assets/ # Images, logos, screenshots
│ │ │ ├── components/ # Reusable UI components
│ │ │ ├── hooks/ # Custom React hooks
│ │ │ ├── lib/ # API handlers
│ │ │ ├── pages/ # Admin, Doctor, Patient, Auth
│ │ │ ├── routes/ # Route guards, role-based routing
│ │ │ ├── App.tsx # Main App
│ │ │ └── index.css # Global styles
│ │ ├── package.json, vite.config.ts, tsconfig.json
│ │ └── tailwind.config.cjs, eslint.config.js
│ │
│ ├── Dockerfile
│ ├── docker-compose.yaml
│ ├── pom.xml
│ └── mvnw, mvnw.cmd
│
├── LICENSE
├── README.md
├── Doxyfile # Doxygen configuration
└── scripts/ # Helper scripts (batch/shell)
├── 1-configure-git-hooks.bat
├── 2-create-git-ignore.bat
├── 3-install-package-manager.bat
└── update-submodules.bat
### Start backend
```bat
cd C:\Users\yagiz\Desktop\Project\clinic-management-system\clinic-management-app
mvn spring-boot:run
## 🔐 **Demo Accounts (by role)**
> Use these demo credentials on the frontend login screen.
> **Note:** These are sample accounts for demo/testing only.
| Role | Username | Password |
|---------|----------------|------------|
| ADMIN | **yagizemre** | **615308..** |
| PATIENT | **yagizemre08**| **340635..** |
| DOCTOR | **yagiz1234** | **123456..** |
---
## 📘 **Using Swagger (JWT) & Downloading a Prescription PDF**
1) **Get a JWT token**
- Open Swagger UI: `http://localhost:8080/swagger-ui/index.html`
- Use `/api/auth/login` with one of the accounts above to obtain a token.
- Click **Authorize** (top-right) → paste your token as:
```
Bearer <your-jwt-token>
```
- Example (redacted) token format:
```
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ5YWdpemVtcmUiIiwicm9sZSI6IkFETUlOIi...
```
















