Basics
Architecture
CyanPrint system architecture and container communication
Architecture Overview
CyanPrint uses a containerized architecture where each artifact runs in its own isolated environment.
System Components
Component Overview
| Component | Description |
|---|---|
| Iridium CLI | User interface for running templates |
| Zinc API | Registry for discovering artifacts |
| Argon Web UI | SvelteKit web interface for browsing templates |
| Coordinator | Orchestrates artifact execution |
| Containers | Isolated environments for each artifact |
Execution Flow
This is a simplified view of the execution flow. The actual process includes additional phases such as container warming, session management, and zipping.
Step-by-Step
Discovery
CLI queries the registry for template metadata
Initialization
Coordinator starts the template container
Collection
Template collects user input and returns a Cyan config
Processing
Processor transforms files using the config
Delivery
Coordinator returns processed files to the CLI
Container Communication
| Container | Role | Endpoints |
|---|---|---|
| Template | Collects user input, returns Cyan config | POST /api/template/init, /api/template/validate |
| Processor | Reads files, transforms, writes output | POST /api/process |
| Plugin | Post-processing on generated files | POST /api/plug |
| Resolver | Resolves file conflicts from layers | POST /api/resolve |
| Merger | Merges processor outputs into final result | POST /merge/:sessionId, POST /zip |
Container Path Mechanics
Critical Paths
| Path | Owner | Warning |
|---|---|---|
/workspace | Coordinator | WILL BE OVERRIDDEN - never store files here |
/workspace/cyanprint | Blob | Extraction target; becomes processor's read_dir |
/workspace/area/<uuid> | Processor | Individual processor output directory |
/workspace/area/<merge-uuid> | Merger | Merged output before delivery to CLI |
SDK Port Assignments
| Artifact | Port | Endpoints |
|---|---|---|
| Template | 5550 | POST /api/template/init, /api/template/validate |
| Processor | 5551 | POST /api/process |
| Plugin | 5552 | POST /api/plug |
| Resolver | 5553 | POST /api/resolve |
| Merger | 9000 | POST /merge/:sessionId, POST /zip (served by Coordinator) |
| Coordinator | 9000 | Internal orchestration |
Each artifact SDK starts an HTTP server on its assigned port. The Coordinator communicates with containers via these endpoints.