# ascendrachel/florida-3pl-v2 architecture

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

- Interactive diagram: https://gitdiagram.com/ascendrachel/florida-3pl-v2
- Repository: https://github.com/ascendrachel/florida-3pl-v2

## Overview

Florida 3PL is a Rust/MariaDB warehouse order-management app that preserves the previous web interface and API behavior. Staff use its tabs to manage orders, scan packages, track returns and inventory, import spreadsheets, and perform team and admin tasks. The graph includes the documented browser-to-API entry point and the principal domain modules. Edges reflect explicit routes, excerpts, source-index references, or README statements; unsampled modules are included where their role is documented, but their internal calls are not inferred.

Main entry points: [`src/routes.rs`](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/routes.rs) (API router), [`src/orders_write.rs`](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/orders_write.rs) (Order writes), [`src/team_api.rs`](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/team_api.rs) (Team management), [`src/sheet_import.rs`](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/sheet_import.rs) (Sheet import)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Staff interface"]
  node_web["Web views"]
end

subgraph group_api["HTTP API"]
  node_router["API router<br/>[routes.rs]"]
  node_orders_api["Orders API<br/>[orders_api.rs]"]
  node_team["Team management<br/>[team_api.rs]"]
  node_admin["Admin tools<br/>[admin_api.rs]"]
end

subgraph group_operations["Warehouse workflows"]
  node_order_writes["Order writes<br/>[orders_write.rs]"]
  node_scan["Package scanning<br/>[scan.rs]"]
  node_dashboard["Dashboard<br/>[dashboard.rs]"]
  node_returns["Returns and stock<br/>[returns.rs]"]
  node_amazon["Amazon import<br/>[amazon.rs]"]
  node_sheet_import["Sheet import<br/>[sheet_import.rs]"]
  node_legacy_import["Legacy data import<br/>[import.rs]"]
  node_checklist["Checklist<br/>[checklist.rs]"]
  node_notifications["Notifications<br/>[notify.rs]"]
  node_worklog["Work log<br/>[drive.rs]"]
end

subgraph group_platform["Identity and data"]
  node_auth["Sign-in and roles<br/>[auth.rs]"]
  node_schema["Order schema<br/>[schema.rs]"]
  node_settings["App settings<br/>[settings.rs]"]
  node_filters["Order filters<br/>[filters.rs]"]
  node_clock["Eastern time<br/>[clock.rs]"]
  node_mariadb[("MariaDB")]
end

node_staff(("Warehouse staff"))
node_google_sheets["Shared Google Sheet"]

node_staff -->|"uses"| node_web
node_web -->|"calls /api"| node_router
node_router -->|"routes sign-in"| node_auth
node_router -->|"routes orders"| node_orders_api
node_router -->|"routes scans"| node_scan
node_router -->|"routes import"| node_amazon
node_router -->|"routes upload"| node_sheet_import
node_router -->|"routes writes"| node_order_writes
node_router -->|"routes admin"| node_admin
node_router -->|"routes feed"| node_notifications
node_router -->|"routes dashboard"| node_dashboard
node_router -->|"routes team"| node_team
node_router -->|"routes checklist"| node_checklist
node_order_writes -->|"reads schema"| node_schema
node_order_writes -->|"loads locks"| node_settings
node_order_writes -->|"records events"| node_notifications
node_scan -->|"updates orders"| node_order_writes
node_returns -->|"uses transaction helpers"| node_order_writes
node_amazon -->|"writes order data"| node_order_writes
node_sheet_import -->|"uses import logic"| node_amazon
node_sheet_import -->|"uses import logic"| node_legacy_import
node_sheet_import -->|"uses write helpers"| node_order_writes
node_dashboard -->|"uses filters"| node_filters
node_dashboard -->|"reads settings"| node_settings
node_team -->|"uses accounts"| node_auth
node_team -->|"uses work log"| node_worklog
node_team -->|"uses settings"| node_settings
node_auth -->|"uses time"| node_clock
node_returns -->|"syncs sheet"| node_google_sheets
node_legacy_import -->|"imports records"| node_mariadb
node_schema -->|"loads definitions"| node_mariadb
node_settings -->|"reads and writes"| node_mariadb

