Skip to content

Glyph as a DJED Layer 2 cell

Public

Glyph runs as a Layer 2 cell on the DJED platform. That means a few specific things — and disclaiming what it does not mean is just as useful.

A DJED cell is a single product unit (a Rust + React app, in Glyph’s case) that consumes a fixed contract of shared infrastructure from DJED. Glyph’s contract is declared in /opt/glyph/cell-manifest.yaml and validated against the platform’s cell-manifest.schema.json:

Identity

Name
glyph
Version
${GLYPH_VERSION:-0.1.0}
Contract version
2.1
Maintainer
alexbayerl
Repository
https://github.com/alexbayerl/glyph

Runtime

Runtime
compose
Site type
product
Compose
cloud/cell/compose.yml
Caddy site
glyph.caddy
Domains
${GLYPH_DOMAIN:-glyph.naburis.cloud}

Health

/livez
/livez
/readyz
/readyz
/healthz
/startupz
Interval
30s
Timeout
10s

Resources

Memory limit
2048M
CPU limit
1.5
Memory reservation
512M

Backing services

Postgres database
glyph
Postgres extensions
uuid-ossp
Redis prefix
glyph
Redis maxmemory
64mb
OIDC scopes
openid, profile, email

Source: /opt/glyph/cell-manifest.yaml. Contract: cell-manifest.schema.json in DJED.

Everything else — Postgres, PgBouncer, Redis, MinIO, Zitadel, Caddy, Prometheus, log shipping, certificates — is shared infrastructure that DJED runs once for the whole platform. Glyph owns its application; the platform owns its substrate.

  • No re-implementing infra per cell. Glyph does not run its own database server, message broker, or OIDC provider. It connects to the platform’s.
  • Identity is one place. Zitadel issues every JWT; every cell verifies through djed-auth. Roles like admin mean the same thing across cells.
  • Caddy is one place. Every cell ships a *.caddy site file that Caddy includes; security headers, CORS, rate limits, and OIDC callbacks come from shared snippets in /opt/djed/caddy/snippets/.
  • Atomic deploys per cell. A Glyph release does not touch any other cell. The blast radius of a bad deploy is one cell.
  • You cannot ignore the contract. If Glyph’s cell-manifest.yaml lies about its health endpoints or its OIDC scopes, the platform catches it and refuses to deploy.
  • Tenant isolation is partly the cell’s problem. PgBouncer and shared Postgres deliver per-cell databases by default; Glyph also enforces row-level security inside its tables (see migrations/010_security_hardening.sql).
  • One dependency contract version per cell. Bumping the cell-contract version is a coordinated platform change.

These docs themselves are part of the cell. They live at glyph.naburis.cloud/docs, are built from this repo, and use the platform’s OIDC for the admin-tier gate:

Browser /docs/... Caddy glyph.naburis.cloud /srv/glyph-docs (public) /docs/* — no auth, file_server forward_auth cell_docs_admin_gate glyph-oauth2-proxy cookie · admin group Zitadel OIDC /docs/* /docs/admin/* on 200 Public path skips both gate boxes. Admin path requires a valid _glyph_docs_session cookie carrying an admin role from Zitadel.
The same gate snippet (cell_docs_admin_gate) lives in /opt/djed/caddy/snippets/ and is intended to be imported by every cell that wants tier-gated docs. Source: ADR-001.

The reusable Caddy snippet (cell_docs_admin_gate) lives in /opt/djed/caddy/snippets/ so any future cell can adopt the same docs pattern in one import line. See ADR-001.