Skip to main content

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:

VariableDescriptionDefault
PORTHTTP port the service listens on3000
NODE_ENVRuntime environment (development, production, test)development
DATABASE_URLPostgreSQL connection string
REDIS_URLRedis connection string
NATS_URLNATS JetStream connection string
LOG_LEVELLog 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