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.Build notes
typescript.ignoreBuildErrorsis false. Extra named exports onpage.jsfiles fail the build.pdfkit,fontkit, andiconv-liteare server externals (serverExternalPackagesplus webpack). PDF export uses the pdfkit CJS build.outputFileTracingRootis pinned to the repo so a stray home-directory lockfile is ignored.
Post-deploy checklist
GET https://<host>/api/public/overviewreturns the current school year.- Sign in with a seeded
@schools.nyc.govuser. - Open
/dashboardand a form. - Super Admin:
/admin/questionsshows published or JSON fallback. - Super Admin:
/admin/systemshows MongoDB connected; Redis healthy or explicitly not configured. - Confirm archived years are read-only after rollover.
Domains
Set the canonical URL insrc/app/layout.js metadataBase via NEXTAUTH_URL. Open Graph copy currently describes the 2026-2027 academic year.