# raghavendra348/truckconnect architecture

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

- Interactive diagram: https://gitdiagram.com/raghavendra348/truckconnect
- Repository: https://github.com/raghavendra348/truckconnect

## Overview

TruckConnect is a freight and trucking marketplace with customer, truck-owner, and administrator experiences. The main workflow is users signing in, posting loads or responding to them, then managing bookings, trips, delivery, payments, and related records; messaging and administrative oversight are supporting branches. The tree shows Django domain apps and a React client. Backend view-to-model and client-to-server wiring is largely unsampled, so those connections are omitted or marked unverified rather than inferred.

Main entry points: [`truckconnect-frontend/src/services/api.js`](https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/services/api.js) (API client), [`truckconnect-frontend/src/App.jsx`](https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/App.jsx) (Application routes), [`truckconnect-frontend/src/pages/customer`](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-frontend/src/pages/customer) (Customer workspace), [`truckconnect-frontend/src/pages/admin`](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-frontend/src/pages/admin) (Admin workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_frontend["Application routes<br/>[App.jsx]"]
  node_auth["Authentication state<br/>[authSlice.js]"]
  node_store["Redux store<br/>[store.js]"]
  node_api["API client<br/>[api.js]"]
  node_format["Display formatters<br/>[formatters.js]"]
  node_customer["Customer workspace"]
  node_owner["Owner workspace"]
  node_admin["Admin workspace"]
end

subgraph group_identity["Identity and fleet"]
  node_accounts["Accounts and profiles"]
  node_drivers["Driver records<br/>[models.py]"]
  node_trucks["Truck fleet<br/>[models.py]"]
end

subgraph group_freight["Freight operations"]
  node_loads["Load listings"]
  node_offers["Freight offers"]
  node_bookings["Bookings"]
  node_trips["Trip tracking"]
  node_delivery["Delivery records"]
end

subgraph group_finance["Finance and oversight"]
  node_payments["Payments"]
  node_settlements["Settlements"]
  node_expenses["Trip expenses"]
  node_reports["Operational reports"]
  node_adminpanel["Admin workflows"]
end

subgraph group_support["Communication and support"]
  node_conversations["Conversations"]
  node_disputes["Dispute cases"]
  node_notifications["Notifications<br/>[models.py]"]
  node_notification_service["Notification creation<br/>[services.py]"]
end

node_user(("Marketplace users"))

node_user -->|"uses"| node_frontend
node_frontend -->|"reads auth state"| node_auth
node_frontend -->|"routes to"| node_customer
node_frontend -->|"routes to"| node_owner
node_frontend -->|"routes to"| node_admin
node_auth -.->|"registered in"| node_store
node_customer -.->|"requests data"| node_api
node_customer -.->|"loads disputes"| node_api
node_customer -.->|"loads conversations"| node_api
node_customer -->|"formats values"| node_format
node_admin -.->|"requests data"| node_api
node_admin -->|"sets credentials"| node_auth
node_notification_service -->|"creates record"| node_notifications
node_api -.->|"API requests"| node_accounts
node_api -.->|"API requests"| node_loads
node_api -.->|"API requests"| node_offers
node_api -.->|"API requests"| node_bookings
node_api -.->|"API requests"| node_trips
node_api -.->|"API requests"| node_payments
node_api -.->|"API requests"| node_conversations
node_api -.->|"API requests"| node_disputes
node_api -.->|"API requests"| node_notifications

click node_frontend "https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/App.jsx"
click node_auth "https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/redux/authSlice.js"
click node_store "https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/redux/store.js"
click node_api "https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/services/api.js"
click node_format "https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/utils/formatters.js"
click node_customer "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-frontend/src/pages/customer"
click node_owner "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-frontend/src/pages/owner"
click node_admin "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-frontend/src/pages/admin"
click node_accounts "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/accounts"
click node_drivers "https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-backend/drivers/models.py"
click node_trucks "https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-backend/trucks/models.py"
click node_loads "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/loads"
click node_offers "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/offers"
click node_bookings "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/bookings"
click node_trips "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/trips"
click node_delivery "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/deliveries"
click node_payments "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/payments"
click node_settlements "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/settlements"
click node_expenses "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/expenses"
click node_reports "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/reports"
click node_adminpanel "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/admin_panel"
click node_conversations "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/conversations"
click node_disputes "https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/disputes"
click node_notifications "https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-backend/notifications/models.py"
click node_notification_service "https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-backend/notifications/services.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_frontend,node_auth,node_store,node_api,node_format,node_customer,node_owner,node_admin,node_user toneBlue
class node_accounts,node_drivers,node_trucks toneAmber
class node_loads,node_offers,node_bookings,node_trips,node_delivery toneMint
class node_payments,node_settlements,node_expenses,node_reports,node_adminpanel toneRose
class node_conversations,node_disputes,node_notifications,node_notification_service toneIndigo
```

## Components

### Web client

- [Application routes](https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/App.jsx): `truckconnect-frontend/src/App.jsx`
- [Authentication state](https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/redux/authSlice.js): `truckconnect-frontend/src/redux/authSlice.js`
- [Redux store](https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/redux/store.js): `truckconnect-frontend/src/redux/store.js`
- [API client](https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/services/api.js): `truckconnect-frontend/src/services/api.js`
- [Display formatters](https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-frontend/src/utils/formatters.js): `truckconnect-frontend/src/utils/formatters.js`
- [Customer workspace](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-frontend/src/pages/customer): `truckconnect-frontend/src/pages/customer`
- [Owner workspace](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-frontend/src/pages/owner): `truckconnect-frontend/src/pages/owner`
- [Admin workspace](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-frontend/src/pages/admin): `truckconnect-frontend/src/pages/admin`

### Identity and fleet

- [Accounts and profiles](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/accounts): `truckconnect-backend/accounts`
- [Driver records](https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-backend/drivers/models.py): `truckconnect-backend/drivers/models.py`
- [Truck fleet](https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-backend/trucks/models.py): `truckconnect-backend/trucks/models.py`

### Freight operations

- [Load listings](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/loads): `truckconnect-backend/loads`
- [Freight offers](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/offers): `truckconnect-backend/offers`
- [Bookings](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/bookings): `truckconnect-backend/bookings`
- [Trip tracking](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/trips): `truckconnect-backend/trips`
- [Delivery records](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/deliveries): `truckconnect-backend/deliveries`

### Finance and oversight

- [Payments](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/payments): `truckconnect-backend/payments`
- [Settlements](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/settlements): `truckconnect-backend/settlements`
- [Trip expenses](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/expenses): `truckconnect-backend/expenses`
- [Operational reports](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/reports): `truckconnect-backend/reports`
- [Admin workflows](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/admin_panel): `truckconnect-backend/admin_panel`

### Communication and support

- [Conversations](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/conversations): `truckconnect-backend/conversations`
- [Dispute cases](https://github.com/raghavendra348/truckconnect/tree/main/truckconnect-backend/disputes): `truckconnect-backend/disputes`
- [Notifications](https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-backend/notifications/models.py): `truckconnect-backend/notifications/models.py`
- [Notification creation](https://github.com/raghavendra348/truckconnect/blob/main/truckconnect-backend/notifications/services.py): `truckconnect-backend/notifications/services.py`

### Other components

- **Marketplace users**

## Connections

- Marketplace users → Application routes: uses
- Application routes → Authentication state: reads auth state (evidence: `truckconnect-frontend/src/App.jsx`)
- Application routes → Customer workspace: routes to (evidence: `truckconnect-frontend/src/App.jsx`)
- Application routes → Owner workspace: routes to (evidence: `truckconnect-frontend/src/App.jsx`)
- Application routes → Admin workspace: routes to (evidence: `truckconnect-frontend/src/App.jsx`)
- Authentication state → Redux store: registered in
- Customer workspace → API client: requests data (evidence: `truckconnect-frontend/src/pages/customer/Dashboard/index.jsx`)
- Customer workspace → API client: loads disputes (evidence: `truckconnect-frontend/src/pages/customer/Disputes/index.jsx`)
- Customer workspace → API client: loads conversations (evidence: `truckconnect-frontend/src/pages/customer/Chat/index.jsx`)
- Customer workspace → Display formatters: formats values (evidence: `truckconnect-frontend/src/pages/customer/Chat/index.jsx`)
- Admin workspace → API client: requests data (evidence: `truckconnect-frontend/src/pages/admin/Dashboard/index.jsx`)
- Admin workspace → Authentication state: sets credentials (evidence: `truckconnect-frontend/src/pages/admin/Login/index.jsx`)
- Notification creation → Notifications: creates record (evidence: `truckconnect-backend/notifications/services.py`)
- API client → Accounts and profiles: API requests
- API client → Load listings: API requests
- API client → Freight offers: API requests
- API client → Bookings: API requests
- API client → Trip tracking: API requests
- API client → Payments: API requests
- API client → Conversations: API requests
- API client → Dispute cases: API requests
- API client → Notifications: API requests
