A REST adapter next to GraphQL (presenters/http) that calls the same application services, so validation, permissions and domain errors are the same: projects (members, board, stats, activity), issues (search, workflow, assignee, release, links, comments, history), comments, releases and users. Projects and issues can be addressed by id or key (WEB, WEB-12). - Swagger UI at /api/docs, document at /api/docs-json and apps/api/openapi.json (rewritten by `nx serve api`, like schema.gql) for client generation. - Every route but health/auth/webhook needs a Pireon token: the document declares Pireon OAuth2 (authorization code + PKCE, password) through the /api/auth/token proxy, and a bearer scheme for apps with their own client. - configureApp() shares main.ts setup with the e2e, which now also covers REST. - SWAGGER_ENABLED / OPENAPI_FILE config; docs 03/05 and library READMEs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.4 KiB
Plaintext
38 lines
1.4 KiB
Plaintext
PORT=3000
|
|
|
|
# Write model (commands)
|
|
POSTGRES_URL=postgres://taskstream:taskstream@localhost:5432/taskstream
|
|
# Creates/updates tables from the entities. Use migrations in production.
|
|
POSTGRES_SYNCHRONIZE=true
|
|
|
|
# Read model (queries)
|
|
MONGO_URL=mongodb://localhost:27017/taskstream_read
|
|
|
|
# Event stream (write → read), GraphQL pub/sub and session cache
|
|
REDIS_URL=redis://localhost:6379
|
|
EVENT_STREAM_KEY=task-stream:events
|
|
# Set to false on API-only instances when the events bridge (projections) runs elsewhere
|
|
EVENTS_BRIDGE_ENABLED=true
|
|
|
|
# Pireon identity server (https://oauth.pireon.dev/api/documentation)
|
|
PIREON_BASE_URL=https://oauth.pireon.dev
|
|
# Secret returned when registering the webhook (POST /api/clients/{client}/webhooks)
|
|
PIREON_WEBHOOK_SECRET=
|
|
# OAuth client registered for task-stream (POST /api/clients). Needed by the web app to sign in.
|
|
# Redirect URI to register: http://localhost:4200/auth/callback
|
|
PIREON_CLIENT_ID=
|
|
PIREON_CLIENT_SECRET=
|
|
PIREON_SCOPES=users:read
|
|
PIREON_PASSWORD_GRANT=true
|
|
AUTH_SESSION_TTL_SECONDS=60
|
|
|
|
GRAPHQL_PLAYGROUND=true
|
|
|
|
# REST + OpenAPI for other apps (Swagger UI at /api/docs). The document is also written to OPENAPI_FILE.
|
|
SWAGGER_ENABLED=true
|
|
OPENAPI_FILE=apps/api/openapi.json
|
|
|
|
# Docker builds only: token of Pireon's Nexus for @pi/ui (build secret, never stored in an image).
|
|
# Locally: export NEXUS_TOKEN=$(grep '^//nexus.pireon.dev/repository/npm-releases/:_authToken=' ~/.npmrc | cut -d= -f2-)
|
|
NEXUS_TOKEN=
|