Architecture and Modes
Understand Durabull architecture, persistence behavior, and the two deployment toggles.
Runtime Architecture
Durabull is a monorepo with three runtime surfaces:
apps/api: Hono API server, auth/session middleware, BullMQ-backed operationsapps/web: TanStack Router SPA for operational queue managementapps/docs: Next.js documentation and marketing site
In production container mode, the API server can also serve the built web assets.
The Two Core Toggles
Durabull uses two independent environment toggles:
DURABULL_AUTHLESSDURABULL_ENV_CONNECTIONS
These toggles can be mixed to get different operational behavior.
DURABULL_AUTHLESS
true: bypasses login and auto-creates an owner context for a local authless organizationfalseor unset: Better Auth is active and users authenticate normally
DURABULL_ENV_CONNECTIONS
true: Redis connections are sourced fromDURABULL_REDIS_URL_*env vars and connection CRUD is read-onlyfalseor unset: connections are managed in the database and editable in the UI/API
Persistence Mode
Persistence mode is determined by DATABASE_URL:
DATABASE_URLset: PostgreSQL modeDATABASE_URLunset: local PGlite mode (./data/pgliteby default)
Common Combinations
| Use Case | Authless | Connections | Persistence |
|---|---|---|---|
| Fast local admin | true | Env | PGlite |
| Authenticated without Postgres | false | Env | PGlite |
| Full team deployment | false | DB | PostgreSQL |
| Stateful with env-only connections | false | Env | PostgreSQL |
How This Affects Product Behavior
- Team and invitation workflows require authenticated mode.
- Connection create/edit/delete requires DB-managed connections.
- Authless mode should only be used in trusted/private networks.
- Env-driven connections are deterministic and reproducible across deploys.
Screenshot placeholder: architecture diagram (API, Web, Redis, DB, auth components).
Video placeholder: mode matrix walkthrough and recommended selection flow.