# dvontetsianos/mc-management-tools architecture

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

- Interactive diagram: https://gitdiagram.com/dvontetsianos/mc-management-tools
- Repository: https://github.com/dvontetsianos/mc-management-tools

## Overview

MC Management Tools is a hotel-operations inventory and administration application. Staff sign in, enter permission-gated workflows such as item management or quick counts, and use frontend services to call the FastAPI backend, which applies business rules and persists operational records in SQLite. The wider product also covers purchasing, movements, requests, lost-and-found, reporting, user administration, and exports. Edges reflect shown routing, calls, or data access; several feature branches are documented by the source inventory but their implementation details were not sampled.

Main entry points: [`app/main.py`](https://github.com/dvontetsianos/mc-management-tools/blob/main/app/main.py) (API and domain handlers), [`frontend/src/App.jsx`](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/App.jsx) (Route dispatcher), [`frontend/src/pages/FnbItems.jsx`](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/FnbItems.jsx) (Department item management), [`frontend/src/pages/quickcount/ItemQuantity.jsx`](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/quickcount/ItemQuantity.jsx) (Quick count)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Access and navigation"]
  node_app["Route dispatcher<br/>[App.jsx]"]
  node_guards["Access guards"]
  node_login["Sign in<br/>[Login.jsx]"]
  node_layout["Navigation shell<br/>[Layout.jsx]"]
  node_auth["Session and identity<br/>[auth.js]"]
end

subgraph group_inventory["Inventory operations"]
  node_items["Department item management<br/>[FnbItems.jsx]"]
  node_itemui["Item dialogs and tables<br/>[ItemTable.jsx]"]
  node_itemsvc["Item API client<br/>[itemService.js]"]
  node_quickcount["Quick count<br/>[ItemQuantity.jsx]"]
  node_locations["Locations and hotels<br/>[locationService.js]"]
  node_catalog["Categories and suppliers<br/>[Categories.jsx]"]
end

subgraph group_operations["Operational workflows"]
  node_purchases["Purchasing history<br/>[Purchases.jsx]"]
  node_movements["Stock movements<br/>[Movements.jsx]"]
  node_requests["Interdepartment requests<br/>[requestService.js]"]
  node_lostfound["Lost and found<br/>[LostFound.jsx]"]
  node_feedback["User feedback<br/>[FeedbackDialog.jsx]"]
end

subgraph group_admin["Administration and insight"]
  node_users["User administration<br/>[Users.jsx]"]
  node_reports["Reports and exports<br/>[SpendReport.jsx]"]
  node_history["Audit history<br/>[History.jsx]"]
end

subgraph group_backend["Backend and persistence"]
  node_backend["API and domain handlers<br/>[main.py]"]
  node_models["Operational data models<br/>[models.py]"]
  node_dbsession["Database sessions<br/>[database.py]"]
  node_sqlite[("SQLite database")]
end

node_staff(("Hotel staff"))

node_staff -->|"opens app"| node_app
node_app -->|"routes to"| node_login
node_app -->|"wraps routes"| node_guards
node_app -->|"routes to"| node_quickcount
node_app -->|"routes to"| node_items
node_login -.->|"authenticates via"| node_auth
node_guards -->|"checks permissions"| node_auth
node_layout -->|"loads pending count"| node_requests
node_items -->|"renders"| node_itemui
node_items -->|"requests item data"| node_itemsvc
node_items -->|"loads locations"| node_locations
node_quickcount -->|"saves counts"| node_itemsvc
node_quickcount -->|"loads locations"| node_locations
node_itemsvc -.->|"calls API"| node_backend
node_users -.->|"admin requests"| node_backend
node_purchases -.->|"loads purchases"| node_backend
node_movements -.->|"loads movements"| node_backend
node_requests -.->|"calls API"| node_backend
node_lostfound -.->|"calls API"| node_backend
node_reports -.->|"requests reports"| node_backend
node_history -.->|"loads history"| node_backend
node_feedback -.->|"submits feedback"| node_backend
node_backend -->|"opens sessions"| node_dbsession
node_backend -->|"queries and updates"| node_models
node_dbsession -->|"connects to"| node_sqlite

click node_app "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/App.jsx"
click node_guards "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/components/PermissionRoute.jsx"
click node_login "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/Login.jsx"
click node_layout "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/components/Layout.jsx"
click node_auth "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/services/auth.js"
click node_items "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/FnbItems.jsx"
click node_itemui "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/components/items/ItemTable.jsx"
click node_itemsvc "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/services/itemService.js"
click node_quickcount "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/quickcount/ItemQuantity.jsx"
click node_locations "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/services/locationService.js"
click node_catalog "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/Categories.jsx"
click node_purchases "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/Purchases.jsx"
click node_movements "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/Movements.jsx"
click node_requests "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/services/requestService.js"
click node_lostfound "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/LostFound.jsx"
click node_feedback "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/components/feedback/FeedbackDialog.jsx"
click node_users "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/Users.jsx"
click node_reports "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/reports/SpendReport.jsx"
click node_history "https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/History.jsx"
click node_backend "https://github.com/dvontetsianos/mc-management-tools/blob/main/app/main.py"
click node_models "https://github.com/dvontetsianos/mc-management-tools/blob/main/app/models.py"
click node_dbsession "https://github.com/dvontetsianos/mc-management-tools/blob/main/app/database.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_app,node_guards,node_login,node_layout,node_auth toneBlue
class node_items,node_itemui,node_itemsvc,node_quickcount,node_locations,node_catalog toneAmber
class node_purchases,node_movements,node_requests,node_lostfound,node_feedback toneMint
class node_users,node_reports,node_history toneRose
class node_backend,node_models,node_dbsession,node_sqlite,node_staff toneIndigo
```

## Components

### Access and navigation

- [Route dispatcher](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Access guards](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/components/PermissionRoute.jsx): `frontend/src/components/PermissionRoute.jsx`
- [Sign in](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Navigation shell](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/components/Layout.jsx): `frontend/src/components/Layout.jsx`
- [Session and identity](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/services/auth.js): `frontend/src/services/auth.js`

### Inventory operations

- [Department item management](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/FnbItems.jsx): `frontend/src/pages/FnbItems.jsx`
- [Item dialogs and tables](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/components/items/ItemTable.jsx): `frontend/src/components/items/ItemTable.jsx`
- [Item API client](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/services/itemService.js): `frontend/src/services/itemService.js`
- [Quick count](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/quickcount/ItemQuantity.jsx): `frontend/src/pages/quickcount/ItemQuantity.jsx`
- [Locations and hotels](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/services/locationService.js): `frontend/src/services/locationService.js`
- [Categories and suppliers](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/Categories.jsx): `frontend/src/pages/Categories.jsx`

### Operational workflows

- [Purchasing history](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/Purchases.jsx): `frontend/src/pages/Purchases.jsx`
- [Stock movements](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/Movements.jsx): `frontend/src/pages/Movements.jsx`
- [Interdepartment requests](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/services/requestService.js): `frontend/src/services/requestService.js`
- [Lost and found](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/LostFound.jsx): `frontend/src/pages/LostFound.jsx`
- [User feedback](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/components/feedback/FeedbackDialog.jsx): `frontend/src/components/feedback/FeedbackDialog.jsx`

### Administration and insight

- [User administration](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/Users.jsx): `frontend/src/pages/Users.jsx`
- [Reports and exports](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/reports/SpendReport.jsx): `frontend/src/pages/reports/SpendReport.jsx`
- [Audit history](https://github.com/dvontetsianos/mc-management-tools/blob/main/frontend/src/pages/History.jsx): `frontend/src/pages/History.jsx`

### Backend and persistence

- [API and domain handlers](https://github.com/dvontetsianos/mc-management-tools/blob/main/app/main.py): `app/main.py`
- [Operational data models](https://github.com/dvontetsianos/mc-management-tools/blob/main/app/models.py): `app/models.py`
- [Database sessions](https://github.com/dvontetsianos/mc-management-tools/blob/main/app/database.py): `app/database.py`
- **SQLite database**

### Other components

- **Hotel staff**

## Connections

- Hotel staff → Route dispatcher: opens app
- Route dispatcher → Sign in: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Access guards: wraps routes (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Quick count: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Department item management: routes to (evidence: `frontend/src/App.jsx`)
- Sign in → Session and identity: authenticates via
- Access guards → Session and identity: checks permissions (evidence: `frontend/src/components/PermissionRoute.jsx`)
- Navigation shell → Interdepartment requests: loads pending count (evidence: `frontend/src/components/Layout.jsx`)
- Department item management → Item dialogs and tables: renders (evidence: `frontend/src/pages/FnbItems.jsx`)
- Department item management → Item API client: requests item data (evidence: `frontend/src/pages/FnbItems.jsx`)
- Department item management → Locations and hotels: loads locations (evidence: `frontend/src/pages/FnbItems.jsx`)
- Quick count → Item API client: saves counts (evidence: `frontend/src/pages/quickcount/ItemQuantity.jsx`)
- Quick count → Locations and hotels: loads locations
- Item API client → API and domain handlers: calls API
- User administration → API and domain handlers: admin requests
- Purchasing history → API and domain handlers: loads purchases
- Stock movements → API and domain handlers: loads movements
- Interdepartment requests → API and domain handlers: calls API
- Lost and found → API and domain handlers: calls API
- Reports and exports → API and domain handlers: requests reports
- Audit history → API and domain handlers: loads history
- User feedback → API and domain handlers: submits feedback
- API and domain handlers → Database sessions: opens sessions (evidence: `app/main.py`)
- API and domain handlers → Operational data models: queries and updates (evidence: `app/main.py`)
- Database sessions → SQLite database: connects to (evidence: `app/database.py`)
