A full-stack medical appointment management system built with a Spring Boot REST API backend and a JavaFX desktop frontend. Three user roles Admin, Doctor, and Patient each get their own dashboard with role-appropriate functionality.
Backend
- Java 17
- Spring Boot 4.x
- MySQL
- BCrypt password hashing
- JUnit 5 + Mockito
Frontend
- Java 17
- JavaFX 17
- Jackson (JSON parsing)
- TestFX (UI testing)
- Mockito
patient-portal/
├── Backend/ # Spring Boot REST API
│ └── src/
│ └── main/java/com/HamesJoman/patient_portal/
│ ├── controllers/ # REST endpoints (Auth, User, Appointment)
│ ├── dto/ # Request/response data transfer objects
│ ├── models/ # JPA entities (User, Patient, Doctor, Admin, Appointment)
│ ├── repositories/ # Spring Data JPA repositories
│ └── services/ # Business logic
└── Frontend/ # JavaFX desktop application
└── src/
└── main/java/com/HamesJoman/patientportalguiapp/
├── controllers/ # JavaFX controllers by role (Admin, Doctor, Patient, Shared)
├── ApiClient.java # HTTPS HTTP client
└── SessionManager.java # Singleton session state
- Java 17 (required for both backend and frontend)
- Maven (or use the included
mvnwwrapper) - MySQL — download from https://dev.mysql.com/downloads/
- Windows: use the installer at the bottom of the page
- Linux: install via your package manager (e.g.
sudo apt install mysql-server)
- Install MySQL and start the server.
- Create a database named
patient_portal:CREATE DATABASE patient_portal;
- Note your MySQL username, password, and port (default is
3306; the template uses3308adjust as needed).
-
Navigate to
patient-portal/Backend/. -
Copy the properties template and fill in your database credentials:
src/main/resources/application.properties.template → src/main/resources/application.propertiesUpdate these fields:
spring.datasource.url=jdbc:mysql://localhost:3306/patient_portal spring.datasource.username=YOUR_USERNAME spring.datasource.password=YOUR_PASSWORD
-
Run the backend:
./mvnw spring-boot:run
Or with the jar file
java -jar patient-portal-0.0.1-SNAPSHOT.jar
The server starts on port 8443 (HTTPS). Spring will auto-create the database schema on first run.
-
Verify the API is running by hitting
https://localhost:8443/api/usersin Postman. If you get a 200 (empty array), you're good.
Note: The backend uses a self-signed SSL certificate. You'll need to accept the cert in Postman (
Settings → SSL certificate verification → OFF) or your HTTP client.
- Navigate to
patient-portal/Frontend/. - Run the desktop application:
./mvnw javafx:run
- Log in with any user account you've created through the API. The app will redirect you to the correct dashboard based on your role.
All endpoints are prefixed with /api.
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/login |
Authenticate and get user info |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/users |
Get all users |
GET |
/api/users/{id} |
Get user by ID |
POST |
/api/users |
Create a user (role: patient, doctor, or admin) |
PUT |
/api/users/{id} |
Update a user (leave password blank to keep unchanged) |
PATCH |
/api/users/{id}/change-password |
Change a user's password |
DELETE |
/api/users/{id} |
Delete a user (cancels their active appointments) |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/appointments |
Get all appointments |
GET |
/api/appointments/{id} |
Get appointment by ID |
GET |
/api/appointments/patient/{id} |
Get appointments for a patient |
GET |
/api/appointments/doctor/{id} |
Get appointments for a doctor |
POST |
/api/appointments |
Create an appointment |
PUT |
/api/appointments/{id} |
Update an appointment (ACTIVE only) |
PUT |
/api/appointments/{id}/cancel |
Cancel an appointment |
Appointment request body:
{
"date": "YYYY-MM-DD",
"startTime": "HH:mm",
"endTime": "HH:mm",
"patientId": 1,
"doctorId": 2
}Appointment statuses: ACTIVE → CANCELLED or FINISHED (auto-set when the end time passes)
cd patient-portal/Backend
./mvnw testTests use an in-memory H2 database and Mockito mocks — no MySQL required.
cd patient-portal/Frontend
./mvnw testIncludes unit tests (logic + SessionManager) and UI tests (TestFX). UI tests require a display; on headless servers, use a virtual display like Xvfb.
Note: Frontend tests must be run on Java 17. Other versions will not work.
Team Hames Joman
- Collin Fair — Lead Dev
- Nathan Amidon — AppointmentService, AppointmentController, backend tests
- Liam Callahan — Frontend UI, DeleteUserController, PasswordChangeController
- Corey Suhr — Cancel/Update appointment controllers, confirmation flow
- Mohamed Musa — ViewAppointmentsController, ViewUsersController, backend unit tests
- Ali Beheshti — Backend unit tests