1
Prerequisites
- Node.js 18+
- npm
- MongoDB Atlas (recommended) or local MongoDB
- Google Cloud OAuth 2.0 Web client
- Optional: Redis for multi-instance step locking
2
Clone and install
3
Create environment file
.env.local.4
Configure Google OAuth
- Open Google Cloud Console.
- Create OAuth 2.0 Client IDs → Web application.
- Authorized JavaScript origin:
http://localhost:3000 - Authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Copy Client ID and Client Secret into
.env.local.
5
Seed an authorized user
Google sign-in rejects any Update
@schools.nyc.gov address that is not already in the users collection.src/scripts/seed-users.js to match the accounts you actually need before running it in production.6
Start the app
Verify the stack
- Health checks
- Production build
currentYear (July–June school year), requiredPlans, and schoolsServed. Super Admins can also open /admin/system after sign-in.After Mongoose schema changes, restart
npm run dev. Next.js can keep a stale model in memory.