Skip to main content

Platform Admin Service — Local Dev Setup

Status: populated Owner: TBD Last updated: 2026-04-18

1. Prerequisites

ToolVersion
Node.js22 LTS
pnpm9.x
Docker Desktop4.x

2. docker compose stack

docker compose -f infra/local/docker-compose.platform-admin.yml up -d
services:
pltadm-postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: pltadm
POSTGRES_PASSWORD: pltadm_dev
POSTGRES_DB: pltadm_db
ports: ["5434:5432"]
pltadm-redis:
image: redis:7-alpine
ports: ["6381:6379"]
nats:
image: nats:2.10-alpine
args: ["-js"]
ports: ["4222:4222"]

3. Environment (.env.local)

DATABASE_URL=postgresql://pltadm:pltadm_dev@localhost:5434/pltadm_db
REDIS_URL=redis://localhost:6381
NATS_URL=nats://localhost:4222
PLTADM_FLAG_CACHE_TTL_S=60
PLTADM_HEALTH_CACHE_TTL_S=10
PLTADM_HEALTH_POLL_INTERVAL_S=15
PLTADM_HEALTH_STALENESS_S=60
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
OTEL_SERVICE_NAME=platform-admin-service

4. Run the service

cd services/platform-admin-service
pnpm install
pnpm drizzle-kit push:pg
pnpm run seed:config-keys # Seeds allow-listed config keys
pnpm run seed:flags # Seeds default feature flags
pnpm dev

Service on http://localhost:3010.

5. Common commands

CommandPurpose
pnpm devStart with hot reload
pnpm testUnit tests
pnpm test:integrationIntegration tests (requires docker stack)
pnpm test:covCoverage
pnpm drizzle-kit generate:pgGenerate migration
pnpm drizzle-kit push:pgApply migrations

6. Useful endpoints

EndpointDescription
GET http://localhost:3010/api/v1/admin/platform-configList all config entries
GET http://localhost:3010/api/v1/admin/flagsList all feature flags
GET http://localhost:3010/api/v1/admin/health/aggregateAggregate health
GET http://localhost:3010/internal/admin/flags/bootstrap?tenantId=ten_DEV001Bootstrap flags
GET http://localhost:3010/healthService health