Deployment and Operations
The production start command runs two local servers: FastAPI serves the API and the built React SPA, while a separate static server serves the built documentation site.
Build and Start
Root scripts:
npm run install:all
npm run build
npm start
npm run build builds the web app, builds the docs site, and syncs the backend
environment.
Server Startup
npm start runs scripts/start-production.sh, which starts:
npm --prefix docs-site run serve -- --host "$DOCS_HOST" --port "$DOCS_PORT"
uv run python -m app.run
The API entrypoint:
- Ensures the target database exists.
- Runs
alembic upgrade head. - Starts uvicorn.
The docs server defaults to http://localhost:3050. Override it with
DOCS_PORT and DOCS_HOST.
Required Environment
Minimum production values:
DATABASE_URLJWT_SECRET
Common optional values:
WEB_ORIGINCORS_ORIGINADMIN_EMAILSRESEND_API_KEYDISCORD_CLIENT_IDDISCORD_CLIENT_SECRETVOYAGE_API_KEYANTHROPIC_API_KEYLANGFUSE_*LANGSMITH_*DOCS_PORTDOCS_HOST
See README.md and server/.env.example for the full list.
Storage
Plan persistent storage for:
- Private core-rule files under
server/storage/. - Public media/uploads under the configured uploads root.
- PostgreSQL data, including pgvector embeddings.
Do not rely on ephemeral filesystem storage for uploaded user content.
Health and Static Serving
The API exposes health checks and serves:
/api/*for backend routes./uploads/*for public media.- SPA fallback for frontend routes when
web/distexists.
Domain 404s from API handlers are preserved and not replaced with the SPA shell.
Operational Checks
- Confirm migrations apply on deploy.
- Confirm
web/distexists after build. - Confirm
docs-site/buildexists after build. - Confirm
DOCS_PORTis available where the docs server should run. - Confirm upload/private storage paths are mounted persistently.
- Confirm AI provider keys are present only where AI features should work.
- Confirm Langfuse/LangSmith tracing keys are either valid or absent.