# pentorex/bazy_danych_projekt architecture

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

- Interactive diagram: https://gitdiagram.com/pentorex/bazy_danych_projekt
- Repository: https://github.com/pentorex/bazy_danych_projekt

## Overview

CargoVector EKL is a web application for railway operations, with role-specific employee dashboards and a passenger-facing journey and ticket workflow. The frontend routes authentication and dashboard entry, selects a panel by role, and exposes operational modules that call the Django API; the backend routes API requests through views, serializers, and domain models. README and sampled sources support the product scope, but most frontend modules and API endpoints were not inspected, so their internal links are not expanded.

Main entry points: [`frontend/src/components/panele_uzytkownikow`](https://github.com/pentorex/bazy_danych_projekt/tree/main/frontend/src/components/panele_uzytkownikow) (Staff dashboards), [`frontend/src/App.jsx`](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/App.jsx) (Web entry and routes), [`backend/ekl/urls.py`](https://github.com/pentorex/bazy_danych_projekt/blob/main/backend/ekl/urls.py) (Django API endpoints), [`frontend/src/components/panele_funkcyjne/Lokomotywy.jsx`](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/Lokomotywy.jsx) (Fleet and locomotive data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_webapp["Web entry and routes<br/>[App.jsx]"]
  node_auth["Login and account recovery"]
  node_role["Role dashboard selection<br/>[Dashboard.jsx]"]
  node_staffdash["Staff dashboards"]
  node_layout["Dashboard navigation<br/>[MainLayout.jsx]"]
  node_railops["Rail operations<br/>[Pociagi.jsx]"]
  node_fleet["Fleet and locomotive data<br/>[Lokomotywy.jsx]"]
  node_series["Locomotive series<br/>[SerieLokomotyw.jsx]"]
  node_trainforms["Train forms and summary"]
  node_people["Personnel management"]
  node_schedules["Schedules and notices<br/>[WyswietlGrafik.jsx]"]
  node_passenger["Passenger search and booking"]
  node_wars["Passenger journey view<br/>[Wars.jsx]"]
end

subgraph group_backend["API and domain"]
  node_api["Django API endpoints<br/>[urls.py]"]
  node_views["Request handling<br/>[views.py]"]
  node_serializers["API serialization<br/>[serializers.py]"]
  node_domain["Rail domain models<br/>[models.py]"]
  node_db[("Application database")]
end

node_user(("Employee or passenger"))

node_user -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_auth
node_webapp -->|"routes to"| node_role
node_webapp -->|"routes to"| node_passenger
node_webapp -->|"routes to"| node_wars
node_role -->|"selects by role"| node_staffdash
node_staffdash -->|"renders"| node_layout
node_staffdash -->|"renders"| node_railops
node_staffdash -->|"renders"| node_fleet
node_staffdash -->|"renders"| node_series
node_staffdash -->|"renders"| node_people
node_staffdash -->|"renders"| node_schedules
node_railops -->|"renders"| node_trainforms
node_fleet -->|"renders"| node_series
node_passenger -.->|"fetches journeys and bookings"| node_api
node_fleet -->|"fetches and updates"| node_api
node_people -->|"fetches and updates"| node_api
node_series -->|"fetches and updates"| node_api
node_api -->|"routes requests"| node_views
node_views -->|"serializes responses"| node_serializers
node_views -->|"queries and updates"| node_domain
node_domain -.->|"persists domain state"| node_db

click node_webapp "https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/App.jsx"
click node_auth "https://github.com/pentorex/bazy_danych_projekt/tree/main/frontend/src/components/logowanie_reset_hasla"
click node_role "https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/Dashboard.jsx"
click node_staffdash "https://github.com/pentorex/bazy_danych_projekt/tree/main/frontend/src/components/panele_uzytkownikow"
click node_layout "https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/MainLayout.jsx"
click node_railops "https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/Pociagi.jsx"
click node_fleet "https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/Lokomotywy.jsx"
click node_series "https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/SerieLokomotyw.jsx"
click node_trainforms "https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/PociagFormularzModal.jsx"
click node_people "https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/ZarzadzajPersonelem.jsx"
click node_schedules "https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/WyswietlGrafik.jsx"
click node_passenger "https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_uzytkownikow/PasazerDashboard.jsx"
click node_wars "https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/Wars/Wars.jsx"
click node_api "https://github.com/pentorex/bazy_danych_projekt/blob/main/backend/ekl/urls.py"
click node_views "https://github.com/pentorex/bazy_danych_projekt/blob/main/backend/ekl/views.py"
click node_serializers "https://github.com/pentorex/bazy_danych_projekt/blob/main/backend/ekl/serializers.py"
click node_domain "https://github.com/pentorex/bazy_danych_projekt/blob/main/backend/ekl/models.py"

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_webapp,node_auth,node_role,node_staffdash,node_layout,node_railops,node_fleet,node_series,node_trainforms,node_people,node_schedules,node_passenger,node_wars toneBlue
class node_api,node_views,node_serializers,node_domain,node_db toneAmber
class node_user toneIndigo
```

## Components

### Web application

- [Web entry and routes](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Login and account recovery](https://github.com/pentorex/bazy_danych_projekt/tree/main/frontend/src/components/logowanie_reset_hasla): `frontend/src/components/logowanie_reset_hasla`
- [Role dashboard selection](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/Dashboard.jsx): `frontend/src/components/Dashboard.jsx`
- [Staff dashboards](https://github.com/pentorex/bazy_danych_projekt/tree/main/frontend/src/components/panele_uzytkownikow): `frontend/src/components/panele_uzytkownikow`
- [Dashboard navigation](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/MainLayout.jsx): `frontend/src/components/MainLayout.jsx`
- [Rail operations](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/Pociagi.jsx): `frontend/src/components/panele_funkcyjne/Pociagi.jsx`
- [Fleet and locomotive data](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/Lokomotywy.jsx): `frontend/src/components/panele_funkcyjne/Lokomotywy.jsx`
- [Locomotive series](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/SerieLokomotyw.jsx): `frontend/src/components/panele_funkcyjne/SerieLokomotyw.jsx`
- [Train forms and summary](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/PociagFormularzModal.jsx): `frontend/src/components/panele_funkcyjne/PociagFormularzModal.jsx`
- [Personnel management](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/ZarzadzajPersonelem.jsx): `frontend/src/components/panele_funkcyjne/ZarzadzajPersonelem.jsx`
- [Schedules and notices](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_funkcyjne/WyswietlGrafik.jsx): `frontend/src/components/panele_funkcyjne/WyswietlGrafik.jsx`
- [Passenger search and booking](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/panele_uzytkownikow/PasazerDashboard.jsx): `frontend/src/components/panele_uzytkownikow/PasazerDashboard.jsx`
- [Passenger journey view](https://github.com/pentorex/bazy_danych_projekt/blob/main/frontend/src/components/Wars/Wars.jsx): `frontend/src/components/Wars/Wars.jsx`

### API and domain

- [Django API endpoints](https://github.com/pentorex/bazy_danych_projekt/blob/main/backend/ekl/urls.py): `backend/ekl/urls.py`
- [Request handling](https://github.com/pentorex/bazy_danych_projekt/blob/main/backend/ekl/views.py): `backend/ekl/views.py`
- [API serialization](https://github.com/pentorex/bazy_danych_projekt/blob/main/backend/ekl/serializers.py): `backend/ekl/serializers.py`
- [Rail domain models](https://github.com/pentorex/bazy_danych_projekt/blob/main/backend/ekl/models.py): `backend/ekl/models.py`
- **Application database**

### Other components

- **Employee or passenger**

## Connections

- Employee or passenger → Web entry and routes: uses (evidence: `frontend/src/App.jsx`)
- Web entry and routes → Login and account recovery: routes to (evidence: `frontend/src/App.jsx`)
- Web entry and routes → Role dashboard selection: routes to (evidence: `frontend/src/App.jsx`)
- Web entry and routes → Passenger search and booking: routes to (evidence: `frontend/src/App.jsx`)
- Web entry and routes → Passenger journey view: routes to (evidence: `frontend/src/App.jsx`)
- Role dashboard selection → Staff dashboards: selects by role (evidence: `frontend/src/components/Dashboard.jsx`)
- Staff dashboards → Dashboard navigation: renders (evidence: `frontend/src/components/panele_uzytkownikow/DyspozytorDashboard.jsx`)
- Staff dashboards → Rail operations: renders (evidence: `frontend/src/components/panele_uzytkownikow/DyspozytorDashboard.jsx`)
- Staff dashboards → Fleet and locomotive data: renders (evidence: `frontend/src/components/panele_uzytkownikow/DyspozytorDashboard.jsx`)
- Staff dashboards → Locomotive series: renders (evidence: `frontend/src/components/panele_uzytkownikow/DyspozytorDashboard.jsx`)
- Staff dashboards → Personnel management: renders (evidence: `frontend/src/components/panele_uzytkownikow/DyspozytorDashboard.jsx`)
- Staff dashboards → Schedules and notices: renders (evidence: `frontend/src/components/panele_uzytkownikow/DyspozytorDashboard.jsx`)
- Rail operations → Train forms and summary: renders (evidence: `frontend/src/components/panele_funkcyjne/Pociagi.jsx`)
- Fleet and locomotive data → Locomotive series: renders (evidence: `frontend/src/components/panele_funkcyjne/Lokomotywy.jsx`)
- Passenger search and booking → Django API endpoints: fetches journeys and bookings
- Fleet and locomotive data → Django API endpoints: fetches and updates (evidence: `frontend/src/components/panele_funkcyjne/Lokomotywy.jsx`)
- Personnel management → Django API endpoints: fetches and updates (evidence: `frontend/src/components/panele_funkcyjne/ZarzadzajPersonelem.jsx`)
- Locomotive series → Django API endpoints: fetches and updates (evidence: `frontend/src/components/panele_funkcyjne/SerieLokomotyw.jsx`)
- Django API endpoints → Request handling: routes requests (evidence: `backend/ekl/urls.py`)
- Request handling → API serialization: serializes responses (evidence: `backend/ekl/views.py`)
- Request handling → Rail domain models: queries and updates (evidence: `backend/ekl/views.py`)
- Rail domain models → Application database: persists domain state
