Configuration
ArkOS services are configured via environment variables. Each service reads its own .env file at startup.
Common Environment Variables
Every service shares a base set of environment variables:
| Variable | Description | Default |
|---|---|---|
PORT | HTTP port the service listens on | 3000 |
NODE_ENV | Runtime environment (development, production, test) | development |
DATABASE_URL | PostgreSQL connection string | — |
REDIS_URL | Redis connection string | — |
NATS_URL | NATS JetStream connection string | — |
LOG_LEVEL | Log level (debug, info, warn, error) | info |
Database Configuration
DATABASE_URL=postgresql://arkos:arkos@localhost:5432/arkos
ArkOS uses PostgreSQL 16 for persistence. Each service has its own schema for isolation.
Cache Configuration
REDIS_URL=redis://localhost:6379
Redis 7 is used for distributed caching and session storage.
Event Transport Configuration
NATS_URL=nats://localhost:4222
NATS JetStream is used for async event-driven communication between services.
Authentication
SUPABASE_URL=https://<project>.supabase.co
SUPABASE_ANON_KEY=<anon-key>
SUPABASE_SERVICE_ROLE_KEY=<service-role-key>
JWT_SECRET=<your-jwt-secret>
Observability
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
OTEL_SERVICE_NAME=product-service
ArkOS uses OpenTelemetry for distributed tracing and metrics.
Local Development
Copy the example env file and customize:
cp .env.example .env
The docker-compose.yml at the repo root starts all infrastructure with the default credentials.
arkgen Configuration
arkgen.config.yml at the repo root controls code generation:
# arkgen.config.yml
meta: ./meta
output:
contracts: ../contracts/src
docs: ./apps/developer-portal/docs/reference
emitters:
- typescript-contracts
- docs
Run pnpm generate to regenerate all artifacts after changing meta/ definitions.
Developer Portal
The developer portal itself uses a docusaurus.config.ts file. See the portal docs for configuration details.
Next Steps
- Deployment — Deploy to Kubernetes