Platform Admin Service — Local Dev Setup
Status: populated Owner: TBD Last updated: 2026-04-18
1. Prerequisites
| Tool | Version |
|---|---|
| Node.js | 22 LTS |
| pnpm | 9.x |
| Docker Desktop | 4.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
| Command | Purpose |
|---|---|
pnpm dev | Start with hot reload |
pnpm test | Unit tests |
pnpm test:integration | Integration tests (requires docker stack) |
pnpm test:cov | Coverage |
pnpm drizzle-kit generate:pg | Generate migration |
pnpm drizzle-kit push:pg | Apply migrations |
6. Useful endpoints
| Endpoint | Description |
|---|---|
GET http://localhost:3010/api/v1/admin/platform-config | List all config entries |
GET http://localhost:3010/api/v1/admin/flags | List all feature flags |
GET http://localhost:3010/api/v1/admin/health/aggregate | Aggregate health |
GET http://localhost:3010/internal/admin/flags/bootstrap?tenantId=ten_DEV001 | Bootstrap flags |
GET http://localhost:3010/health | Service health |