# pranavv-07/pilot-ai-operations-workflow-automation-agent architecture

> Architecture diagram of the GitHub repository pranavv-07/pilot-ai-operations-workflow-automation-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pranavv-07/pilot-ai-operations-workflow-automation-agent
- Repository: https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent

## Overview

PrintPilot is a local order-management workspace for a printing and stationery business. Owners and customers submit requests through the Order Desk, customer portal, or Telegram; the agent interprets requests, checks catalog and rates, and prepares quotations and drafts for owner approval. Issued orders then pass through artwork approval, material allocation, production, payment, and delivery. SQLite is the system of record, with optional Sheets synchronization and provider-based notifications. The README documents major workflows not fully visible in the sampled excerpts; those links are included only where documented.

Main entry points: [`printpilot/web.py`](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/web.py) (Owner workspace), [`printpilot/orders.py`](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/orders.py) (Orders and pricing), [`printpilot/integrations.py`](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/integrations.py) (Delivery integrations), [`printpilot/portal.py`](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/portal.py) (Customer portal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_web["Owner workspace<br/>[web.py]"]
  node_portal["Customer portal<br/>[portal.py]"]
  node_bot["Telegram bot<br/>[bot.py]"]
end

subgraph group_workflow["Order workflow"]
  node_agent["Order agent<br/>[agent.py]"]
  node_language["Text parsing<br/>[language.py]"]
  node_speech["Speech adapters<br/>[speech.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_orders["Orders and pricing<br/>[orders.py]"]
  node_catalog["Catalog and rates<br/>[catalog.py]"]
end

subgraph group_operations["Shop operations"]
  node_artwork["Artwork files<br/>[files.py]"]
  node_documents["PDF documents<br/>[documents.py]"]
  node_materials["Material allocation<br/>[reservations.py]"]
end

subgraph group_services["Integrations and automation"]
  node_automation["Owner automations<br/>[automation.py]"]
  node_integrations["Delivery integrations<br/>[integrations.py]"]
  node_whatsapp["WhatsApp channel<br/>[whatsapp.py]"]
  node_outlook["Outlook delivery<br/>[outlook.py]"]
  node_sheets["Sheets sync<br/>[sheets.py]"]
  node_dashboard["Sheets dashboard"]
end

subgraph group_core["Shared core"]
  node_auth["Authentication<br/>[auth.py]"]
  node_database[("SQLite records<br/>[db.py]")]
end

node_owner(("Business owner"))
node_customer(("Customer"))
node_telegram_user(("Telegram user"))

node_owner -->|"uses"| node_web
node_customer -->|"submits requests"| node_portal
node_telegram_user -->|"sends requests"| node_bot
node_web -->|"authenticates"| node_auth
node_web -->|"manages orders"| node_orders
node_web -->|"routes portal"| node_portal
node_web -->|"manages catalog"| node_catalog
node_web -->|"configures jobs"| node_automation
node_web -->|"configures providers"| node_integrations
node_portal -->|"runs intake"| node_agent
node_portal -->|"reads orders"| node_orders
node_portal -->|"transcribes audio"| node_speech
node_portal -->|"serves PDFs"| node_documents
node_bot -->|"runs intake"| node_agent
node_bot -->|"manages requests"| node_orders
node_bot -->|"transcribes audio"| node_speech
node_agent -->|"parses text"| node_language
node_agent -->|"quotes and drafts"| node_orders
node_agent -->|"validates input"| node_models
node_speech -->|"uses intake"| node_agent
node_orders -->|"checks allocations"| node_materials
node_orders -->|"validates domain data"| node_models
node_orders -->|"queues confirmations"| node_whatsapp
node_orders -->|"reads and writes"| node_database
node_catalog -->|"checks stock"| node_materials
node_catalog -->|"reads and writes"| node_database
node_artwork -->|"records file metadata"| node_database
node_automation -->|"checks due work"| node_orders
node_automation -->|"reads records"| node_database
node_integrations -->|"dispatches jobs"| node_automation
node_integrations -->|"prepares messages"| node_documents
node_integrations -->|"dispatches messages"| node_whatsapp
node_integrations -->|"dispatches mail"| node_outlook
node_integrations -->|"synchronizes records"| node_sheets
node_sheets -->|"updates dashboard"| node_dashboard
node_auth -->|"reads and writes sessions"| node_database
node_web -->|"handles uploads"| node_artwork
node_web -->|"serves documents"| node_documents
node_web -->|"manages stock"| node_materials
node_web -->|"transcribes recordings"| node_speech
node_portal -.->|"uploads artwork"| node_artwork
node_integrations -.->|"records delivery state"| node_database

click node_web "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/web.py"
click node_portal "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/portal.py"
click node_bot "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/bot.py"
click node_agent "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/agent.py"
click node_language "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/language.py"
click node_speech "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/speech.py"
click node_models "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/models.py"
click node_orders "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/orders.py"
click node_catalog "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/catalog.py"
click node_artwork "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/files.py"
click node_documents "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/documents.py"
click node_materials "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/reservations.py"
click node_automation "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/automation.py"
click node_integrations "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/integrations.py"
click node_whatsapp "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/whatsapp.py"
click node_outlook "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/outlook.py"
click node_sheets "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/sheets.py"
click node_dashboard "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/sheets_dashboard.py"
click node_auth "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/auth.py"
click node_database "https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/db.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_web,node_portal,node_bot,node_telegram_user toneBlue
class node_agent,node_language,node_speech,node_models,node_orders,node_catalog toneAmber
class node_artwork,node_documents,node_materials toneMint
class node_automation,node_integrations,node_whatsapp,node_outlook,node_sheets,node_dashboard toneRose
class node_auth,node_database,node_owner,node_customer toneIndigo
```

## Components

### User entry points

- [Owner workspace](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/web.py): `printpilot/web.py`
- [Customer portal](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/portal.py): `printpilot/portal.py`
- [Telegram bot](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/bot.py): `printpilot/bot.py`

### Order workflow

- [Order agent](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/agent.py): `printpilot/agent.py`
- [Text parsing](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/language.py): `printpilot/language.py`
- [Speech adapters](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/speech.py): `printpilot/speech.py`
- [Domain models](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/models.py): `printpilot/models.py`
- [Orders and pricing](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/orders.py): `printpilot/orders.py`
- [Catalog and rates](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/catalog.py): `printpilot/catalog.py`

### Shop operations

- [Artwork files](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/files.py): `printpilot/files.py`
- [PDF documents](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/documents.py): `printpilot/documents.py`
- [Material allocation](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/reservations.py): `printpilot/reservations.py`

### Integrations and automation

- [Owner automations](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/automation.py): `printpilot/automation.py`
- [Delivery integrations](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/integrations.py): `printpilot/integrations.py`
- [WhatsApp channel](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/whatsapp.py): `printpilot/whatsapp.py`
- [Outlook delivery](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/outlook.py): `printpilot/outlook.py`
- [Sheets sync](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/sheets.py): `printpilot/sheets.py`
- [Sheets dashboard](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/sheets_dashboard.py): `printpilot/sheets_dashboard.py`

### Shared core

- [Authentication](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/auth.py): `printpilot/auth.py`
- [SQLite records](https://github.com/pranavv-07/pilot-ai-operations-workflow-automation-agent/blob/main/printpilot/db.py): `printpilot/db.py`

### Other components

- **Business owner**
- **Customer**
- **Telegram user**

## Connections

- Business owner → Owner workspace: uses (evidence: `README.md`)
- Customer → Customer portal: submits requests (evidence: `README.md`)
- Telegram user → Telegram bot: sends requests (evidence: `README.md`)
- Owner workspace → Authentication: authenticates (evidence: `printpilot/web.py`)
- Owner workspace → Orders and pricing: manages orders (evidence: `printpilot/web.py`)
- Owner workspace → Customer portal: routes portal (evidence: `printpilot/web.py`)
- Owner workspace → Catalog and rates: manages catalog (evidence: `printpilot/web.py`)
- Owner workspace → Owner automations: configures jobs (evidence: `printpilot/web.py`)
- Owner workspace → Delivery integrations: configures providers (evidence: `printpilot/web.py`)
- Customer portal → Order agent: runs intake (evidence: `printpilot/portal.py`)
- Customer portal → Orders and pricing: reads orders (evidence: `printpilot/portal.py`)
- Customer portal → Speech adapters: transcribes audio (evidence: `printpilot/portal.py`)
- Customer portal → PDF documents: serves PDFs (evidence: `printpilot/portal.py`)
- Telegram bot → Order agent: runs intake (evidence: `printpilot/bot.py`)
- Telegram bot → Orders and pricing: manages requests (evidence: `printpilot/bot.py`)
- Telegram bot → Speech adapters: transcribes audio (evidence: `printpilot/bot.py`)
- Order agent → Text parsing: parses text (evidence: `printpilot/agent.py`)
- Order agent → Orders and pricing: quotes and drafts (evidence: `printpilot/agent.py`)
- Order agent → Domain models: validates input (evidence: `printpilot/agent.py`)
- Speech adapters → Order agent: uses intake (evidence: `printpilot/speech.py`)
- Orders and pricing → Material allocation: checks allocations (evidence: `printpilot/orders.py`)
- Orders and pricing → Domain models: validates domain data (evidence: `printpilot/orders.py`)
- Orders and pricing → WhatsApp channel: queues confirmations (evidence: `printpilot/orders.py`)
- Orders and pricing → SQLite records: reads and writes (evidence: `printpilot/orders.py`)
- Catalog and rates → Material allocation: checks stock (evidence: `printpilot/catalog.py`)
- Catalog and rates → SQLite records: reads and writes (evidence: `printpilot/catalog.py`)
- Artwork files → SQLite records: records file metadata (evidence: `printpilot/files.py`)
- Owner automations → Orders and pricing: checks due work (evidence: `printpilot/automation.py`)
- Owner automations → SQLite records: reads records (evidence: `printpilot/automation.py`)
- Delivery integrations → Owner automations: dispatches jobs (evidence: `printpilot/integrations.py`)
- Delivery integrations → PDF documents: prepares messages (evidence: `printpilot/integrations.py`)
- Delivery integrations → WhatsApp channel: dispatches messages (evidence: `printpilot/integrations.py`)
- Delivery integrations → Outlook delivery: dispatches mail (evidence: `printpilot/integrations.py`)
- Delivery integrations → Sheets sync: synchronizes records (evidence: `printpilot/integrations.py`)
- Sheets sync → Sheets dashboard: updates dashboard (evidence: `printpilot/sheets.py`)
- Authentication → SQLite records: reads and writes sessions (evidence: `printpilot/auth.py`)
- Owner workspace → Artwork files: handles uploads (evidence: `printpilot/web.py`)
- Owner workspace → PDF documents: serves documents (evidence: `printpilot/web.py`)
- Owner workspace → Material allocation: manages stock (evidence: `printpilot/web.py`)
- Owner workspace → Speech adapters: transcribes recordings (evidence: `printpilot/web.py`)
- Customer portal → Artwork files: uploads artwork
- Delivery integrations → SQLite records: records delivery state (evidence: `printpilot/integrations.py`)