click node_web "https://github.com/ascendrachel/florida-3pl-v2/tree/main/web/static/js"
click node_router "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/routes.rs"
click node_auth "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/auth.rs"
click node_orders_api "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/orders_api.rs"
click node_order_writes "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/orders_write.rs"
click node_schema "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/schema.rs"
click node_scan "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/scan.rs"
click node_dashboard "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/dashboard.rs"
click node_returns "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/returns.rs"
click node_amazon "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/amazon.rs"
click node_sheet_import "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/sheet_import.rs"
click node_legacy_import "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/import.rs"
click node_checklist "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/checklist.rs"
click node_team "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/team_api.rs"
click node_admin "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/admin_api.rs"
click node_notifications "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/notify.rs"
click node_worklog "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/drive.rs"
click node_settings "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/settings.rs"
click node_filters "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/filters.rs"
click node_clock "https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/clock.rs"

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_web toneBlue
class node_router,node_orders_api,node_team,node_admin toneAmber
class node_order_writes,node_scan,node_dashboard,node_returns,node_amazon,node_sheet_import,node_legacy_import,node_checklist,node_notifications,node_worklog toneMint
class node_auth,node_schema,node_settings,node_filters,node_clock,node_mariadb toneRose
class node_staff,node_google_sheets toneIndigo
```

## Components

### Staff interface

- [Web views](https://github.com/ascendrachel/florida-3pl-v2/tree/main/web/static/js): `web/static/js`

### HTTP API

- [API router](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/routes.rs): `src/routes.rs`
- [Orders API](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/orders_api.rs): `src/orders_api.rs`
- [Team management](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/team_api.rs): `src/team_api.rs`
- [Admin tools](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/admin_api.rs): `src/admin_api.rs`

### Warehouse workflows

- [Order writes](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/orders_write.rs): `src/orders_write.rs`
- [Package scanning](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/scan.rs): `src/scan.rs`
- [Dashboard](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/dashboard.rs): `src/dashboard.rs`
- [Returns and stock](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/returns.rs): `src/returns.rs`
- [Amazon import](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/amazon.rs): `src/amazon.rs`
- [Sheet import](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/sheet_import.rs): `src/sheet_import.rs`
- [Legacy data import](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/import.rs): `src/import.rs`
- [Checklist](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/checklist.rs): `src/checklist.rs`
- [Notifications](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/notify.rs): `src/notify.rs`
- [Work log](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/drive.rs): `src/drive.rs`

### Identity and data

- [Sign-in and roles](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/auth.rs): `src/auth.rs`
- [Order schema](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/schema.rs): `src/schema.rs`
- [App settings](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/settings.rs): `src/settings.rs`
- [Order filters](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/filters.rs): `src/filters.rs`
- [Eastern time](https://github.com/ascendrachel/florida-3pl-v2/blob/main/src/clock.rs): `src/clock.rs`
- **MariaDB**

### Other components

- **Warehouse staff**
- **Shared Google Sheet**

## Connections

- Warehouse staff → Web views: uses (evidence: `README.md`)
- Web views → API router: calls /api (evidence: `README.md`)
- API router → Sign-in and roles: routes sign-in (evidence: `src/routes.rs`)
- API router → Orders API: routes orders (evidence: `src/routes.rs`)
- API router → Package scanning: routes scans (evidence: `src/routes.rs`)
- API router → Amazon import: routes import (evidence: `src/routes.rs`)
- API router → Sheet import: routes upload (evidence: `src/routes.rs`)
- API router → Order writes: routes writes (evidence: `src/routes.rs`)
- API router → Admin tools: routes admin (evidence: `src/routes.rs`)
- API router → Notifications: routes feed (evidence: `src/routes.rs`)
- API router → Dashboard: routes dashboard (evidence: `src/routes.rs`)
- API router → Team management: routes team (evidence: `src/routes.rs`)
- API router → Checklist: routes checklist (evidence: `src/routes.rs`)
- Order writes → Order schema: reads schema (evidence: `src/orders_write.rs`)
- Order writes → App settings: loads locks (evidence: `src/orders_write.rs`)
- Order writes → Notifications: records events (evidence: `src/orders_write.rs`)
- Package scanning → Order writes: updates orders (evidence: `src/scan.rs`)
- Returns and stock → Order writes: uses transaction helpers (evidence: `src/returns.rs`)
- Amazon import → Order writes: writes order data (evidence: `src/amazon.rs`)
- Sheet import → Amazon import: uses import logic (evidence: `src/sheet_import.rs`)
- Sheet import → Legacy data import: uses import logic (evidence: `src/sheet_import.rs`)
- Sheet import → Order writes: uses write helpers (evidence: `src/sheet_import.rs`)
- Dashboard → Order filters: uses filters (evidence: `src/dashboard.rs`)
- Dashboard → App settings: reads settings (evidence: `src/dashboard.rs`)
- Team management → Sign-in and roles: uses accounts (evidence: `src/team_api.rs`)
- Team management → Work log: uses work log (evidence: `src/team_api.rs`)
- Team management → App settings: uses settings (evidence: `src/team_api.rs`)
- Sign-in and roles → Eastern time: uses time (evidence: `src/auth.rs`)
- Returns and stock → Shared Google Sheet: syncs sheet (evidence: `README.md`)
- Legacy data import → MariaDB: imports records (evidence: `README.md`)
- Order schema → MariaDB: loads definitions (evidence: `src/schema.rs`)
- App settings → MariaDB: reads and writes (evidence: `src/settings.rs`)
