Building a Multi-Tenant Education Platform with Next.js and NestJS
ClassTablet is a multi-tenant management platform for students, teachers, and parents. As Founding Engineer, I helped design and ship end-to-end product flows spanning a Next.js dashboard and a NestJS + Fastify API backed by PostgreSQL (Drizzle) and Redis.
Why a monorepo?
We standardized on a Turborepo + pnpm workspace so the dashboard, API, and shared packages evolve together. Shared Zod contracts validate request/response shapes at compile time and runtime, reducing drift between frontend and backend.
Core product surfaces
- Classrooms: hub, scheduling, enrollments, assignments, quizzes, and attendance
- Live sessions: Amazon IVS integration for playback, broadcast, and chat
- Payments & billing: automated workflows with parent-facing dashboards
- Notifications: web-push on the API plus email, WhatsApp, and SMS channels
Reliability choices
Sentry handles observability. BullMQ runs background jobs. AWS S3 and CloudFront store and serve files. Playwright and Vitest cover the app; Jest covers the API. Authentication uses better-auth with a shadcn-style UI layer on Tailwind.
Takeaway
Multi-tenant education software rewards explicit tenant boundaries, shared contracts, and observability from day one, not bolted on after launch.