Skip to main content

Vercel

The app is a standard Next.js project (package.json name d79-directory).
1

Connect the Git repository

Import the project in Vercel. Framework preset: Next.js. Build command is next build --webpack via npm run build.
2

Set environment variables

See Environment variables. Production NEXTAUTH_URL must match the live origin (for example https://district79.school).
3

OAuth production client

Add the production authorized redirect URI in Google Cloud. Preview deployments need either a wildcard-unfriendly extra client or a fixed preview URL.
4

MongoDB Atlas network

Allow Vercel egress. Prefer Atlas Network Access 0.0.0.0/0 only if IP lists are impractical; otherwise allow Vercel’s published IP ranges.
5

Redis

Point REDIS_URL at a production Redis (TLS URL if required) so step locks, caches, and save rate limits work across serverless instances.
Vercel deployment Caption: Add screenshot showing a successful Vercel production deployment for d79-directory-app.

Build notes

  • typescript.ignoreBuildErrors is false. Extra named exports on page.js files fail the build.
  • pdfkit, fontkit, and iconv-lite are server externals (serverExternalPackages plus webpack). PDF export uses the pdfkit CJS build.
  • outputFileTracingRoot is pinned to the repo so a stray home-directory lockfile is ignored.

Post-deploy checklist

  1. GET https://<host>/api/public/overview returns the current school year.
  2. Sign in with a seeded @schools.nyc.gov user.
  3. Open /dashboard and a form.
  4. Super Admin: /admin/questions shows published or JSON fallback.
  5. Super Admin: /admin/system shows MongoDB connected; Redis healthy or explicitly not configured.
  6. Confirm archived years are read-only after rollover.

Domains

Set the canonical URL in src/app/layout.js metadataBase via NEXTAUTH_URL. Open Graph copy currently describes the 2026-2027 academic year.