The local server depends on PostgreSQL with pgvector, Redis, Mailpit, the AFFiNE server native package, and a server environment file. The checked-in development Compose file, development Docker environment example, server environment example, and @affine/server package scripts are the current source of truth. Use the server development guide for orientation; it may lag behind the checked-in configuration and scripts.
The supported flow is:
.docker/dev/compose.yml.example to .docker/dev/compose.yml and .docker/dev/.env.example to .docker/dev/.env;yarn affine @affine/server-native build;packages/backend/server/.env.example to packages/backend/server/.env;DATABASE_URL, the Redis settings, and any other required entries to match the copied .docker/dev/.env; do not hard-code credentials or assume commented defaults already match the Compose configuration;yarn affine server init after schema or data migrations change;yarn affine server dev.Run the web app separately when testing client/server behavior. Do not use development accounts, passwords, or environment files in a deployed environment.