Skip to content

About

Spring Boot + JWT + JPA | Clinical appointment and prescription management

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

120 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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




About

Spring Boot + JWT + JPA | Clinical appointment and prescription management

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages