Skip to content

yagizemreozbilge/clinic-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

120 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Clinic Management System

Overview

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.

Releases

CI Release

Platforms

  • Ubuntu badge

  • macOS badge

  • Windows badge

βœ… Test Coverage

Line Method Branch Combined

πŸ“Š UML Diagrams

High-level

  • Use Case
    Use Case

  • Component
    Component Diagram

  • Deployment
    Deployment Diagram

Detailed

  • Class Diagram
    Class Diagram

  • Sequence Diagrams

    • Appointment Create
      Seq - Appointment
    • Login
      Seq - Login
    • Prescription & Mail
      Seq - Prescription

πŸ›  Technologies Used

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

⚑ Quick Start (Windows)

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

πŸ“Έ Screenshots

Swagger UI – User & Prescription Controller

User & Prescription

Swagger UI – Patient β€’ Doctor β€’ MailDiag β€’ Auth Controller

Patient/Doctor/Mail/Auth

Swagger UI – Appointment Controller

Appointment Controller

Swagger UI – Schemas

Schema 1 Schema 2 Schema 3 Schema 4

πŸ’» Frontend (Vite) – How to Run

The frontend is a React + Vite app. During development it runs on http://localhost:5173.

Start (Windows)

CMD

cd C:\Users\yagiz\Desktop\Project\clinic-management-system\frontend npm run dev

Open http://localhost:5173/ in your browser.

Clinic App - Panels

Below are example panels from the Clinic Management System frontend (React + Vite):

πŸ”‘ Admin Panel

Manage doctors and users
Admin Panel

πŸ‘¨β€βš•οΈ Doctor Panel

View daily appointments, approve/cancel them, and create prescriptions
Doctor Panel

πŸ§‘β€πŸ¦° Patient Panel

Book appointments, check statuses, and view prescriptions
Patient Panel

⚠️ Backend Dependency (IMPORTANT)

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.

πŸ“‚ Project Structure

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...
     ```