# philjestin/daedalus architecture

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

- Interactive diagram: https://gitdiagram.com/philjestin/daedalus
- Repository: https://github.com/philjestin/daedalus

## Overview

Daedalus is a 3D-print-farm management and order-fulfillment platform, delivered as a Wails desktop app or self-hosted web app. Users manage products and sales-channel orders, turn order items into fulfillment tasks, and coordinate print jobs across discovered or registered printers; the system also tracks materials, expenses, analytics, and live status. The graph focuses on the documented web/API workflow and core service, persistence, and printer layers. Some domain routes and integrations are documented but unsampled, so those subsystem links are marked unverified rather than asserted as inspected calls.

Main entry points: [`internal/service/service.go`](https://github.com/philjestin/daedalus/blob/main/internal/service/service.go) (Business services), [`web/src/App.tsx`](https://github.com/philjestin/daedalus/blob/main/web/src/App.tsx) (App routes), [`internal/printer/manager.go`](https://github.com/philjestin/daedalus/blob/main/internal/printer/manager.go) (Printer manager), [`web/src/api/client.ts`](https://github.com/philjestin/daedalus/blob/main/web/src/api/client.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_routes["App routes<br/>[App.tsx]"]
  node_order_pages["Orders and tasks<br/>[Orders.tsx]"]
  node_project_pages["Product catalog<br/>[Projects.tsx]"]
  node_printer_pages["Printer console<br/>[Printers.tsx]"]
  node_web_api["API client<br/>[client.ts]"]
end

subgraph group_api["HTTP and services"]
  node_backend["HTTP API<br/>[router.go]"]
  node_handlers["Domain handlers<br/>[handlers.go]"]
  node_services["Business services<br/>[service.go]"]
  node_order_service["Order workflows<br/>[order.go]"]
  node_task_service["Task workflows<br/>[task.go]"]
  node_sales_sync["Channel sync<br/>[etsy.go]"]
end

subgraph group_data["Domain and persistence"]
  node_models["Domain models<br/>[models.go]"]
  node_repositories["Repositories<br/>[repository.go]"]
  node_sqlite[("SQLite database<br/>[sqlite.go]")]
  node_catalog_design["Design files<br/>[parser.go]"]
end

subgraph group_operations["Print operations"]
  node_printer_manager["Printer manager<br/>[manager.go]"]
  node_printer_drivers["Printer drivers"]
  node_discovery["Network discovery<br/>[discovery.go]"]
  node_realtime["Live event hub<br/>[hub.go]"]
end

subgraph group_integrations["External channels"]
  node_etsy["Etsy service<br/>[etsy.go]"]
  node_etsy_api["Etsy API client<br/>[client.go]"]
  node_squarespace["Squarespace service<br/>[squarespace.go]"]
  node_squarespace_api["Squarespace client<br/>[client.go]"]
  node_receipt_parser["Receipt OCR<br/>[parser.go]"]
end

node_user(("Farm operator"))
node_sales_channels(("Sales channels"))
node_printers(("Printer fleet"))

node_user -->|"uses"| node_routes
node_routes -->|"routes to"| node_order_pages
node_routes -->|"routes to"| node_project_pages
node_routes -->|"routes to"| node_printer_pages
node_order_pages -.->|"requests"| node_web_api
node_project_pages -->|"requests"| node_web_api
node_printer_pages -->|"requests"| node_web_api
node_web_api -->|"HTTP requests"| node_backend
node_backend -->|"dispatches"| node_handlers
node_handlers -->|"invokes"| node_services
node_services -->|"uses"| node_repositories
node_repositories -.->|"queries"| node_sqlite
node_services -->|"uses"| node_models
node_order_service -.->|"uses"| node_repositories
node_task_service -.->|"uses"| node_repositories
node_sales_channels -.->|"provides orders"| node_sales_sync
node_sales_sync -.->|"syncs through"| node_etsy
node_etsy -.->|"calls"| node_etsy_api
node_sales_sync -.->|"syncs through"| node_squarespace
node_squarespace -.->|"calls"| node_squarespace_api
node_user -.->|"fulfills orders"| node_order_service
node_user -.->|"uploads designs"| node_catalog_design
node_services -->|"parses 3MF"| node_catalog_design
node_services -->|"parses receipts"| node_receipt_parser
node_services -.->|"controls printers"| node_printer_manager
node_printer_manager -.->|"connects"| node_printer_drivers
node_printer_manager -.->|"broadcasts status"| node_realtime
node_printers -.->|"discovered by"| node_discovery
node_discovery -.->|"registers printers"| node_printer_manager
node_user -.->|"receives updates"| node_realtime

click node_routes "https://github.com/philjestin/daedalus/blob/main/web/src/App.tsx"
click node_order_pages "https://github.com/philjestin/daedalus/blob/main/web/src/pages/Orders.tsx"
click node_project_pages "https://github.com/philjestin/daedalus/blob/main/web/src/pages/Projects.tsx"
click node_printer_pages "https://github.com/philjestin/daedalus/blob/main/web/src/pages/Printers.tsx"
click node_web_api "https://github.com/philjestin/daedalus/blob/main/web/src/api/client.ts"
click node_backend "https://github.com/philjestin/daedalus/blob/main/internal/api/router.go"
click node_handlers "https://github.com/philjestin/daedalus/blob/main/internal/api/handlers.go"
click node_services "https://github.com/philjestin/daedalus/blob/main/internal/service/service.go"
click node_order_service "https://github.com/philjestin/daedalus/blob/main/internal/service/order.go"
click node_task_service "https://github.com/philjestin/daedalus/blob/main/internal/service/task.go"
click node_sales_sync "https://github.com/philjestin/daedalus/blob/main/internal/service/etsy.go"
click node_models "https://github.com/philjestin/daedalus/blob/main/internal/model/models.go"
click node_repositories "https://github.com/philjestin/daedalus/blob/main/internal/repository/repository.go"
click node_sqlite "https://github.com/philjestin/daedalus/blob/main/internal/database/sqlite.go"
click node_catalog_design "https://github.com/philjestin/daedalus/blob/main/internal/threemf/parser.go"
click node_printer_manager "https://github.com/philjestin/daedalus/blob/main/internal/printer/manager.go"
click node_printer_drivers "https://github.com/philjestin/daedalus/tree/main/internal/printer"
click node_discovery "https://github.com/philjestin/daedalus/blob/main/internal/printer/discovery.go"
click node_realtime "https://github.com/philjestin/daedalus/blob/main/internal/realtime/hub.go"
click node_etsy "https://github.com/philjestin/daedalus/blob/main/internal/service/etsy.go"
click node_etsy_api "https://github.com/philjestin/daedalus/blob/main/internal/etsy/client.go"
click node_squarespace "https://github.com/philjestin/daedalus/blob/main/internal/service/squarespace.go"
click node_squarespace_api "https://github.com/philjestin/daedalus/blob/main/internal/squarespace/client.go"
click node_receipt_parser "https://github.com/philjestin/daedalus/blob/main/internal/receipt/parser.go"

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_routes,node_order_pages,node_project_pages,node_printer_pages,node_web_api toneBlue
class node_backend,node_handlers,node_services,node_order_service,node_task_service,node_sales_sync toneAmber
class node_models,node_repositories,node_sqlite,node_catalog_design toneMint
class node_printer_manager,node_printer_drivers,node_discovery,node_realtime toneRose
class node_etsy,node_etsy_api,node_squarespace,node_squarespace_api,node_receipt_parser,node_user,node_sales_channels,node_printers toneIndigo
```

## Components

### Web interface

- [App routes](https://github.com/philjestin/daedalus/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [Orders and tasks](https://github.com/philjestin/daedalus/blob/main/web/src/pages/Orders.tsx): `web/src/pages/Orders.tsx`
- [Product catalog](https://github.com/philjestin/daedalus/blob/main/web/src/pages/Projects.tsx): `web/src/pages/Projects.tsx`
- [Printer console](https://github.com/philjestin/daedalus/blob/main/web/src/pages/Printers.tsx): `web/src/pages/Printers.tsx`
- [API client](https://github.com/philjestin/daedalus/blob/main/web/src/api/client.ts): `web/src/api/client.ts`

### HTTP and services

- [HTTP API](https://github.com/philjestin/daedalus/blob/main/internal/api/router.go): `internal/api/router.go`
- [Domain handlers](https://github.com/philjestin/daedalus/blob/main/internal/api/handlers.go): `internal/api/handlers.go`
- [Business services](https://github.com/philjestin/daedalus/blob/main/internal/service/service.go): `internal/service/service.go`
- [Order workflows](https://github.com/philjestin/daedalus/blob/main/internal/service/order.go): `internal/service/order.go`
- [Task workflows](https://github.com/philjestin/daedalus/blob/main/internal/service/task.go): `internal/service/task.go`
- [Channel sync](https://github.com/philjestin/daedalus/blob/main/internal/service/etsy.go): `internal/service/etsy.go`

### Domain and persistence

- [Domain models](https://github.com/philjestin/daedalus/blob/main/internal/model/models.go): `internal/model/models.go`
- [Repositories](https://github.com/philjestin/daedalus/blob/main/internal/repository/repository.go): `internal/repository/repository.go`
- [SQLite database](https://github.com/philjestin/daedalus/blob/main/internal/database/sqlite.go): `internal/database/sqlite.go`
- [Design files](https://github.com/philjestin/daedalus/blob/main/internal/threemf/parser.go): `internal/threemf/parser.go`

### Print operations

- [Printer manager](https://github.com/philjestin/daedalus/blob/main/internal/printer/manager.go): `internal/printer/manager.go`
- [Printer drivers](https://github.com/philjestin/daedalus/tree/main/internal/printer): `internal/printer`
- [Network discovery](https://github.com/philjestin/daedalus/blob/main/internal/printer/discovery.go): `internal/printer/discovery.go`
- [Live event hub](https://github.com/philjestin/daedalus/blob/main/internal/realtime/hub.go): `internal/realtime/hub.go`

### External channels

- [Etsy service](https://github.com/philjestin/daedalus/blob/main/internal/service/etsy.go): `internal/service/etsy.go`
- [Etsy API client](https://github.com/philjestin/daedalus/blob/main/internal/etsy/client.go): `internal/etsy/client.go`
- [Squarespace service](https://github.com/philjestin/daedalus/blob/main/internal/service/squarespace.go): `internal/service/squarespace.go`
- [Squarespace client](https://github.com/philjestin/daedalus/blob/main/internal/squarespace/client.go): `internal/squarespace/client.go`
- [Receipt OCR](https://github.com/philjestin/daedalus/blob/main/internal/receipt/parser.go): `internal/receipt/parser.go`

### Other components

- **Farm operator**
- **Sales channels**
- **Printer fleet**

## Connections

- Farm operator → App routes: uses
- App routes → Orders and tasks: routes to (evidence: `web/src/App.tsx`)
- App routes → Product catalog: routes to (evidence: `web/src/App.tsx`)
- App routes → Printer console: routes to (evidence: `web/src/App.tsx`)
- Orders and tasks → API client: requests (evidence: `web/src/pages/Orders.tsx`)
- Product catalog → API client: requests (evidence: `web/src/pages/Projects.tsx`)
- Printer console → API client: requests (evidence: `web/src/pages/Printers.tsx`)
- API client → HTTP API: HTTP requests (evidence: `web/src/api/client.ts`)
- HTTP API → Domain handlers: dispatches (evidence: `internal/api/router.go`)
- Domain handlers → Business services: invokes (evidence: `internal/api/handlers.go`)
- Business services → Repositories: uses (evidence: `internal/service/service.go`)
- Repositories → SQLite database: queries
- Business services → Domain models: uses (evidence: `internal/service/service.go`)
- Order workflows → Repositories: uses
- Task workflows → Repositories: uses
- Sales channels → Channel sync: provides orders
- Channel sync → Etsy service: syncs through
- Etsy service → Etsy API client: calls
- Channel sync → Squarespace service: syncs through
- Squarespace service → Squarespace client: calls
- Farm operator → Order workflows: fulfills orders
- Farm operator → Design files: uploads designs
- Business services → Design files: parses 3MF (evidence: `internal/service/service.go`)
- Business services → Receipt OCR: parses receipts (evidence: `internal/service/service.go`)
- Business services → Printer manager: controls printers
- Printer manager → Printer drivers: connects
- Printer manager → Live event hub: broadcasts status
- Printer fleet → Network discovery: discovered by
- Network discovery → Printer manager: registers printers
- Farm operator → Live event hub: receives updates
