# Dispatch Spot Revised Build Architecture v2

Last updated: 2026-04-21  
Status: Accepted working architecture draft with security, privacy, consent, and data lifecycle expansion  
Purpose: This document is the governing build architecture for the next phase of Dispatch Spot. It defines the platform model, trust model, workspace model, navigation structure, page responsibilities, shared objects, permissions direction, security/privacy direction, and build discipline rules. Future builds should follow this document unless the user explicitly approves a change.

---

## 1. Architecture intent

Dispatch Spot is being refactored from a feature-heavy dispatch application into a **multi-sided road freight operating system**.

The long-term goal is:

- shippers, brokers, dispatchers, carriers, and drivers can run their businesses on one platform
- the platform becomes infrastructure, not an extra tool
- each role sees a simple interface built for its job
- the real complexity stays in the shared system model, APIs, automation, audit trail, and trust controls
- trucks remain the internal operating center of the platform
- trust, transparency, and business continuity become product advantages

The platform should eventually become an **end-to-end trust architecture for the road freight transportation industry**.

---

## 2. Core product principles

### 2.1 Truck-centric operating model

The platform must treat each truck as a single operating business.

Each truck is simultaneously:

- a revenue unit
- a cost unit
- a continuity unit
- a dispatch unit
- a document unit
- a communication unit
- a performance unit

The platform should not center workflow around “available trucks.” Instead:

- the next load search begins the moment the current load is booked
- every truck should be protected before it empties
- empty or uncovered trucks are exception states
- wheel-turn continuity is the core business responsibility the platform exists to support

### 2.2 One page, one job

Every primary page should do one simple thing.

Examples:

- Home: show what needs action now
- My Trucks: list trucks and let the user drill into one truck
- Truck Page: run one truck as one business
- Continuity: protect next-load coverage
- Calls: negotiate and save call outcomes
- Dispatch Board: run live freight in motion
- Follow-Ups: work unresolved next actions
- Documents: handle paperwork
- Messages: communicate around the load

Pages must not try to be dashboards, CRMs, reports, setup surfaces, and admin tools all at once.

### 2.3 Role simplicity over feature visibility

The platform may be capable of complex workflows, but those capabilities should be hidden behind:

- automation
- defaults
- role-specific filtering
- subpages
- drawers
- tabs
- admin-only surfaces

End users should feel that the system simplifies their job to the push of one or two buttons whenever possible.

### 2.4 API-first integrity

All major workflows must be API-owned, not page-owned.

The web app, future mobile apps, and future marketplace/load board layers must rely on the same core system truth.

This means:

- no critical business logic only in the front end
- no role behavior that only exists in UI rendering
- no hidden React-state-only workflow truths
- all important actions backed by service-layer and route-layer logic

### 2.5 Transparency and trust

A major future market differentiator is trust.

The platform should give all parties confidence that deceptive behavior is difficult to hide.

The architecture should support:

- clear load history
- clear status change history
- clear message history
- document version history
- internal notes separated from shared notes
- role-based visibility boundaries
- auditable edit/change trails

### 2.6 Security, privacy, consent, and portability are first-class systems

Security, privacy, legal acceptance, data lifecycle, and portability are not support concerns. They are product architecture.

The platform must support:

- secure-by-design and secure-by-default behavior
- role-based access control and tenant isolation
- document and message security
- consent/version/acceptance tracking
- update notifications and acknowledgment
- export, archive, restore, and deletion lifecycle handling
- auditable legal/privacy/security events

---

## 3. Core shared objects

### 3.1 Operating objects
- Truck
- Driver
- Load
- Carrier
- Company
- Dispatch Organization
- Broker
- Shipper

### 3.2 Workflow objects
- Assignment
- Continuity Plan
- Follow-Up Task
- Load Status Event
- Conversation Thread
- Internal Note
- Shared Message

### 3.3 Proof and finance objects
- Rate Confirmation
- BOL
- POD
- Receipt
- Accessorial
- Expense
- Payment Record
- Settlement Record later
- Audit Log

