# adarsh7448/fast-logistics-v2 architecture

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

- Interactive diagram: https://gitdiagram.com/adarsh7448/fast-logistics-v2
- Repository: https://github.com/adarsh7448/fast-logistics-v2

## Overview

This is a Flask/Vue logistics transaction application: users register, log in, create and track shipment transactions, while administrators review requests, set prices and delivery status, and export reports. Flask routes and REST resources implement the API; SQLAlchemy models persist users, roles, and transactions. Celery handles CSV exports and scheduled or delivery-triggered notifications. The README describes running Flask, Redis, and Celery, but does not document the product workflow; the graph follows the sampled implementation. Some UI modules and mail/configuration details were not sampled, so their internal behavior is not expanded.

Main entry points: [`static/script.js`](https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/script.js) (Vue app and routing), [`application/routes.py`](https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/routes.py) (Auth and workflow routes), [`application/tasks.py`](https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/tasks.py) (Reports and notices), [`app.py`](https://github.com/adarsh7448/fast-logistics-v2/blob/main/app.py) (Flask app setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_vue_app["Vue app and routing<br/>[script.js]"]
  node_login["Login<br/>[Login.js]"]
  node_registration["Registration<br/>[Register.js]"]
  node_navigation["Navigation<br/>[Navbar.js]"]
  node_home["Home view<br/>[Home.js]"]
  node_dashboard["User transactions<br/>[Dashboard.js]"]
  node_update_view["Transaction update<br/>[Update.js]"]
  node_admin["Admin console<br/>[Admin.js]"]
  node_footer["Footer<br/>[Footer.js]"]
end

subgraph group_api["Flask API"]
  node_flask["Flask app setup<br/>[app.py]"]
  node_routes["Auth and workflow routes<br/>[routes.py]"]
  node_resources["Transaction API<br/>[resources.py]"]
end

subgraph group_domain["Transaction data"]
  node_database["SQLAlchemy setup<br/>[database.py]"]
  node_models["Users and transactions<br/>[models.py]"]
end

subgraph group_jobs["Background jobs"]
  node_celery["Celery setup<br/>[celery_init.py]"]
  node_tasks["Reports and notices<br/>[tasks.py]"]
  node_report_format["Report formatting<br/>[utils.py]"]
  node_mail["Email delivery<br/>[mail.py]"]
end

node_browser(("User or admin"))
node_redis["Redis broker"]
node_email_service["Email provider"]
node_chat_service["Chat webhook"]
node_csv_files["CSV report files"]

node_browser -->|"uses"| node_vue_app
node_vue_app -->|"routes to"| node_login
node_vue_app -->|"routes to"| node_registration
node_vue_app -->|"routes to"| node_home
node_vue_app -->|"routes to"| node_dashboard
node_vue_app -->|"routes to"| node_admin
node_vue_app -->|"routes to"| node_update_view
node_vue_app -->|"renders"| node_navigation
node_vue_app -->|"renders"| node_footer
node_login -->|"calls login API"| node_routes
node_registration -->|"calls registration API"| node_routes
node_dashboard -->|"calls transaction API"| node_resources
node_dashboard -->|"calls payment API"| node_routes
node_admin -->|"loads transactions"| node_resources
node_admin -->|"reviews and exports"| node_routes
node_flask -->|"loads routes"| node_routes
node_flask -->|"registers API"| node_resources
node_flask -->|"initializes"| node_database
node_flask -->|"initializes"| node_celery
node_models -->|"uses ORM"| node_database
node_resources -->|"queries and changes"| node_models
node_routes -->|"queries and changes"| node_models
node_routes -->|"dispatches jobs"| node_tasks
node_tasks -->|"reads transactions"| node_models
node_tasks -->|"formats report"| node_report_format
node_tasks -->|"sends email"| node_mail
node_tasks -->|"writes CSV"| node_csv_files
node_tasks -->|"posts update"| node_chat_service
node_mail -.-> node_email_service
node_celery -.-> node_redis

click node_vue_app "https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/script.js"
click node_login "https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Login.js"
click node_registration "https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Register.js"
click node_navigation "https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Navbar.js"
click node_home "https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Home.js"
click node_dashboard "https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Dashboard.js"
click node_update_view "https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Update.js"
click node_admin "https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Admin.js"
click node_footer "https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Footer.js"
click node_flask "https://github.com/adarsh7448/fast-logistics-v2/blob/main/app.py"
click node_routes "https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/routes.py"
click node_resources "https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/resources.py"
click node_database "https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/database.py"
click node_models "https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/models.py"
click node_celery "https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/celery_init.py"
click node_tasks "https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/tasks.py"
click node_report_format "https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/utils.py"
click node_mail "https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/mail.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_vue_app,node_login,node_registration,node_navigation,node_home,node_dashboard,node_update_view,node_admin,node_footer,node_browser toneBlue
class node_flask,node_routes,node_resources,node_redis toneAmber
class node_database,node_models,node_chat_service toneMint
class node_celery,node_tasks,node_report_format,node_mail toneRose
class node_email_service,node_csv_files toneIndigo
```

## Components

### Web client

- [Vue app and routing](https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/script.js): `static/script.js`
- [Login](https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Login.js): `static/components/Login.js`
- [Registration](https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Register.js): `static/components/Register.js`
- [Navigation](https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Navbar.js): `static/components/Navbar.js`
- [Home view](https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Home.js): `static/components/Home.js`
- [User transactions](https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Dashboard.js): `static/components/Dashboard.js`
- [Transaction update](https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Update.js): `static/components/Update.js`
- [Admin console](https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Admin.js): `static/components/Admin.js`
- [Footer](https://github.com/adarsh7448/fast-logistics-v2/blob/main/static/components/Footer.js): `static/components/Footer.js`

### Flask API

- [Flask app setup](https://github.com/adarsh7448/fast-logistics-v2/blob/main/app.py): `app.py`
- [Auth and workflow routes](https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/routes.py): `application/routes.py`
- [Transaction API](https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/resources.py): `application/resources.py`

### Transaction data

- [SQLAlchemy setup](https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/database.py): `application/database.py`
- [Users and transactions](https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/models.py): `application/models.py`

### Background jobs

- [Celery setup](https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/celery_init.py): `application/celery_init.py`
- [Reports and notices](https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/tasks.py): `application/tasks.py`
- [Report formatting](https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/utils.py): `application/utils.py`
- [Email delivery](https://github.com/adarsh7448/fast-logistics-v2/blob/main/application/mail.py): `application/mail.py`

### Other components

- **User or admin**
- **Redis broker**
- **Email provider**
- **Chat webhook**
- **CSV report files**

## Connections

- User or admin → Vue app and routing: uses (evidence: `static/script.js`)
- Vue app and routing → Login: routes to (evidence: `static/script.js`)
- Vue app and routing → Registration: routes to (evidence: `static/script.js`)
- Vue app and routing → Home view: routes to (evidence: `static/script.js`)
- Vue app and routing → User transactions: routes to (evidence: `static/script.js`)
- Vue app and routing → Admin console: routes to (evidence: `static/script.js`)
- Vue app and routing → Transaction update: routes to (evidence: `static/script.js`)
- Vue app and routing → Navigation: renders (evidence: `static/script.js`)
- Vue app and routing → Footer: renders (evidence: `static/script.js`)
- Login → Auth and workflow routes: calls login API (evidence: `application/routes.py`)
- Registration → Auth and workflow routes: calls registration API (evidence: `application/routes.py`)
- User transactions → Transaction API: calls transaction API (evidence: `application/resources.py`)
- User transactions → Auth and workflow routes: calls payment API (evidence: `application/routes.py`)
- Admin console → Transaction API: loads transactions (evidence: `application/resources.py`)
- Admin console → Auth and workflow routes: reviews and exports (evidence: `application/routes.py`)
- Flask app setup → Auth and workflow routes: loads routes (evidence: `app.py`)
- Flask app setup → Transaction API: registers API (evidence: `app.py`)
- Flask app setup → SQLAlchemy setup: initializes (evidence: `app.py`)
- Flask app setup → Celery setup: initializes (evidence: `app.py`)
- Users and transactions → SQLAlchemy setup: uses ORM (evidence: `application/models.py`)
- Transaction API → Users and transactions: queries and changes (evidence: `application/resources.py`)
- Auth and workflow routes → Users and transactions: queries and changes (evidence: `application/routes.py`)
- Auth and workflow routes → Reports and notices: dispatches jobs (evidence: `application/routes.py`)
- Reports and notices → Users and transactions: reads transactions (evidence: `application/tasks.py`)
- Reports and notices → Report formatting: formats report (evidence: `application/tasks.py`)
- Reports and notices → Email delivery: sends email (evidence: `application/tasks.py`)
- Reports and notices → CSV report files: writes CSV (evidence: `application/tasks.py`)
- Reports and notices → Chat webhook: posts update (evidence: `application/tasks.py`)
- Email delivery → Email provider
- Celery setup → Redis broker
