# sounmirza883/print-automater architecture

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

- Interactive diagram: https://gitdiagram.com/sounmirza883/print-automater
- Repository: https://github.com/sounmirza883/print-automater

## Overview

Print Automated is a print-shop marketplace and operations platform. The main journey starts with a customer uploading and configuring a document, continues through order placement and shop acceptance, then ends with an agent printing the job and the shop completing delivery. The README also describes business operations, billing, administration, and asynchronous processing. Edges use README-documented relationships or the shown controller and worker wiring; unsampled internals are represented only at subsystem level.

Main entry points: [`services/api/src`](https://github.com/sounmirza883/print-automater/tree/main/services/api/src) (API services), [`services/api/src/public-orders/public-orders.controller.ts`](https://github.com/sounmirza883/print-automater/blob/main/services/api/src/public-orders/public-orders.controller.ts) (Upload and order), [`apps/customer-web/src/app`](https://github.com/sounmirza883/print-automater/tree/main/apps/customer-web/src/app) (Customer web), [`apps/shop-web/src/app/(console)`](https://github.com/sounmirza883/print-automater/tree/main/apps/shop-web/src/app/(console)) (Shop operations web)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer ordering"]
  node_customer_web["Customer web"]
  node_upload_order["Upload and order"]
end

subgraph group_backend["Platform backend"]
  node_document_worker["Document processing"]
  node_api["API services"]
  node_auth["Authentication and roles"]
  node_order_services["Order management"]
  node_print_jobs["Print job allocation"]
  node_storage[("Document storage<br/>[storage.service.ts]")]
  node_worker["Background jobs<br/>[app.module.ts]"]
end

subgraph group_shop["Shop operations"]
  node_shop_staff["Shop staff app"]
  node_shop_web["Shop operations web"]
  node_shop_orders["Shop order handling"]
  node_business_ops["Business operations"]
  node_billing_admin["Billing and admin"]
end

subgraph group_agent["Printer agent"]
  node_agent_ui["Agent interface<br/>[main.cpp]"]
  node_agent_auth["Agent authentication<br/>[auth_client.h]"]
  node_agent_print["Claim and print jobs<br/>[job_processor.cpp]"]
  node_agent_backend["Agent backend client<br/>[backend_client.h]"]
end

subgraph group_marketing["Marketing site"]
  node_marketing_site["Marketing website"]
end

node_customer(("Customer"))
node_shop(("Print shop"))

node_customer -->|"uses"| node_customer_web
node_customer_web -->|"uploads and orders"| node_upload_order
node_upload_order -->|"queues processing"| node_document_worker
node_document_worker -.->|"stores documents"| node_storage
node_upload_order -->|"uploads documents"| node_storage
node_upload_order -->|"creates orders"| node_order_services
node_customer_web -->|"calls API"| node_api
node_shop_staff -->|"calls API"| node_api
node_shop_web -->|"calls API"| node_api
node_api -->|"guards routes"| node_auth
node_shop -->|"accepts orders"| node_shop_staff
node_shop -->|"manages operations"| node_shop_web
node_shop_orders -->|"runs order actions"| node_order_services
node_order_services -.->|"allocates jobs"| node_print_jobs
node_shop_web -.->|"manages operations"| node_business_ops
node_api -.->|"serves billing and admin"| node_billing_admin
node_worker -->|"registers processing"| node_document_worker
node_agent_ui -->|"starts client"| node_agent_backend
node_agent_ui -.->|"uses login"| node_agent_auth
node_agent_auth -->|"authenticates with"| node_api
node_agent_backend -->|"claims and reports"| node_api
node_agent_backend -.->|"dispatches jobs"| node_agent_print
node_print_jobs -->|"assigns print jobs"| node_agent_print
node_agent_print -->|"prints for"| node_shop
node_api -->|"queues slow work"| node_worker

click node_customer_web "https://github.com/sounmirza883/print-automater/tree/main/apps/customer-web/src/app"
click node_upload_order "https://github.com/sounmirza883/print-automater/blob/main/services/api/src/public-orders/public-orders.controller.ts"
click node_document_worker "https://github.com/sounmirza883/print-automater/blob/main/services/worker/src/document-processing/document-processing.service.ts"
click node_api "https://github.com/sounmirza883/print-automater/tree/main/services/api/src"
click node_auth "https://github.com/sounmirza883/print-automater/tree/main/services/api/src/auth"
click node_order_services "https://github.com/sounmirza883/print-automater/tree/main/services/api/src/orders"
click node_print_jobs "https://github.com/sounmirza883/print-automater/tree/main/packages/backend-shared/src/print-jobs"
click node_storage "https://github.com/sounmirza883/print-automater/blob/main/packages/backend-shared/src/storage/storage.service.ts"
click node_worker "https://github.com/sounmirza883/print-automater/blob/main/services/worker/src/app.module.ts"
click node_shop_staff "https://github.com/sounmirza883/print-automater/tree/main/apps/shop-mobile/app"
click node_shop_web "https://github.com/sounmirza883/print-automater/tree/main/apps/shop-web/src/app/(console)"
click node_shop_orders "https://github.com/sounmirza883/print-automater/blob/main/services/api/src/shop-orders/shop-orders.controller.ts"
click node_business_ops "https://github.com/sounmirza883/print-automater/tree/main/apps/shop-web/src/components"
click node_billing_admin "https://github.com/sounmirza883/print-automater/blob/main/services/api/src/payment-proofs/payment-proofs.controller.ts"
click node_agent_ui "https://github.com/sounmirza883/print-automater/blob/main/apps/printer-agent-cpp/src/main.cpp"
click node_agent_auth "https://github.com/sounmirza883/print-automater/blob/main/apps/printer-agent-cpp/src/backend/auth_client.h"
click node_agent_print "https://github.com/sounmirza883/print-automater/blob/main/apps/printer-agent-cpp/src/agent/job_processor.cpp"
click node_agent_backend "https://github.com/sounmirza883/print-automater/blob/main/apps/printer-agent-cpp/src/backend/backend_client.h"
click node_marketing_site "https://github.com/sounmirza883/print-automater/tree/main/apps/marketing-web/src/app"

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_customer_web,node_upload_order toneBlue
class node_document_worker,node_api,node_auth,node_order_services,node_print_jobs,node_storage,node_worker toneAmber
class node_shop_staff,node_shop_web,node_shop_orders,node_business_ops,node_billing_admin toneMint
class node_agent_ui,node_agent_auth,node_agent_print,node_agent_backend toneRose
class node_marketing_site,node_customer,node_shop toneIndigo
```

## Components

### Customer ordering

- [Customer web](https://github.com/sounmirza883/print-automater/tree/main/apps/customer-web/src/app): `apps/customer-web/src/app`
- [Upload and order](https://github.com/sounmirza883/print-automater/blob/main/services/api/src/public-orders/public-orders.controller.ts): `services/api/src/public-orders/public-orders.controller.ts`

### Platform backend

- [Document processing](https://github.com/sounmirza883/print-automater/blob/main/services/worker/src/document-processing/document-processing.service.ts): `services/worker/src/document-processing/document-processing.service.ts`
- [API services](https://github.com/sounmirza883/print-automater/tree/main/services/api/src): `services/api/src`
- [Authentication and roles](https://github.com/sounmirza883/print-automater/tree/main/services/api/src/auth): `services/api/src/auth`
- [Order management](https://github.com/sounmirza883/print-automater/tree/main/services/api/src/orders): `services/api/src/orders`
- [Print job allocation](https://github.com/sounmirza883/print-automater/tree/main/packages/backend-shared/src/print-jobs): `packages/backend-shared/src/print-jobs`
- [Document storage](https://github.com/sounmirza883/print-automater/blob/main/packages/backend-shared/src/storage/storage.service.ts): `packages/backend-shared/src/storage/storage.service.ts`
- [Background jobs](https://github.com/sounmirza883/print-automater/blob/main/services/worker/src/app.module.ts): `services/worker/src/app.module.ts`

### Shop operations

- [Shop staff app](https://github.com/sounmirza883/print-automater/tree/main/apps/shop-mobile/app): `apps/shop-mobile/app`
- [Shop operations web](https://github.com/sounmirza883/print-automater/tree/main/apps/shop-web/src/app/(console)): `apps/shop-web/src/app/(console)`
- [Shop order handling](https://github.com/sounmirza883/print-automater/blob/main/services/api/src/shop-orders/shop-orders.controller.ts): `services/api/src/shop-orders/shop-orders.controller.ts`
- [Business operations](https://github.com/sounmirza883/print-automater/tree/main/apps/shop-web/src/components): `apps/shop-web/src/components`
- [Billing and admin](https://github.com/sounmirza883/print-automater/blob/main/services/api/src/payment-proofs/payment-proofs.controller.ts): `services/api/src/payment-proofs/payment-proofs.controller.ts`

### Printer agent

- [Agent interface](https://github.com/sounmirza883/print-automater/blob/main/apps/printer-agent-cpp/src/main.cpp): `apps/printer-agent-cpp/src/main.cpp`
- [Agent authentication](https://github.com/sounmirza883/print-automater/blob/main/apps/printer-agent-cpp/src/backend/auth_client.h): `apps/printer-agent-cpp/src/backend/auth_client.h`
- [Claim and print jobs](https://github.com/sounmirza883/print-automater/blob/main/apps/printer-agent-cpp/src/agent/job_processor.cpp): `apps/printer-agent-cpp/src/agent/job_processor.cpp`
- [Agent backend client](https://github.com/sounmirza883/print-automater/blob/main/apps/printer-agent-cpp/src/backend/backend_client.h): `apps/printer-agent-cpp/src/backend/backend_client.h`

### Marketing site

- [Marketing website](https://github.com/sounmirza883/print-automater/tree/main/apps/marketing-web/src/app): `apps/marketing-web/src/app`

### Other components

- **Customer**
- **Print shop**

## Connections

- Customer → Customer web: uses (evidence: `README.md`)
- Customer web → Upload and order: uploads and orders (evidence: `README.md`)
- Upload and order → Document processing: queues processing (evidence: `README.md`)
- Document processing → Document storage: stores documents
- Upload and order → Document storage: uploads documents (evidence: `README.md`)
- Upload and order → Order management: creates orders (evidence: `services/api/src/public-orders/public-orders.controller.ts`)
- Customer web → API services: calls API (evidence: `README.md`)
- Shop staff app → API services: calls API (evidence: `README.md`)
- Shop operations web → API services: calls API (evidence: `README.md`)
- API services → Authentication and roles: guards routes (evidence: `services/api/src/auth/jwt-auth.guard.ts`)
- Print shop → Shop staff app: accepts orders (evidence: `README.md`)
- Print shop → Shop operations web: manages operations (evidence: `README.md`)
- Shop order handling → Order management: runs order actions (evidence: `services/api/src/shop-orders/shop-orders.controller.ts`)
- Order management → Print job allocation: allocates jobs
- Shop operations web → Business operations: manages operations
- API services → Billing and admin: serves billing and admin (evidence: `services/api/src/payment-proofs/payment-proofs.controller.ts`)
- Background jobs → Document processing: registers processing (evidence: `services/worker/src/app.module.ts`)
- Agent interface → Agent backend client: starts client (evidence: `apps/printer-agent-cpp/src/main.cpp`)
- Agent interface → Agent authentication: uses login (evidence: `apps/printer-agent-cpp/src/main.cpp`)
- Agent authentication → API services: authenticates with (evidence: `apps/printer-agent-cpp/src/backend/auth_client.h`)
- Agent backend client → API services: claims and reports (evidence: `README.md`)
- Agent backend client → Claim and print jobs: dispatches jobs
- Print job allocation → Claim and print jobs: assigns print jobs (evidence: `README.md`)
- Claim and print jobs → Print shop: prints for (evidence: `README.md`)
- API services → Background jobs: queues slow work (evidence: `README.md`)
