Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/TinsFox/ai-review/llms.txt

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

Copy .env.example from the repository root to .env and fill in the required values before starting the server.

Required

DATABASE_URL
string
required
PostgreSQL connection string.Format: postgresql://username:password@host:port/databaseExample: postgresql://ai_review:ai_review@localhost:15432/ai_review
BETTER_AUTH_SECRET
string
required
Secret key used by Better Auth for session signing. Must be at least 32 characters long.

Server

NODE_ENV
string
default:"development"
Runtime environment. Accepted values: development, production, test.
PORT
number
default:"3000"
Port the API server listens on.
HOSTNAME
string
default:"localhost"
Hostname or IP address the server binds to.
APP_URL
string (URL)
Public URL of the application. Used as the canonical base URL and as the default value for APP_URLs and BETTER_AUTH_URL when those are not set explicitly.
APP_URLs
string
default:"http://localhost:3000"
Comma-separated list of allowed application URLs used for CORS and redirect validation. Defaults to APP_URL when APP_URL is set.
API_URL
string (URL)
Backend API URL used by the web development proxy. Defaults to APP_URL.
WEBHOOK_BASE_URL
string (URL)
Base URL for outbound webhook callbacks (e.g., GitLab/GitHub event verification replies).
BETTER_AUTH_URL
string (URL)
Override the URL Better Auth uses for its endpoints. Defaults to the first entry in the resolved APP_URLs list.
SYSTEM_NAME
string
Display name for the platform. Appears in logs, emails, and notification messages. Example: AI Review Platform.
CORS_ORIGIN
string
Explicit CORS origin override. If not set, CORS is derived from APP_URLs.

Queue

REDIS_URL
string
required
Redis connection URL required by BullMQ for persistent task queues. The server throws an error on startup if this is not set.Example: redis://localhost:16379

AI provider

VOLCENGINE_API_KEY
string
API key for the Volcengine (Doubao) AI provider. Required for AI-powered code reviews — Volcengine is the only currently active provider.
VOLCENGINE_ENDPOINT
string
Inference endpoint URL for your Volcengine deployment. Required alongside VOLCENGINE_API_KEY.
AI_REVIEW_CONCURRENCY
number
default:"3"
Maximum number of AI review jobs executed concurrently by the server.
REVIEW_TIMEOUT_MINUTES
number
default:"30"
Timeout in minutes for a single review job before it is marked as failed.
OPENAI_API_KEY
string
OpenAI API key. Parsed by the schema but not active in the current release.
ANTHROPIC_API_KEY
string
Anthropic Claude API key. Parsed by the schema but not active in the current release.
AZURE_OPENAI_API_KEY
string
Azure OpenAI API key. Parsed by the schema but not active in the current release.
AZURE_OPENAI_ENDPOINT
string
Azure OpenAI endpoint URL. Parsed by the schema but not active in the current release.
VERCEL_API_KEY
string
Vercel AI API key. Parsed by the schema but not active in the current release.
MOONSHOT_API_KEY
string
Moonshot API key. Parsed by the schema but not active in the current release.

Runner

RUNNER_HEARTBEAT_TIMEOUT_MS
number
default:"60000"
Milliseconds after which a Runner that has not sent a heartbeat is considered offline. Default is 60 000 ms (60 seconds).

Logging

LOG_DIR
string
Directory path where log files are written. Example: ./logs.
LOG_LEVEL
string
Minimum log level to emit. Accepted values: error, warn, info, debug.
LOG_RETENTION_DAYS
number
Number of days to retain log files before automatic cleanup.

Backup

BACKUP_DIR
string
Directory path for database backup files. Example: ./backups.
AUTO_BACKUP_ENABLED
boolean
default:"false"
When true, the server runs an automatic database backup daily at 02:00.
BACKUP_RETENTION_DAYS
number
Number of days to keep backup files before they are deleted.

Metrics

METRICS_RETENTION_DAYS
number
Number of days to retain metrics data. Example: 90.

System

RESET_DB_KEY
string
Secret key required to call POST /api/system/reset. Keep this value private; the endpoint deletes all data.
ROOT_EMAIL
string
Email address for the initial root user created on first startup. Has no effect after the root user already exists.
ROOT_PASSWORD
string
Password for the initial root user created on first startup.

OAuth (optional)

GITHUB_CLIENT_ID
string
GitHub OAuth application client ID. Reserved for future OAuth login support.
GITHUB_CLIENT_SECRET
string
GitHub OAuth application client secret. Reserved for future OAuth login support.
GITLAB_CLIENT_ID
string
GitLab OAuth application client ID. Reserved for future OAuth login support.
GITLAB_CLIENT_SECRET
string
GitLab OAuth application client secret. Reserved for future OAuth login support.
GITLAB_CLIENT_ISSUER
string
Issuer URL for the GitLab instance used for OAuth. Example: https://gitlab.example.com.

Build docs developers (and LLMs) love