stepIQ

Architecture

stepIQ runs on a horizontally scalable architecture with stateless workers, Redis-backed queues, and PostgreSQL for persistent state.

System components

The platform consists of five main layers that work together to execute pipelines.

Frontend

Astro 5 + React islands. Pipeline builder, run viewer, and dashboard.

Astro + React

API Server

REST API with JWT auth. Handles CRUD, triggers, and SSE streaming.

Node.js + Hono

Data Layer

PostgreSQL for state, Redis for queues and caching, S3/Minio for file storage.

PG + Redis + S3

Workers

Stateless BullMQ workers that pick jobs from Redis. N instances, auto-scaling.

BullMQ

Model Router

Unified proxy layer that routes to Anthropic, OpenAI, or local models.

Multi-provider

Worker flow

When a pipeline run is triggered, this is the step-by-step execution flow inside a worker:

1Job picked up from Redis queue
2Load pipeline definition from pipeline_versions
3Create run record (status: running)
4For each step: interpolate vars, call model, parse output, emit SSE
5Deliver output (webhook, email, API response)
6Update run record, deduct user credits

Technology choices

Each layer of the stack was chosen for reliability, developer experience, and horizontal scalability.

LayerChoiceRationale
FrontendAstro + ReactIsland architecture for fast loads, React for interactive pipeline editor
APINode.js + HonoLightweight framework with excellent TypeScript support and edge compatibility
DatabasePostgreSQL + DrizzleRelational integrity for pipeline definitions, type-safe ORM with migrations
QueueRedis + BullMQReliable job processing with retries, rate limiting, and priority queues
StorageS3 / MinIOS3-compatible object storage for pipeline artifacts, logs, and large outputs
AuthJWT + bcryptStateless authentication with secure password hashing and API key support
ValidationZodRuntime schema validation for API inputs, pipeline definitions, and config