Skip to main content

Documentation Index

Fetch the complete documentation index at: https://familyco.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

FamilyCo reads its configuration from a .env file at the repo root (server) and apps/web/.env (renderer). Copy the examples to start:
cp .env.example .env
cp apps/web/.env.example apps/web/.env

Runtime

VariableDefaultDescription
NODE_ENVdevelopmentdevelopment · production · test.
PORT4000Fastify HTTP port (server / CLI mode only — Electron picks a free port).
API_PREFIX/api/v1URL prefix for all API routes.

Storage and database

VariableDefaultDescription
FAMILYCO_REPOSITORY_DRIVERprismaprisma (SQLite via Prisma) or memory (lost on restart).
DATABASE_URLfile:./prisma/dev.dbSQLite file path used by Prisma.
FAMILYCO_MIGRATIONS_PATH(unset)Optional override for runtime migration path (server / electron packaging).
In Electron Desktop, DATABASE_URL is set automatically to the OS user-data folder:
  • macOS: ~/Library/Application Support/FamilyCo/familyco.db
  • Windows: C:\Users\<user>\AppData\Roaming\FamilyCo\familyco.db
  • Linux: ~/.config/FamilyCo/familyco.db

Queue

VariableDefaultDescription
FAMILYCO_QUEUE_DRIVERmemoryJob queue driver. memory is in-process (jobs lost on restart).
FAMILYCO_QUEUE_AGENT_CONCURRENCYautoOverride agent concurrency. Auto: max(2, floor(cpu/2)).
FAMILYCO_QUEUE_TOOL_CONCURRENCYautoOverride tool concurrency. Auto: max(4, cpu).

Authentication and security

VariableDescription
FAMILYCO_API_KEYInternal API key used by the Electron shell to talk to the embedded server. Also serves as the bootstrap API key on first run.
JWT_SECRETSecret used to sign JWT session tokens.
API_KEY_SALTSalt used when hashing API keys before storing them.
Generate strong secrets in production. For example: openssl rand -hex 32. Rotating API_KEY_SALT invalidates all existing API keys.

Renderer (apps/web/.env)

Only needed when running the web client standalone against an external server:
VariableDescription
VITE_API_BASE_URLAPI base URL (default http://127.0.0.1:4000).
VITE_API_KEYAPI key for the renderer.
VITE_BEARER_TOKENOptional pre-issued JWT.

Read-only mode

If startup migration safety fails, the server enters read-only mode. Mutation routes return 503 READ_ONLY_MODE until you fix the database state and restart. The health endpoint reports read-only status.