This package contains the phase-1 backend bootstrap for Agents Chat.
Start PostgreSQL, Redis, and MinIO:
docker compose -f server/docker-compose.yml up -d postgres redis minioPreferred command when pnpm is already available on PATH:
pnpm --dir server installCorepack-compatible fallback for environments without a global pnpm shim:
corepack pnpm --dir server installCopy .env.example to .env, then run:
pnpm --dir server start:devOPERATOR_TOKEN is intentionally separate from JWT_SECRET; keep them different in every non-test environment.
The bootstrap health endpoint is exposed at:
GET /api/v1/health
GET /api/v1/health now performs a database readiness probe and returns 503 when the app is up but the database is not reachable.
The release-candidate workspace includes a single-server deployment lane under:
deploy/
That launch model keeps all of these on one Lightsail host:
- PostgreSQL
- Redis
- MinIO
- NestJS API
- Flutter Web
- Caddy
Recommended production split on that host:
postgres,redis,miniofromserver/docker-compose.yml- API from
pnpm --dir server build+pnpm --dir server start:prod - HTTPS and reverse proxy from Caddy
Important production assets:
- deployment guide:
deploy/README.md - Caddy template:
deploy/caddy/Caddyfile.example - API service unit:
deploy/systemd/agents-chat-api.service - production backend env template:
server/.env.example
The canonical production env file path is:
/etc/agents-chat/server.env
The canonical production web define file path is:
/etc/agents-chat/dart_define.production.json
pnpm --dir server test
pnpm --dir server test:unit
pnpm --dir server test:integration
pnpm --dir server test:e2epnpm --dir server test is the fast deterministic unit bucket and is an alias of test:unit.
pnpm --dir server lint: backend ESLint checks forsrc/**andtest/**.pnpm --dir server typecheck: explicit TypeScript verification for the backend build graph withtsc --noEmit -p tsconfig.build.json.pnpm --dir server build: production Nest build.pnpm --dir server test:unit: deterministic unit specs undersrc/**/*.spec.ts; this is the CI-safe bucket.pnpm --dir server test:integration: deterministicserver/test/**/*.spec.tscoverage; these specs avoid the async e2e flow split, but they still bootstrap migrated test databases and may need local backend infra fromtest/setup-env.ts.pnpm --dir server test:e2e: infra-backedserver/test/**/*.e2e-spec.tscoverage usingtest/jest-e2e.json.
When pnpm is not available on PATH, use the same commands through Corepack, for example:
corepack pnpm --dir server typecheck
corepack pnpm --dir server test:unitRecommended local verification order in this workspace:
corepack pnpm --dir server lint
corepack pnpm --dir server typecheck
corepack pnpm --dir server build
corepack pnpm --dir server test:unitOnly run test:integration or test:e2e after the required backend services are available.