Configuration
Environment
- Copy
.env.exampleto.envin repo root or service dir. - Common vars:
DATABASE_URL,RUST_LOG,JWT_SECRET(prod),CORS_ORIGINS,ATOMO_ENV(set toproductionin prod). - Admin bootstrap:
ADMIN_EMAIL,ADMIN_PASSWORD— create an admin user on server start (create-once by email; a laterADMIN_PASSWORDchange is ignored with aWARN— setADMIN_RESET_PASSWORD=trueto rotate it on boot; see Auth). - GraphQL limits:
GRAPHQL_MAX_DEPTH(default 20),GRAPHQL_MAX_COMPLEXITY(default 200). - Rate limiting (per-IP token bucket):
RATE_LIMIT_RPS(default 100),RATE_LIMIT_WINDOW_SECS(default 60). - Observability:
/metricsexports Prometheus metrics; enable logs viaRUST_LOG(e.g.,info). - Log format:
LOG_FORMAT=jsonfor JSON logs; otherwise pretty logs. - Security headers: override CSP with
CSPif needed; disable all security headers viaDISABLE_SECURITY_HEADERS=true(not recommended). - Auth hashing: argon2id (default); legacy bcrypt hashes are verified for migration.
Service Config
- Each service includes metadata in
package.jsonunderatomo:
{
"atomo": {
"service": "crm",
"configFile": "./atomo.config.ts",
"schemaFile": "./schema.ts",
"pluginsDir": "./plugins",
"workflowsDir": "./workflows",
"adminDir": "./admin"
}
}Ports & Server
atomo devstarts a server (default port 3000). Override with--port.- Standalone server:
atomo-server --config-dir services/<name> --port 3000. - Readiness probe:
GET /readychecks DB connectivity.
Cache, model history and audit
ServerConfig.cache, .history and .audit are independent configuration objects. Environment parsing is strict; malformed JSON, unknown fields and invalid limits fail startup. Cache model override names must exist in the active schema; history/audit policy names should be checked against the intended model/entity types.
ATOMO_HISTORY_CONFIG: JSONHistoryConfig, default{"default":{"mode":"full"},"models":{},"maintenance_interval_secs":60,"batch_size":1000}.ATOMO_AUDIT_CONFIG: JSONAuditConfig, same object structure; audit modes arefull,metadata,off.ATOMO_CACHE_ENABLED,ATOMO_CACHE_MODE,ATOMO_CACHE_TTL_SECS,ATOMO_CACHE_TTI_SECS,ATOMO_CACHE_CLEANUP_INTERVAL_SECS,ATOMO_CACHE_MAX_ENTRIES,ATOMO_CACHE_MAX_BYTES,ATOMO_CACHE_MAX_ENTRY_BYTES,ATOMO_CACHE_REFRESH_AFTER_SECS,ATOMO_CACHE_MULTI_INSTANCE,ATOMO_CACHE_MODELS: see the complete cache parameter table.
History and audit limits do not apply to media blobs, durable jobs, aggregate event streams, container logs or build caches. See Storage lifecycle for policy examples, retention scope, replay restrictions and diagnostics.
Admin UI development backend
Set VITE_API_URL in the Vite process environment or packages/atomo-admin-ui/.env.local to an HTTP(S) backend URL, for example http://127.0.0.1:3000. Vite loads this setting for all API proxies, including relative /meta, /schema.ts and /storage requests; Axios uses the same value. The /ws proxy derives ws: or wss: from the backend protocol. Without the setting, the development proxy targets http://localhost:3000. Do not include credentials in the URL.
This is frontend development/build configuration, not a Rust ServerConfig setting. Production deployments can keep the existing same-origin arrangement by leaving it unset.