MindFlow uses environment variables to configure every deployment-specific value — database credentials, secret keys, service URLs, and feature flags. Secrets are never committed to the repository. Instead, each developer copies an example file locally, and production deployments read variables directly from the hosting provider’s secret vault. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/J0S3-LEON/pf_pruebasAseguramientoCalid_SDD/llms.txt
Use this file to discover all available pages before exploring further.
.env files on disk are listed in .gitignore and must never be pushed.
Initial setup
Copy the root-level example file to create your local environment configuration:.env in your editor and fill in the values marked as required below. Each application also ships its own example file (apps/backend/.env.example and apps/frontend/.env.example) if you prefer to manage variables per workspace rather than from the root.
Backend environment variables
These variables are read by the NestJS application at runtime. They must be present in the process environment before the server starts.| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL | Yes | — | Full PostgreSQL connection string. Format: postgresql://<user>:<password>@<host>:<port>/<database>. Add SSL parameters (e.g. ?sslmode=require) per provider in production. |
JWT_SECRET | Yes | — | Random string of at least 32 characters used to sign and verify JWTs. Must be different from AUTH_SECRET. |
FRONTEND_URL | Yes | http://localhost:3000 | Comma-separated list of origins the backend CORS policy permits. In production, set this to your exact frontend domain only. |
PORT | No | 3001 | HTTP port the NestJS server listens on. Hosted platforms (Render, Railway) typically assign this automatically via the environment. |
AI_SERVICE_API_KEY | Conditional | — | API key for the external LLM provider (OpenAI, Anthropic, etc.). Required when the Task Decomposer feature is enabled; can be left blank otherwise. |
NODE_ENV | No | development | Runtime mode. Set to production in all production deployments to enable optimisations and disable development-only logging. |
Backend example values
Frontend environment variables
These variables are read by the Next.js application. Variables prefixed withNEXT_PUBLIC_ are embedded into the client-side JavaScript bundle at build time — they must be set before the build runs and cannot be changed without rebuilding.
| Variable | Required | Default | Description |
|---|---|---|---|
NEXT_PUBLIC_API_URL | Yes | http://backend:3001/api/v1 | Public URL of the backend API including the /api/v1 prefix. Baked into the Next.js bundle at build time — the browser uses this to reach the backend (via the Next.js proxy in Docker Compose, or directly in production). |
NEXT_PUBLIC_APP_URL | Yes | http://localhost:3000 | Public URL of the frontend application. Used by Auth.js to construct callback and redirect URLs. |
AUTH_SECRET | Yes | — | Random string of at least 32 characters used by Auth.js to encrypt session tokens. Must be different from JWT_SECRET. |
AUTH_DEBUG | No | false | Enables Auth.js debug logging when set to true. Must be false in production — enabling it leaks session data to the server logs. |
Frontend example values
Docker Compose extra variables
The following additional variables are only used when running the full stack withdocker compose. They configure the PostgreSQL service and are not read by the application code directly — the application always connects via DATABASE_URL.
| Variable | Description |
|---|---|
POSTGRES_DB | Name of the PostgreSQL database to create (e.g. mindflow) |
POSTGRES_USER | PostgreSQL username (e.g. mindflow_user) |
POSTGRES_PASSWORD | Password for the PostgreSQL user — use a strong random value even locally |
Root .env.example (used by Docker Compose)
Generating secure secret values
Generate a cryptographically secure random secret with OpenSSL:JWT_SECRET and once for AUTH_SECRET — and store each output in your provider’s secret vault. Never reuse the same value for both variables.
Alternatively, you can generate This outputs a suitable random string and can optionally write it directly to your
AUTH_SECRET using the Auth.js CLI:.env file.