Skip to content

Y3S1-WE20/Medi.Way

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯ MediWay Hospital Management System

Java Spring Boot React MySQL Docker

CI/CD License PRs Welcome

Modern full‑stack healthcare management platform providing appointment scheduling, patient records, administrative analytics, and secure role-based access.


πŸ“‹ Table of Contents


🎯 Project Overview

MediWay unifies patient, doctor and admin experiences into a single system:

  • Streamlined appointment booking & availability management
  • Secure medical record storage and retrieval
  • Real-time reporting & operational insights
  • Containerized deployment (Docker / Compose)
  • CI workflow (GitHub Actions) with backend & frontend test automation + coverage

πŸ”‘ Key Capabilities

  • Appointment Management: Intelligent slot validation prevents double booking (application-level conflict detection, extensible to optimistic locking)
  • Patient Records: Complete visit & diagnosis history with controlled access
  • Administrative Dashboard: Aggregated KPIs, doctor load, cancellations, specialization stats
  • Role-Based Security: Distinct flows for patients, doctors, and admins (separate login paths)
  • Exportable Reports: PDF & CSV generation (OpenPDF)
  • QR Code Integration: Fast patient identification via ZXing

✨ Features

πŸ₯ Appointment Scheduling System

  • Doctor Availability & 30‑minute time slots
  • Conflict Prevention: Checks existing appointments before persistence
  • Status Lifecycle: PENDING β†’ CONFIRMED/REJECTED β†’ CANCELLED
  • Reschedule & Cancellation endpoints
  • Extensible for future concurrency strategies (optimistic/pessimistic locking)

πŸ‘₯ Patient Management

  • Rich Profile Data: Core identity & emergency contacts
  • Medical Records CRUD: Diagnoses, treatments, notes
  • QR Code Generation for quick retrieval
  • Secure Access Boundaries (service layer separation & profile scoping)

πŸ“Š Administrative Dashboard

  • Workload Analytics: Appointments per doctor per day
  • Demographics & Registration Trends
  • Specialization & cancellation summaries
  • Export: One‑click PDF or CSV downloads

πŸ› οΈ Tech Stack

Frontend

React React Router Testing Library Nginx

Backend

Java Spring Boot Spring Security Maven

Database

MySQL H2 Hibernate

DevOps & Tools

Docker Docker Compose GitHub Actions JaCoCo

Libraries & Integration

OpenPDF ZXing


πŸ”„ Architecture Flow

graph LR
    A[React SPA<br/>nginx] -->|REST API| B[Spring Boot<br/>Java 17]
    B -->|JPA/Hibernate| C[(MySQL/H2)]
    B -->|Generate| D[Reports<br/>PDF/CSV]
    B -->|Create| E[QR Codes<br/>ZXing]
Loading

πŸ“¦ Prerequisites

Node.js Java Docker Maven

  • Node.js β‰₯ 18.x
  • Java 17 (Temurin recommended)
  • Docker Desktop for container-based workflow
  • Maven wrapper included (./mvnw)

πŸš€ Installation & Setup

Quick Start (Recommended - Docker)

The fastest way to run the entire application:

# Clone the repository
git clone https://github.com/Y3S1-WE20/Medi.Way.git
cd Medi.Way

# Start all services with Docker Compose
docker-compose up --build

# Access the application
# Frontend: http://localhost:3000
# Backend API: http://localhost:8080
# MySQL: localhost:3306

Manual Setup

1. Clone

git clone https://github.com/Y3S1-WE20/Medi.Way.git
cd Medi.Way

2. Frontend Setup

cd frontend
npm install
npm start   # http://localhost:3000

3. Backend Setup

In another terminal:

cd backend
./mvnw spring-boot:run   # http://localhost:8080

Note: Backend will use H2 in-memory database by default. For MySQL, configure application.properties or use Docker setup. By default expects MySQL; for tests / light dev switch to H2 by exporting:

export SPRING_PROFILES_ACTIVE=test

πŸ§ͺ Testing

πŸ”§ Backend Testing

cd backend
./mvnw test

πŸ“Š Coverage report generated at backend/target/site/jacoco/index.html

βš›οΈ Frontend Testing

cd frontend
npm test -- --watchAll=false

🐳 Docker Deployment

πŸš€ Quick Start

Build & run all services (MySQL + backend + frontend):

docker compose up --build

🌐 Access Services

Service URL Port
🎨 Frontend http://localhost:3000 3000
βš™οΈ Backend http://localhost:8080 8080
πŸ—„οΈ MySQL localhost:3306 3306

πŸ›‘ Tear Down

docker compose down

πŸ”„ Reset Database

docker compose down -v

βš™οΈ Configuration

Variable Purpose Example
πŸ”§ SPRING_PROFILES_ACTIVE Choose profile (test uses H2) test
πŸ—„οΈ SPRING_DATASOURCE_URL JDBC URL when using MySQL jdbc:mysql://db:3306/mediway
🌐 REACT_APP_API_BASE_URL Frontend build-time API base http://localhost:8080
β˜• JAVA_OPTS JVM tuning flags -Xms256m -Xmx512m

πŸ”„ CI/CD

GitHub Actions

Automated Pipeline includes:

  • βœ… Backend: Maven build + tests + JaCoCo coverage artifact
  • βœ… Frontend: Install, lint (optional), tests, build artifact
  • βœ… Combined summary job for status aggregation

πŸ›‘οΈ Security

Spring Security

Security Features:

  • πŸ” Separate login routes for Admin, Doctor, and Patient
  • πŸ”’ Password hashing via Spring Security Crypto
  • 🎯 Role-based access control (RBAC)
  • πŸš€ Expandable for JWT/session authentication

🌟 Made with ❀️ by the MediWay Team

GitHub Stars GitHub Forks

If you find this project helpful, please consider giving it a ⭐!

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •