Skip to content

nmichel159/scheduling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hospital Shift Optimization & Scheduling System

An automated scheduling and shift optimization platform designed for hospital clinics (such as the Louis Pasteur University Hospital). The system balances staff availability, specialized qualifications, and complex clinical constraints using Mathematical Optimization.


πŸš€ Project Overview

The application streamlines clinical scheduling by dividing the workflow into two major pillars:

  1. Core Administration & Tracking (Phase 1):
  • Employees: Log in to submit their unavailabilities and manage their medical qualifications.
  • Clinic Managers: Oversee specific clinics, manually adjust schedules, and manage staff constraints.
  1. Automated Optimization (Phase 2):
  • Uses a Linear Programming (LP) solver to automatically construct optimal monthly or weekly shift schedules, fully respecting employee unavailabilities and required clinical credentials.

πŸ› οΈ Technical Stack

  • Frontend: React, Vite, TypeScript, Zustand (State Management), Axios
  • Backend: Python (FastAPI), SQLAlchemy (ORM), Alembic (Migrations)
  • Database: PostgreSQL
  • Containerization: Docker & Docker Compose

πŸ“‚ Project Structure

β”œβ”€β”€ .agents/
β”‚   └── rules/              # Custom behavioral guidelines for AI development agents
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/            # FastAPI REST endpoints
β”‚   β”‚   β”œβ”€β”€ models/         # SQLAlchemy ORM models
β”‚   β”‚   β”œβ”€β”€ schemas/        # Pydantic data validation and serialization
β”‚   β”‚   └── services/       # Core business logic and LP optimization algorithms
β”‚   └── database/           # DB engine sessions and migrations
β”œβ”€β”€ frontend/
β”‚   └── src/
β”‚       β”œβ”€β”€ api/            # API client configurations (Axios)
β”‚       β”œβ”€β”€ components/     # Reusable UI component library
β”‚       β”œβ”€β”€ stores/         # Global application state (Zustand)
β”‚       └── views/          # Page layouts (Manager Board, Calendars)
β”œβ”€β”€ docker-compose.yml      # Orchestrates Python, React, and PostgreSQL containers
└── CONTEXT.md              # Global technical architectural context


⚑ Quick Start (Docker Deployment)

The easiest way to run the entire stack (React frontend, FastAPI backend, and PostgreSQL database) is using Docker Compose.

Prerequisites

Make sure you have Docker and Docker Compose installed on your system.

Running the Application

  1. Clone the repository and navigate to the root directory:
git clone <repository-url>
cd scheduling
  1. Spin up the containers in detached mode:
docker compose up -d --build

This command automatically:

  • Builds the React frontend container.
  • Builds the Python FastAPI backend container.
  • Pulls and initializes the PostgreSQL database.
  • Links them all under a single shared network.
  1. Verify the services are running:
docker compose ps
  1. Access the applications:

Stopping the Services

To stop and remove all containers, networks, and associated volumes:

docker compose down -v

πŸ§‘β€πŸ’» Development Rules & Guidelines

If you are modifying this project or using an AI developer agent (like Antigravity), you must strictly adhere to the contracts defined in .agents/rules/:

  • global.md: Enforces strict English code, docstrings, type hinting, and structural modularity.
  • backend.md: Mandates a strict 1:1:1 domain decoupling (SQLAlchemy Models ↔ Pydantic Schemas ↔ FastAPI Routers).
  • database.md: Outlines transaction safety boundaries and Alembic migration protocols.
  • database-schema.md: Defines the exact relational database layout.

About

πŸ₯ Hospital shift scheduling platform. Optimizes clinical rotas with Linear Programming 🧠 | Built via Agentic Workflow πŸ€– with FastAPI ⚑ & React βš›οΈ

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors