Skip to main content
The District 79 Directory is a Next.js App Router application that principals and authorized district staff use to write, copy, compare, review, and submit Consolidated School Plans for each academic year. District 79 Directory homepage Caption: Add screenshot showing the public portal homepage with year tags, Sign in, and the live district snapshot.

Quickstart

Run the app locally with MongoDB, Google OAuth, and a seeded user.

School-year workflow

Copy 2025-2026 answers into a 2026-2027 draft, then archive last year.

API reference

Session-authenticated REST routes for forms, users, and Super Admin tools.

System health

Super Admin snapshot of API, MongoDB size, Redis, and env checklist.

Data models

Mongoose schemas for users, plans, question bank, comments, and audit logs.

Troubleshooting

401/403/429, OAuth bounce, Redis, and role-preview FAQ.

What this system does

  • Stores one school plan per school per academic year (YYYY-YYYY).
  • Renders plan sections from a published question bank (FormTemplate), with src/data/formQuestions.json as fallback.
  • Copies all answers when duplicating a plan into the next year. Reviews, comments, and sharing are not copied.
  • Locks archived years as read-only after district rollover.
  • Restricts sign-in to pre-registered @schools.nyc.gov accounts via Google OAuth.
  • Gives Super Admins a System page (/admin/system) for API, MongoDB, and Redis health.

Stack

Non-negotiable data contract

Answers are always stored at:
Do not rename question IDs, delete questions that already have answers, or rewrite formData during question-bank edits. Existing plans keep the questionBankVersion they were created with.
Super Admin (level 5) is the only role that can publish the question bank, run year rollover, manage district-wide submissions/goals, add review comments, and open System health.