Documentation Index
Fetch the complete documentation index at: https://mintlify.com/paramveer-cyber/Deployaar/llms.txt
Use this file to discover all available pages before exploring further.
Deployaar uses environment variables to manage every external service credential — nothing sensitive is hard-coded. Both apps/api and apps/web consume most variables from a shared root .env file, but variables prefixed with NEXT_PUBLIC_ must be explicitly set in the web app’s environment because Next.js bakes them into the client bundle at build time.
For local development, copy the root .env.example into both application directories:cp .env.example apps/api/.env
cp .env.example apps/web/.env
Then fill in your real secrets. Never commit either file to version control.
Database
The database layer uses Drizzle ORM against a PostgreSQL database (Neon serverless is used in production).
| Variable | Required | Description |
|---|
DATABASE_URL | ✅ Yes | PostgreSQL connection string. Format: postgresql://user:pass@host:5432/dbname |
Example:
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/dev
API Server
These variables are consumed by apps/api/src/env.ts via a Zod-validated schema at startup.
| Variable | Required | Default | Description |
|---|
PORT | No | 8000 | HTTP port for the Express 5 server |
NODE_ENV | No | development | Runtime mode. Either development or production |
BASE_URL | No | http://localhost:8000 | The API’s own public URL. Used when generating the OpenAPI document base path |
FRONTEND_URL | No | http://localhost:3000 | The web app’s public URL. Set as the CORS origin on the Express app |
Example:
PORT=8000
NODE_ENV=production
BASE_URL=https://deployaar.onrender.com
FRONTEND_URL=https://deployaar.paramveer.xyz
Web App (NEXT_PUBLIC_* Variables)
These variables must be present in apps/web/.env (or in your Vercel project environment settings) because Next.js embeds them into the client-side JavaScript bundle at build time.
| Variable | Required | Description |
|---|
NEXT_PUBLIC_API_URL | ✅ Yes | Base URL for the tRPC client in the browser. Must point to the /trpc mount on the API. E.g., http://localhost:8000/trpc |
NEXT_PUBLIC_WEB_URL | ✅ Yes | The web app’s own public URL. Added to better-auth’s trustedOrigins list to allow cross-origin auth flows |
Example:
NEXT_PUBLIC_API_URL=http://localhost:8000/trpc
NEXT_PUBLIC_WEB_URL=http://localhost:3000
Authentication (better-auth)
Deployaar uses better-auth with a Drizzle/PostgreSQL adapter. These variables configure the auth instance in packages/services/auth/auth.ts.
| Variable | Required | Description |
|---|
BETTER_AUTH_SECRET | ✅ Yes | Used to sign cookies and session tokens. Generate a secure value with openssl rand -base64 32 |
BETTER_AUTH_URL | ✅ Yes | Must equal the API’s own public URL. better-auth uses this to build OAuth redirect URIs and verify state parameters |
GOOGLE_CLIENT_ID | ✅ Yes | OAuth 2.0 Client ID from Google Cloud Console |
GOOGLE_CLIENT_SECRET | ✅ Yes | OAuth 2.0 Client Secret from Google Cloud Console |
GITHUB_CLIENT_ID | ✅ Yes | Client ID from your GitHub OAuth App |
GITHUB_CLIENT_SECRET | ✅ Yes | Client Secret from your GitHub OAuth App |
BETTER_AUTH_URL must exactly match the API’s public URL — the same value you set for BASE_URL. If these differ (for example, one uses a trailing slash or a different subdomain), OAuth flows will fail with a state_security_mismatch error during the callback step.
Example:
BETTER_AUTH_SECRET=your-secret-here
BETTER_AUTH_URL=https://deployaar.onrender.com
GOOGLE_CLIENT_ID=123456789-abc.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxxxxxxxxxxx
GITHUB_CLIENT_ID=Iv1.xxxxxxxxxxxxxxxx
GITHUB_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
GitHub App (Repository Access)
These credentials are for the GitHub App that Deployaar installs on user repositories to clone code, create branches, and open pull requests. This is separate from the GitHub OAuth App used for user authentication.
| Variable | Required | Description |
|---|
GITHUB_APP_ID | ✅ Yes | Numeric App ID shown on the GitHub App settings page |
GITHUB_APP_PRIVATE_KEY | ✅ Yes | PEM-encoded RSA private key downloaded from the GitHub App settings page. Newlines must be escaped as \n when stored in an env file |
GITHUB_WEBHOOK_SECRET | ✅ Yes | Secret string used to verify incoming GitHub webhook payloads via HMAC-SHA256 |
Example:
GITHUB_APP_ID=123456
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAK...\n-----END RSA PRIVATE KEY-----"
GITHUB_WEBHOOK_SECRET=your-webhook-secret
AI Providers
Deployaar abstracts over multiple AI providers using the Vercel AI SDK. The active provider and model are selected via the DEFAULT_AI_* variables. All provider keys are optional except where a specific feature always uses a particular provider.
| Variable | Required | Description |
|---|
DEFAULT_AI_PROVIDER | No | Active provider. One of: anthropic, openai, google, deepseek. Defaults to openai |
DEFAULT_AI_MODEL | No | Model string for the active provider. E.g., gemini-2.0-flash, claude-sonnet-4-6, gpt-4o. Defaults to gpt-4o-mini |
ANTHROPIC_API_KEY | Conditional | Required for the anthropic provider. Also required for AI PR review, which always uses Anthropic regardless of the default provider |
OPENAI_API_KEY | Conditional | Required for the openai provider |
GOOGLE_GENERATIVE_AI_API_KEY | Conditional | Required for the google provider (the default for the Free plan) |
DEEPSEEK_API_KEY | Conditional | Required for the deepseek provider (Pro Max plan only) |
Example:
DEFAULT_AI_PROVIDER=google
DEFAULT_AI_MODEL=gemini-2.0-flash
ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
OPENAI_API_KEY=sk-proj-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
GOOGLE_GENERATIVE_AI_API_KEY=AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
E2B Sandbox
The coding agent runs inside an E2B cloud sandbox to safely execute terminal commands and write files. The sandbox template must have Node.js and pnpm pre-installed.
| Variable | Required | Description |
|---|
E2B_API_KEY | ✅ Yes | API key from your e2b.dev dashboard |
E2B_TEMPLATE_ID | ✅ Yes | ID of your E2B sandbox template. The template must have Node.js and pnpm installed |
Example:
E2B_API_KEY=e2b_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
E2B_TEMPLATE_ID=rki5dems9wqfm4r03t7g
Razorpay (Billing)
Deployaar uses Razorpay to handle plan upgrades. All three variables are required for billing to work — the webhook secret is specifically used for HMAC-SHA256 verification of incoming payment events.
| Variable | Required | Description |
|---|
RAZORPAY_KEY_ID | ✅ Yes | Razorpay API key ID (the publishable key, sent to the frontend during checkout) |
RAZORPAY_KEY_SECRET | ✅ Yes | Razorpay API key secret (server-side only, never exposed to the client) |
RAZORPAY_WEBHOOK_SECRET | ✅ Yes | Secret for verifying webhook payloads arriving at /api/razorpay/webhook |
Example:
RAZORPAY_KEY_ID=rzp_live_xxxxxxxxxxxxxxxx
RAZORPAY_KEY_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
RAZORPAY_WEBHOOK_SECRET=your-webhook-secret
Logging
| Variable | Required | Default | Description |
|---|
LOGGER_LEVEL | No | debug | Log verbosity. One of: debug, info, warn, error. Use debug locally and info in production |
Complete .env.example
The following is the full .env.example from the repository root. It provides the minimal set of variables needed to boot the application locally. All other secrets (auth, AI providers, GitHub App, Razorpay) must be added manually — see the sections above for the exact variable names and descriptions.
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/dev
PORT=8000
NODE_ENV=development
BASE_URL=http://localhost:8000
NEXT_PUBLIC_API_URL=http://localhost:8000/trpc
LOGGER_LEVEL=debug