You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Atlas Lab is a localhost-first self-hosted platform made of a Node.js/TypeScript CLI, a layered Docker Compose stack, and an operational React dashboard served by Caddy.
14
14
15
-
It provides a core collaboration layer with GitLab CE, TriliumNext, and Penpot, plus optional AI and development layers. Everything is reachable through dedicated HTTPS ports on `localhost`, with persistent state stored in Docker volumes.
15
+
It provides a core collaboration layer with GitLab CE, BookStack, and Penpot, plus optional AI and development layers. Everything is reachable through dedicated HTTPS ports on `localhost`, with persistent state stored in Docker volumes.
16
+
17
+
---
18
+
19
+
## Index
20
+
21
+
- 🧭 [Overview](#overview)
22
+
- 🏗️ [Architecture](#architecture)
23
+
- 🔌 [Services, Ports, and URLs](#services-ports-and-urls)
@@ -361,6 +388,53 @@ For desktop PostgreSQL clients:
361
388
362
389
---
363
390
391
+
## Adding Services
392
+
393
+
Use the same layered flow when adding, removing, or moving services. The tag describes the runtime contract, and the emoji keeps the intent visible in notes, issues, and commits.
394
+
395
+
| Tag | Use when | Runtime contract |
396
+
| --- | --- | --- |
397
+
| 🏛️ `core`| The service is always on and browser-facing | Add it to `infra/docker/compose.yml`, publish it through `config/gateway/templates/Caddyfile.template`, expose it in `env/lab.env`, and include it in dashboard/runtime config when it should be visible to users. |
398
+
| 🧠 `ai-llm`| The service belongs to optional AI workflows | Add it to `infra/docker/compose.ai-llm.yml`, route it through `gateway-ai-llm`, guard CLI checks behind `--with-ai-llm`, and add smoke/bootstrap only when that layer is enabled. |
399
+
| 🧰 `workbench`| The service belongs to optional development environments | Add it to `infra/docker/compose.workbench.yml`, route browser surfaces through `gateway-workbench`, and add host TCP preflight/smoke checks only for ports exposed to the desktop. |
400
+
| 🔒 `internal`| The service is a backing dependency only | Add Compose service, volumes, and internal networks, but skip Caddy, dashboard cards, and public smoke checks unless another service depends on them. |
401
+
| 🛠️ `bootstrap`| The service needs deterministic initial state | Add or update a service under `src/services/integrations/`, call it from `src/services/orchestration/bootstrap.service.ts`, and validate required env in `src/config/lab-env.schema.ts`. |
402
+
| 🩺 `smoke`| The service should be health-checked by `doctor --smoke`| Add required env to the smoke schema/types and add an HTTP, login, API, or TCP check in `src/services/diagnostics/doctor.service.ts`. |
403
+
404
+
### 🏛️ `core` Browser Service Flow
405
+
406
+
1. Add port, URL, image version, credentials, and secrets in `env/lab.env`.
407
+
2. Add the service, volumes, `depends_on`, and networks in `infra/docker/compose.yml`.
408
+
3. Add the HTTPS route in `config/gateway/templates/Caddyfile.template`.
409
+
4. Add required template variables in `infra/docker/images/gateway/bootstrap-gateway.sh`.
410
+
5. Add runtime payload fields in `config/gateway/templates/runtime/lab-config.json.template` when the dashboard needs them.
411
+
6. Update dashboard schema, view-model builders, locale files, and network map nodes if the service should appear in the UI.
412
+
7. Update host port preflight, smoke checks, tests, README tables, and content templates.
413
+
414
+
### 🧠 `ai-llm` Service Flow
415
+
416
+
1. Add the service in `infra/docker/compose.ai-llm.yml`.
417
+
2. Publish browser/API routes through `gateway-ai-llm` only.
418
+
3. Keep CLI behavior behind `--with-ai-llm`.
419
+
4. Add bootstrap and smoke checks only when AI LLM env validation passes.
420
+
5. Update dashboard optional-layer cards so disabled services remain visibly optional instead of pretending to be online.
421
+
422
+
### 🧰 `workbench` Service Flow
423
+
424
+
1. Add the service in `infra/docker/compose.workbench.yml`.
425
+
2. Route browser workspaces through `gateway-workbench`.
426
+
3. Add host port preflight only for ports published to the host, such as desktop database access.
427
+
4. Add dashboard cards or briefings only for workflows users directly open or inspect.
428
+
429
+
### 🔒 `internal` Service Flow
430
+
431
+
1. Keep the service on an internal network.
432
+
2. Add named volumes for persistent state.
433
+
3. Add health checks when other services depend on readiness.
434
+
4. Do not add public Caddy routes or dashboard cards unless the service becomes user-facing.
435
+
436
+
---
437
+
364
438
## Repository Layout
365
439
366
440
| Area | Purpose | Paths |
@@ -480,11 +554,10 @@ For stronger hardening:
480
554
- Self-hosted user management: https://docs.n8n.io/hosting/configuration/user-management-self-hosted/
0 commit comments