No description
- Go 87.2%
- HTML 9.6%
- PLpgSQL 1.4%
- CSS 1.1%
- Dockerfile 0.4%
- Other 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| api/v1alpha1 | ||
| cmd | ||
| config | ||
| docs | ||
| internal | ||
| .air.toml | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .golangci.yml | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| Dockerfile.dev | ||
| go.mod | ||
| go.sum | ||
| mise.toml | ||
| README.md | ||
| sqlc.yaml | ||
| Taskfile.yml | ||
Atrium
Atrium is the self-service portal of the Lidisoft ecosystem. Clients use it to:
- order a hosted instance of a Lidisoft product (Tocsin or Horizon),
- see where it lives (its URL) and how to log in for the first time,
- pay for it through Stripe and manage their subscription.
Atrium also provisions the instances itself on Kubernetes, through a Kubernetes operator that ships in this repository.
At a glance
| Concern | Choice |
|---|---|
| Language | Go for everything (portal and operator) |
| Stack | Same as Horizon: Gin, pgx, sqlc, goose, zerolog, urfave/cli, Task |
| Portal UI | Server-rendered html/template pages with LDS, no third-party JS |
| Portal storage | PostgreSQL |
| Accounts | Atrium-managed accounts, organisations with roles (owner/admin/member) |
| Payments | Stripe Checkout + Stripe Customer Portal, flat monthly/yearly plans |
| Tax | EUR only, Stripe Tax (EU VAT, B2B reverse charge) |
| Provisioning | One CRD per product (TocsinInstance, HorizonInstance) + operator |
| Instance URL | https://<org-slug>.lidisoft.app/tocsin, https://<org-slug>.lidisoft.app/horizon |
| Isolation | One Kubernetes namespace per organisation |
| Instance data | Per-instance PostgreSQL via CloudNativePG |
| Deployment | Portal on a VM (systemd); operator in the workload cluster |
Components
┌──────────────┐ Checkout / Portal ┌──────────┐
Client ───▶│ Atrium portal│◀────── webhooks ─────│ Stripe │
(browser) │ (Go, htmx) │─────── API ─────────▶│ │
└──────┬───────┘ └──────────┘
│ Postgres (orgs, users, subscriptions)
│
│ K8s API (scoped ServiceAccount):
│ create/update TocsinInstance / HorizonInstance,
│ read .status
▼
┌──────────────────────── workload cluster ──────────────────────┐
│ atrium-operator ──reconciles──▶ org-<slug> namespace │
│ ├─ Tocsin (Deployment, CNPG) │
│ └─ Horizon (Deployment, CNPG) │
└────────────────────────────────────────────────────────────────┘
Documentation
- Architecture: components, data ownership, repository layout
- Domain model: organisations, users, roles, instances, lifecycle
- Ordering and provisioning flow: what happens from "Order" to "Ready"
- Billing and Stripe: catalog, Checkout, webhooks, dunning, tax
- Operator and CRDs:
TocsinInstance/HorizonInstancecontract - Deployment and operations: how Atrium itself runs
- Development: prerequisites,
taskcommands, conventions - Wireframes: static HTML screens of the portal and back-office
- Architecture decision records: why things are the way they are
- Open questions: defaults that still need confirmation