Build, Lint & Deployment Runbook
OperationsStep-by-step build lifecycle, TypeScript verification, linting, and production deployment instructions.
Compilation & Build Pipeline
The project compiles with Next.js 15 App Router and standalone output mode:
# Production optimized build
npm run build- Standalone Output: Configured with
output: 'standalone'innext.config.js. This creates a lightweight self-contained server bundle in.next/standaloneoptimized for Docker containers, Google Cloud Run, and Kubernetes. - Turbopack Compiler: Next.js 15 uses Turbopack for near-instant hot module replacement and build compilation.
Linting & Static Analysis
Linting is enforced with TypeScript typechecking in package.json:
# Run TypeScript static analysis
npm run lintRuns tsc --noEmit against the entire project tree, verifying route types, prop interfaces, and Fourthwall DTO contracts.
Running Test Suites
Vitest is configured for unit and integration testing:
# Run test suite once
npm test
# Run tests in watch mode
npm run test:watchProduction Deployment Guide
Option A: Vercel (Native)
1. Push codebase to GitHub or connect repository.
2. Vercel automatically detects Next.js 15 and configures Edge Middleware and Serverless Functions.
3. Define required environment variables in the Vercel Project Settings:
NEXT_PUBLIC_FW_API_URLNEXT_PUBLIC_FW_STOREFRONT_TOKENNEXT_PUBLIC_FW_CHECKOUT
Option B: Docker / Container Platforms (Cloud Run / AWS ECS)
1. The output: 'standalone' build creates .next/standalone/server.js.
2. Package with Node.js 22 LTS container.
3. Expose port 3000 (PORT=3000).
4. Execute node .next/standalone/server.js.
