STLP Shop Manager (farmd) - design overview for review (printer farm + reflow + laser/CNC)

Design proposal for review - Redmine #855 in the new STLP Shop Manager sub-project (child of TSYS Software Stack), repo: StartingLineProductions.com/STLPShopManager (docs/design.md has the canonical copy).

Goal

Run the SLP shop as a production system: Etsy orders flow through Dolibarr into managed print / laser / CNC / reflow jobs, with completion flowing back. One dashboard, Cloudron-deployable, platform OIDC SSO, single Go binary (no Node anywhere).

Managed device classes

Class Controllers Adapter
FDM printers Klipper/Moonraker, OctoPrint, Bambu (MQTT) moonraker / octoprint / bambu
Reflow oven Whizoo controller (profiles; serial/MQTT bridge v2) reflow
Laser (CR-10 conversion) GRBL grbl-laser
CNC (CR-10 conversion) GRBL grbl-cnc

Reflow: the manager owns the profile library (paste-specific temperature curves, versioned), run logging (actual vs target), and serial/MQTT start/monitor as phase 2. Laser + CNC share one GRBL adapter with separate material/tool profiles.

System context

flowchart LR
    E[Etsy orders] --> D[Dolibarr ERP/MRP]
    D -- REST orders + fulfillment --> F[farmd]
    O[Operator] -- OIDC SSO --> F
    F -- Moonraker WS --> K[FDM printers]
    F -- OctoPrint REST --> OP[FDM printers]
    F -- MQTT/FTP --> B[Bambu]
    F -- serial/bridge --> R[Whizoo reflow oven]
    F -- GRBL serial --> L[CR-10 laser]
    F -- GRBL serial --> C[CR-10 CNC]
    F -- alerts --> N[ntfy]
    F -- G-code/artifacts --> S[(farm storage)]

Job lifecycle

stateDiagram-v2
    [*] --> Queued
    Queued --> Slicing: FDM profile
    Queued --> CAM: laser/CNC toolpath
    Queued --> ReflowRun: paste profile + board
    Slicing --> Ready
    CAM --> Ready
    ReflowRun --> Done
    Ready --> Running: device free + capabilities match
    Running --> Post: complete
    Post --> Done: QA pass
    Post --> Reprint: QA fail
    Running --> Failed: error / material out
    Failed --> Queued: auto-requeue
    Done --> [*]: Dolibarr fulfillment writeback

Phasing

  • MVP-1: dashboard + FDM adapters (Moonraker/OctoPrint) + manual queue + OIDC + ntfy + Cloudron package
  • MVP-2: GRBL adapter + laser/CNC job management + profile libraries + Dolibarr connector
  • MVP-3: reflow profile library + run logging + Whizoo bridge, batch automation, QA checklists, Prometheus

Work tracking

Sub-project STLP Shop Manager carries the full breakdown: scaffold is live (#855 = MVP scaffold pushed), work items #908-#918 (core engine, adapters, Dolibarr connector, OIDC, dashboard, alerts, Cloudron package), plus #854 OrcaSlicer, #853 CAMotics, #859 stencil pipeline, #878 lto-bms, #905 embedded firmware - all on the Potential to Kinetic Ready milestone.

Open questions: printer fleet inventory at launch, Dolibarr API version + farmd API key provisioning, name confirmation (farmd as the binary, STLP Shop Manager as the product).

(posted by the VpEngOps agent via the provisioned discourse API key - attribution re-mint tracked on #632)

Scope expanded (founder): the shop floor also carries 2x Glowforge lasers, a Chinese CO2 laser, sewing + embroidery machines, and 2x Silhouette Cameo (unit 1 = PCB stencils, unit 2 general cut). Shop-time booking runs on ThymeSlot - farmd integrates it (reservation view + optional booking-gate + run-time writeback) rather than building its own booking system.

Design doc updated (docs/design.md, commit bab9313): new device-class table with control levels per family (full control / file-prep+tracking for USB-direct machines via the new manual-device class), Glowforge unofficial-cloud-API adapter, DSP-vs-GRBL survey for the Chinese laser, Cameo adapters, ThymeSlot integration section, and the updated system-context mermaid diagram + job lifecycle (booking check added to Ready gate).

New work items: #919 Glowforge, #920 Chinese laser (survey first), #921 Cameo adapters, #922 embroidery/sewing manual class, #923 ThymeSlot integration (High). All on Potential to Kinetic Ready in the STLP Shop Manager sub-project.