### 3.4 Governance and consent objects
- Policy Document
- Policy Version
- Acceptance Record
- Notification Record
- Export Package
- Archive Record
- Restore Job
- Deletion Request
- Privacy Event Log
- Security Event Log

These objects should be API-owned and role-filtered, not UI-owned.

---

## 4. Workspace model

Dispatch Spot will support five major workspace types.

### 4.1 Super Admin
Purpose:
- platform control
- governance
- planning
- development surfaces
- workflow configuration
- transparency and audit review
- automation management
- marketplace governance
- API and integration control
- security/privacy/legal controls

### 4.2 Dispatcher Workspace
Purpose:
- independent dispatch company managing trucks for one or more carriers or owner-operators

### 4.3 Company Workspace
Purpose:
- trucking company dispatching its own fleet

### 4.4 Broker/Shipper Workspace
Purpose:
- submit loads, request trucks, track execution, message clearly, and trust the movement lifecycle

### 4.5 Driver Workspace
Purpose:
- see current work, next work, messages, documents, and load progress with minimal complexity

---

## 5. Sidebar / navigation map by workspace

### 5.1 Super Admin
- Home
- Organizations
- Workspace Types
- Roles & Permissions
- Workflow Templates
- Automation & AI
- Marketplace Control
- Transparency & Audit
- API & Integrations
- Notifications
- Platform Settings

### 5.2 Dispatcher Workspace
- Home
- My Carriers
- My Trucks
- Continuity
- Calls
- Dispatch Board
- Follow-Ups
- Documents
- Messages
- Money
- Settings

### 5.3 Company Workspace
- Home
- Fleet
- My Trucks
- Drivers
- Continuity
- Live Loads
- Follow-Ups
- Documents
- Messages
- Money
- Settings

### 5.4 Broker/Shipper Workspace
- Home
- Post Load
- Need a Truck
- My Loads
- Active Loads
- Messages
- Documents
- Trusted Timeline
- Settings

### 5.5 Driver Workspace
- Home
- Current Load
- Next Load
- Messages
- Documents
- My Truck
- History
- Settings

---

## 6. Truck Command Page architecture

The Truck Command Page is the main operating page for Dispatcher Workspace and Company Workspace.

### Core purpose
Run one truck like one business.

When the user opens a truck, they should immediately understand:

- what this truck is doing now
- what it is doing next
- what is blocking it
- what money is tied to it
- what action to take now

### Main page sections
- Header strip
- Truck snapshot
- Current move
- Next move
- Truck action queue
- Money snapshot
- Documents snapshot
- Messages snapshot
- Performance/history strip

### Truck subpages
- Overview
- Current Load
- Next Load
- Money
- Documents
- Messages
- History

---

## 7. Shared messaging model

### 7.1 Shared Load Thread
Visible to allowed external participants while the load is active.

Possible participants:
- dispatcher
- company dispatch
- broker
- shipper
- driver

### 7.2 Internal Operations Notes
Visible only inside dispatcher/company side.

Possible participants:
- dispatcher team
- company internal team

### 7.3 Messaging rules
- shared and internal notes must be separated clearly
- thread access must be authorized server-side
- attachments must be scanned and controlled
- read and delivery state should be logged
- message history should support audit and trusted timeline needs

---

## 8. Security, privacy, consent, and trust architecture

### 8.1 Security baseline intent
The platform cannot be truthfully described as impenetrable. The correct standard is:

- secure by design
- secure by default
- least privilege everywhere
- defense in depth
- rapid detection and containment
- auditable trust
- disciplined recovery

### 8.2 Mandatory security pillars
- tenant isolation
- identity and session hardening
- document and messaging security
- API security
- Linux/server hardening
- auditability and tamper-aware event recording
- supply-chain security
- incident response and recovery
- continuous verification

### 8.3 Privacy and consent pillars
- layered legal architecture
- policy versioning
- acceptance ledger
- notification ledger
- just-in-time notices for higher-risk features
- export, archive, deletion, and restore lifecycle
- auditable privacy events

