Skip to content

Sartiq Cookbook

Project-specific tutorials for extending the Sartiq platform. Each tutorial walks through a real extension point with references to the actual codebase.

Generic vs. Project-Specific

For general-purpose recipes (CRUD, caching, backend patterns), see the Backend Cookbook. This section covers Sartiq-specific extension points that span multiple layers.


Tutorials by Component

Component Tutorial What You'll Build
Backend Add a Generation Strategy A new strategy in the generation pipeline (enum → protocol → service → route)
Compute Server Add a Task Type A new compute task from model to processor to dispatch map
Compute Server Add an AI Provider A new provider processor with capabilities and queue routing
Concurrency Concurrency Recipes Common concurrent and parallel task patterns

How These Tutorials Connect

The generation pipeline spans both Backend and Compute Server. A typical end-to-end feature touches all three tutorials:

Backend                              Compute Server
┌──────────────────────┐             ┌──────────────────────┐
│ GenerationStrategy   │             │ TaskType             │
│ IGenerationStrategy  │──creates──▶ │ Task model           │
│ GenerationService    │  task       │ TaskProcessor        │
│ API route            │             │                      │
└──────────────────────┘             │ ProviderType         │
                                     │ ProviderProcessor    │
                                     │ ProcessorRegistry    │
                                     └──────────────────────┘
  1. Generation Strategy (Backend) decides what to generate and creates a compute task
  2. Task Type (Compute Server) defines how the task is modeled, dispatched, and processed
  3. AI Provider (Compute Server) handles the actual execution against an external AI service