Architecture

Stacklane follows the structure of large cloud consoles. The frontend is a single-page application built on its own component library. It talks to a JSON API that is split by domain: identity, billing, cloud and so on. Everything is packaged as one process that hosting providers can install with apt.

browser ──HTTPS──▶ reverse proxy ──▶ stacklane (one binary)
                                      ├─ /api/iam          identity, organizations, users, tokens, audit
                                      ├─ /api/cloud/v1     projects, regions, instances, SSH keys, tasks
                                      ├─ /api/hosting/v1   hosting plans and services
                                      ├─ /api/domains/v1   availability, registration, nameservers
                                      ├─ /api/billing/v1   credit, usage, invoices, payments, webhooks
                                      ├─ /api/support/v1   tickets
                                      ├─ /api/dns/v1       DNS zones and records (PowerDNS)
                                      ├─ /api/network/v1   signed DDoS detector events
                                      ├─ /api/admin        back office for platform staff
                                      └─ /*                Angular portal, embedded at build time
                                     SQLite (WAL) · secret key · SMTP
                                     workers: instances · services · domains · billing

Identity model#

Authentication#

Audit and tracing#

Every mutation writes an audit record with the client, actor or token, source IP, user agent, event name and trace ID. The trace ID comes from an incoming W3C traceparent header when present, and is returned as X-Trace-Id.

Frontend#

Provisioning#

Long-running work goes through a task table. The API validates a request, records the resource and a task, and returns 202 Accepted with both. Three workers run inside the same process and claim tasks by resource type:

Tasks that were running when the process stopped are marked as failed on start, so no operation is silently half-applied. The portal polls resources while they are in a transitional state.

Every integration sits behind a trait (Connector, Panels, Registrars, Gateways), so tests and the simulation mode use in-memory implementations.

Billing#

Network protection#