Buildml validates every environment variable at application startup usingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Praashh/buildml/llms.txt
Use this file to discover all available pages before exploring further.
@t3-oss/env-nextjs. The schema is defined in src/env.js and uses Zod for runtime type-checking. If a required variable is missing or malformed, the process will throw and refuse to start — there are no silent failures.
Database
PostgreSQL connection string used by Prisma and the
@prisma/adapter-pg driver. Must be a valid URL.Format: postgresql://user:password@host:5432/dbnameExample: postgresql://postgres:password@localhost:5432/buildmlAuthentication
Random secret used by NextAuth.js to sign and verify JWT session tokens. The
runtimeEnv in src/env.js reads this from process.env.NEXTAUTH_SECRET — you must use the key NEXTAUTH_SECRET in your .env file.The project’s
.env.example shows AUTH_SECRET (the NextAuth.js v5 default alias name), but src/env.js maps NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET directly. Setting AUTH_SECRET alone will not be picked up — use NEXTAUTH_SECRET.- Required in production — the Zod schema enforces
z.string()whenNODE_ENV === "production". - Optional in development — treated as
z.string().optional()so local runs work without it.
OAuth 2.0 client ID for the Google provider. Obtained from the Google Cloud Console under APIs & Services → Credentials.Example:
123456789012-abcdefghijklmnopqrstuvwxyz012345.apps.googleusercontent.comOAuth 2.0 client secret paired with
GOOGLE_CLIENT_ID. Keep this value private and never commit it to version control.Upstash Redis
Buildml uses Upstash Redis for rate limiting (via@upstash/ratelimit) and for storing ephemeral RUN results. Two Redis clients are initialised in the codebase: src/lib/rate-limiter.ts uses Redis.fromEnv() (which reads these variables automatically by name), and src/lib/redis.ts constructs a Redis instance with the values explicitly via env.UPSTASH_REDIS_REST_URL and env.UPSTASH_REDIS_REST_TOKEN.
The HTTPS REST endpoint for your Upstash Redis database.Example:
https://your-instance.upstash.ioBearer token used to authenticate requests to the Upstash Redis REST API. Found in the Upstash console under your database’s REST API tab.
Upstash QStash
QStash is the message queue that decouples code submission requests from execution. The client and receiver are initialised insrc/lib/qstash.ts.
Token used by the QStash
Client to publish messages to the queue. Passed when constructing new Client({ token }).Current signing key used by the QStash
Receiver to verify the upstash-signature header on incoming webhook requests at /api/webhooks/process-submission.Next signing key used by the QStash
Receiver during key rotation. Ensures the webhook handler continues to accept messages while the signing key is being rolled over.Deployment
Full public URL of the deployed Next.js application, without a trailing slash. Internally mapped to
DEPLOYMENT_URL in src/env.js via runtimeEnv: { DEPLOYMENT_URL: process.env.NEXT_PUBLIC_DEPLOYMENT_URL }. Used by the submission router to build the absolute callback URL passed to QStash so it knows where to deliver webhooks.Examples:- Production:
https://buildml.vercel.app - Local tunnel:
https://abc123.ngrok.io
Executor
Base URL of the FastAPI code execution service. Buildml appends
/execute to this value when dispatching execution requests.Default: http://localhost:8000Example (Docker): http://executor:8000Shared secret sent in the
x-secret request header to authenticate calls from the Next.js webhook handler to the FastAPI executor.Default: dev-secretOther
Standard Node.js environment identifier. Accepted values:
development, test, production. Defaults to development.Affects several behaviours including whether NEXTAUTH_SECRET is required and which Prisma client logging level is active.Set to any truthy string (e.g.
"1" or "true") to bypass the @t3-oss/env-nextjs validation step entirely. Useful in CI pipelines or Docker build steps where runtime secrets are not available at build time.Quick-start .env template
Copy the block below into a .env file at the project root and fill in your values. Refer to the sections above for where to obtain each credential.
.env