### 8.4 Mandatory security/product rules
1. No feature is complete unless its authorization model is defined.  
2. No API route is complete unless it has authentication, authorization, validation, logging, and failure handling.  
3. No shared object may cross organizations without an explicit sharing rule.  
4. Internal notes and shared messages must remain separated.  
5. No sensitive file may be stored or served like a public asset.  
6. Every critical mutation must write an audit event.  
7. Super Admin surfaces must stay isolated from customer workspaces.  
8. Secrets never live in source control or client code.  
9. Every page must declare who sees it, what it can change, what objects it touches, and what audit events it writes.  
10. The platform must be secure by default, not secure only after configuration.

---

## 9. Privacy, terms, consent, and data lifecycle direction

### 9.1 Required legal/governance documents
- Terms of Use
- Privacy Notice
- Acceptable Use Policy
- Messaging and Communications Disclosure
- Data Export and Portability Policy
- Retention and Deletion Policy
- Trust and Transparency Disclosure
- Cookie/Tracking Notice if needed
- SMS Consent Terms if SMS is used
- AI Feature Disclosure where needed

### 9.2 Policy versioning requirements
Every policy/legal document must support:
- document type
- version number
- effective date
- summary of changes
- required audience
- acceptance requirement
- reminder cadence
- notification channels

### 9.3 Acceptance and notification ledger requirements
Every policy event must log:
- who was affected
- what version applied
- when notified
- by which channel
- whether viewed
- whether acknowledged or accepted
- IP/device/user agent where appropriate

### 9.4 Export, archive, delete, restore model
The platform should support:
- structured human-readable export
- structured machine-readable export
- archive state for closed organizations/accounts
- controlled deletion workflow
- reversible restore path where permitted
- re-import from export package with schema version awareness

### 9.5 Core privacy event types
- accepted terms
- accepted privacy notice
- acknowledged update
- viewed reminder
- changed communication consent
- downloaded export
- requested deletion
- completed deletion
- restored archive
- re-imported data

Detailed handling lives in the dedicated privacy architecture document.

---

## 10. Build discipline rules

### 10.1 Planning discipline
- make a working plan before building
- build in short tracks
- check in regularly
- do not plan too far ahead without approval
- document changes as architecture, not memory

### 10.2 Product discipline
- protect the core truck-centric model
- do not drift back into feature-first page clutter
- create focused pages and move secondary work into subpages
- prefer automation over visible manual complexity

### 10.3 Documentation discipline
The following documents are controlling architecture documents and must be updated where required as the platform evolves:

- BUILD_ARCHITECTURE_REVISED_v2
- PRIVACY_TERMS_CONSENT_DATA_LIFECYCLE_ARCHITECTURE
- SECURITY_ARCHITECTURE (planned)
- LINUX_SERVER_HARDENING_BASELINE (planned)
- TRUST_AND_TRANSPARENCY_MODEL (planned)
- future permissions matrix and shared object model documents

### 10.4 Build output discipline
For each approved build:
- define what page/workspace is changing
- define what visible workflow changes
- define what roles are affected
- define what shared objects are touched
- define whether audit/consent/security implications exist

---

## 11. Immediate next planning items

Before the next major refactor phase, the following should be defined in detail:

1. Dispatcher Workspace Home page structure  
2. Company Workspace Home page structure  
3. shared permissions matrix  
4. shared load lifecycle across all workspaces  
5. trust/transparency timeline model  
6. security architecture baseline  
7. Linux/server hardening baseline  
8. portability/export/archive/restore data model  

---

## 12. Decision rule going forward

Going forward, the build should follow a disciplined rule:

- build from architecture
- verify against role needs
- verify against trust/security/privacy requirements
- then implement

The platform must not drift into ad hoc feature expansion.


## CORI Live Call Copilot governing document
- CORI_LIVE_CALL_COPILOT_ARCHITECTURE.md

## v471 Fleet Map marker refresh preview note

Fleet Map dispatcher-confirmed manual position evidence can now be surfaced as a blue/non-live marker refresh preview label and D badge. This is review evidence only: it does not move marker coordinates, does not call Google Geocoding or Routes APIs, does not connect GPS/ELD providers, and does not alter billing/access behavior.
