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:
json
{
"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.