Architecture overview
Every service owns its MongoDB database (or immudb for audit), is stateless and scales horizontally. The public API is REST/JSON behind a custom Go gateway; services talk to each other through ConnectRPC (synchronous queries) and Kafka (events).
Routes for files, inventory and events come from the compose GATEWAY_ROUTES; borrowing (in progress) and vision
are not shown.
Services
| Service | Lang | Responsibility | Status |
|---|---|---|---|
| gateway | Go | Routing, browser sessions (BFF), API keys, principal signing, rate limiting, public cache, security headers, dev login | Implemented |
| authz | Go | Permission catalogue, roles, grants, API keys, Permify facade, Keycloak role sync, login history, organization settings | Implemented |
| members | Go | Profiles, Workspace + Keycloak provisioning, membership terms, statuses, mandates, trainings, history, erasure | Implemented |
| audit | Go | Kafka → immudb writer, audit query API | Implemented |
| vision | Python | CNI / EPITA card extraction, QR detection (stateless) | Implemented |
| files | Go | Attachments, upload pipeline, presigned URLs | Implemented |
| inventory | Go | Items, consumables, locations, stock, maintenance, issues, labels | Implemented |
| events | Go | Events, recurrence, ICS feeds, Google Calendar push | Implemented |
| borrowing | Go | Borrowing sheets, external persons, encrypted ID documents | In progress |
| bank-sync | Go | Read-only bank synchronisation (Wise, Enable Banking), consent tracking | Implemented |
| projects, finance, notifications, search, devices | Go | See docs/specs/architecture.md | Not started |
| web | TS | TanStack Start frontend (SSR public pages) | Public pages, members, profile, administration |
Principles
- Deny by default: every permission is declared in
pkg/catalogand checked through authz. - Every write is audited, sensitive reads and every API key call too; audit records hold identifiers only.
- No PII in Kafka in clear: PII in event payloads is encrypted per subject (encryption).
- Graceful degradation: rate limits and caches fail open, Kafka publishing from the gateway is buffered, OIDC discovery is lazy.
- Configuration through env vars only, no data on local volumes (databases and S3 only).
Read next: communication, CQRS and outbox, Kafka topics, identity, authorization, main flows.