# justanothercodingirl/shift-planner architecture

> Architecture diagram of the GitHub repository justanothercodingirl/shift-planner, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/justanothercodingirl/shift-planner
- Repository: https://github.com/justanothercodingirl/shift-planner

## Overview

The repository presents Shift Planner as a café/restaurant rostering tool: managers prepare weekly rosters, employees view shifts, submit availability, and swap shifts, subject to rules. The sampled implementation does not yet show those scheduling workflows: the frontend is the stock Vite/React starter, and the backend exposes manager-only employee CRUD. Its visible path is request → controller → service → repositories/entities → database. The README documents intended capabilities, but no schedule, availability, swap, or rule-enforcement modules appear in the tree; unsampled wiring is not inferred.

Main entry points: [`backend/src/Service/EmployeeService.php`](https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Service/EmployeeService.php) (Employee service), [`backend/src/Controller/EmployeeController.php`](https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Controller/EmployeeController.php) (Employee controller), [`frontend/src/App.jsx`](https://github.com/justanothercodingirl/shift-planner/blob/main/frontend/src/App.jsx) (Starter UI), [`backend/src/Dto/EmployeeResponse.php`](https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Dto/EmployeeResponse.php) (Employee response)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_app["Starter UI<br/>[App.jsx]"]
end

subgraph group_api["Employee API"]
  node_controller["Employee controller"]
  node_requestdto["Request DTOs"]
  node_response["Employee response"]
  node_service["Employee service"]
end

subgraph group_data["Employee data"]
  node_employee_repo["Employee repository"]
  node_user_repo["User repository<br/>[UserRepository.php]"]
  node_employee_entity["Employee entity<br/>[Employee.php]"]
  node_user_entity["User entity<br/>[User.php]"]
  node_database[("Relational database")]
end

node_manager(("Manager"))
node_employee(("Employee"))

node_manager -->|"manages employees"| node_controller
node_employee -.->|"uses app"| node_app
node_app -.->|"calls API"| node_controller
node_controller -->|"delegates"| node_service
node_controller -->|"accepts payloads"| node_requestdto
node_controller -->|"formats results"| node_response
node_service -->|"reads and saves"| node_employee_repo
node_service -->|"checks email"| node_user_repo
node_service -->|"creates and updates"| node_employee_entity
node_service -->|"creates account"| node_user_entity
node_employee_repo -->|"persists employee"| node_database
node_user_repo -->|"queries users"| node_database
node_response -->|"maps entity"| node_employee_entity

click node_app "https://github.com/justanothercodingirl/shift-planner/blob/main/frontend/src/App.jsx"
click node_controller "https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Controller/EmployeeController.php"
click node_requestdto "https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Dto/CreateEmployeeRequest.php"
click node_response "https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Dto/EmployeeResponse.php"
click node_service "https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Service/EmployeeService.php"
click node_employee_repo "https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Repository/EmployeeRepository.php"
click node_user_repo "https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Repository/UserRepository.php"
click node_employee_entity "https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Entity/Employee.php"
click node_user_entity "https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Entity/User.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app toneBlue
class node_controller,node_requestdto,node_response,node_service toneAmber
class node_employee_repo,node_user_repo,node_employee_entity,node_user_entity,node_database toneMint
class node_manager,node_employee toneIndigo
```

## Components

### Frontend

- [Starter UI](https://github.com/justanothercodingirl/shift-planner/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### Employee API

- [Employee controller](https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Controller/EmployeeController.php): `backend/src/Controller/EmployeeController.php`
- [Request DTOs](https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Dto/CreateEmployeeRequest.php): `backend/src/Dto/CreateEmployeeRequest.php`
- [Employee response](https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Dto/EmployeeResponse.php): `backend/src/Dto/EmployeeResponse.php`
- [Employee service](https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Service/EmployeeService.php): `backend/src/Service/EmployeeService.php`

### Employee data

- [Employee repository](https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Repository/EmployeeRepository.php): `backend/src/Repository/EmployeeRepository.php`
- [User repository](https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Repository/UserRepository.php): `backend/src/Repository/UserRepository.php`
- [Employee entity](https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Entity/Employee.php): `backend/src/Entity/Employee.php`
- [User entity](https://github.com/justanothercodingirl/shift-planner/blob/main/backend/src/Entity/User.php): `backend/src/Entity/User.php`
- **Relational database**

### Other components

- **Manager**
- **Employee**

## Connections

- Manager → Employee controller: manages employees (evidence: `backend/src/Controller/EmployeeController.php`)
- Employee → Starter UI: uses app (evidence: `README.md`)
- Starter UI → Employee controller: calls API
- Employee controller → Employee service: delegates (evidence: `backend/src/Controller/EmployeeController.php`)
- Employee controller → Request DTOs: accepts payloads (evidence: `backend/src/Controller/EmployeeController.php`)
- Employee controller → Employee response: formats results (evidence: `backend/src/Controller/EmployeeController.php`)
- Employee service → Employee repository: reads and saves (evidence: `backend/src/Service/EmployeeService.php`)
- Employee service → User repository: checks email (evidence: `backend/src/Service/EmployeeService.php`)
- Employee service → Employee entity: creates and updates (evidence: `backend/src/Service/EmployeeService.php`)
- Employee service → User entity: creates account (evidence: `backend/src/Service/EmployeeService.php`)
- Employee repository → Relational database: persists employee (evidence: `backend/src/Repository/EmployeeRepository.php`)
- User repository → Relational database: queries users (evidence: `backend/src/Repository/UserRepository.php`)
- Employee response → Employee entity: maps entity (evidence: `backend/src/Dto/EmployeeResponse.php`)
