Work in Progress: This page is under development. Use the feedback button on the bottom right to help us improve it.

Backend Development

Architecture

Laminar's development environment consists of three repositories:

RepositoryDescription
laminarCore stream processing engine (Rust) - API, Controller, Worker
laminar-frontendWeb UI (Next.js), documentation, CLI tool
laminar-infraInfrastructure, Docker Compose, Kubernetes configs, monitoring

Services and ports:

ServicePort
API Server8000
Controller8001
Node8003
Admin8004

Clone

git clone https://github.com/e6data/laminar.git
cd laminar

Build

cargo build --release

Configuration

The repo includes a laminar.toml config file that's automatically loaded when running from the repo root:

# laminar.toml (key sections)
 
[api]
bind-address = "0.0.0.0"
http-port = 8000
 
[controller]
bind-address = "0.0.0.0"
rpc-port = 8001
scheduler = "process"
 
[node]
bind-address = "0.0.0.0"
rpc-port = 8003
 
[admin]
bind-address = "0.0.0.0"
http-port = 8004
 
[database.postgres]
database-name = "laminar"
host = "localhost"
port = 5432
user = "laminar"
password = "laminar"

Migrate

Run database migrations before starting the app:

cargo run -- migrate

Run

# Starts Laminar in all-in-one cluster mode (workers run as processes)
cargo run -- cluster

Docker

# Build image
task docker:build
 
# Build deps base image (slow)
task docker:build-deps
 
# Push to ECR
task ecr:login
task ecr:push          # main image
task ecr:push-deps     # deps image

Verification

Once the cluster is running, you can access:

EndpointURL
API Serverhttp://localhost:8000
Admin Statushttp://localhost:8004/status
Admin Metricshttp://localhost:8004/metrics
Admin Confighttp://localhost:8004/config
Admin Detailshttp://localhost:8004/details

Regenerating SQL Code

When you modify SQL queries, regenerate the type-safe Rust code:

# For laminar-api
cargo run --manifest-path tools/sql-generator/Cargo.toml -- api
 
# For laminar-controller
cargo run --manifest-path tools/sql-generator/Cargo.toml -- controller