Skip to main content

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).
VariableRequiredDescription
DATABASE_URL✅ YesPostgreSQL 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.
VariableRequiredDefaultDescription
PORTNo8000HTTP port for the Express 5 server
NODE_ENVNodevelopmentRuntime mode. Either development or production
BASE_URLNohttp://localhost:8000The API’s own public URL. Used when generating the OpenAPI document base path
FRONTEND_URLNohttp://localhost:3000The 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.
VariableRequiredDescription
NEXT_PUBLIC_API_URL✅ YesBase 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✅ YesThe 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.
VariableRequiredDescription
BETTER_AUTH_SECRET✅ YesUsed to sign cookies and session tokens. Generate a secure value with openssl rand -base64 32
BETTER_AUTH_URL✅ YesMust equal the API’s own public URL. better-auth uses this to build OAuth redirect URIs and verify state parameters
GOOGLE_CLIENT_ID✅ YesOAuth 2.0 Client ID from Google Cloud Console
GOOGLE_CLIENT_SECRET✅ YesOAuth 2.0 Client Secret from Google Cloud Console
GITHUB_CLIENT_ID✅ YesClient ID from your GitHub OAuth App
GITHUB_CLIENT_SECRET✅ YesClient 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.
VariableRequiredDescription
GITHUB_APP_ID✅ YesNumeric App ID shown on the GitHub App settings page
GITHUB_APP_PRIVATE_KEY✅ YesPEM-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✅ YesSecret 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.
VariableRequiredDescription
DEFAULT_AI_PROVIDERNoActive provider. One of: anthropic, openai, google, deepseek. Defaults to openai
DEFAULT_AI_MODELNoModel string for the active provider. E.g., gemini-2.0-flash, claude-sonnet-4-6, gpt-4o. Defaults to gpt-4o-mini
ANTHROPIC_API_KEYConditionalRequired for the anthropic provider. Also required for AI PR review, which always uses Anthropic regardless of the default provider
OPENAI_API_KEYConditionalRequired for the openai provider
GOOGLE_GENERATIVE_AI_API_KEYConditionalRequired for the google provider (the default for the Free plan)
DEEPSEEK_API_KEYConditionalRequired 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.
VariableRequiredDescription
E2B_API_KEY✅ YesAPI key from your e2b.dev dashboard
E2B_TEMPLATE_ID✅ YesID 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.
VariableRequiredDescription
RAZORPAY_KEY_ID✅ YesRazorpay API key ID (the publishable key, sent to the frontend during checkout)
RAZORPAY_KEY_SECRET✅ YesRazorpay API key secret (server-side only, never exposed to the client)
RAZORPAY_WEBHOOK_SECRET✅ YesSecret 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

VariableRequiredDefaultDescription
LOGGER_LEVELNodebugLog 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

Build docs developers (and LLMs) love