How aryansrivastava07/quizzcraft-next-nest works
QuizzCraft is a quiz-creation and live-quiz platform with a Next.js client and NestJS API. The main workflow is a user creating or joining a quiz: the client calls the quiz API, whose controller delegates quiz operations to a service that uses AI and persists quiz and attempt data. The product also includes account and profile management, quiz discovery and administration, scheduled quizzes, and email notifications. Backend relationships are supported by excerpts and the source index; some client-to-API and scheduling connections are documented or implied but not shown in source excerpts.
Main entry points: api API services · quiz.service.ts Quiz operations · profile.service.ts Profile service · auth.service.ts Account service
Components 22
Web client
- Quiz experiences
client/src/app - API services
client/src/lib/api - Authentication UI
client/src/app/auth/page.tsx - Profile UI
client/src/app/profile/page.tsx
Quiz lifecycle
- Quiz endpoints
backend/src/quiz/quiz.controller.ts - Quiz operations
backend/src/quiz/quiz.service.ts - Quiz records
backend/src/schemas/quiz.schema.ts - Attempt records
backend/src/schemas/attempts.schema.ts - Quiz scheduler
backend/src/quiz/quiz-scheduler.service.ts
Accounts and profiles
- Auth endpoints
backend/src/auth/auth.controller.ts - Account service
backend/src/auth/auth.service.ts - User records
backend/src/schemas/user.schema.ts - Profile endpoints
backend/src/profile/profile.controller.ts - Profile service
backend/src/profile/profile.service.ts
Backend platform
- Redis service
backend/src/redis/redis.service.ts - Health checks
backend/src/health/health.controller.ts
External services
- AI provider
backend/src/ai/providers/gemini.provider.ts - Mail service
backend/src/mail/mail.service.ts - Email delivery
backend/src/mail/mail.provider.ts
Other components
- Quiz user
- MongoDB
- Resend
Connections 27
- Quiz user → Quiz experiences: uses
- Quiz experiences → API services: requests
- API services → Quiz endpoints: routes requests
client/src/lib/api/routes.ts - Quiz endpoints → Quiz operations: delegates
backend/src/quiz/quiz.controller.ts - Quiz operations → AI provider: generates with
backend/src/quiz/quiz.service.ts - Quiz operations → Quiz records: reads and writes
backend/src/quiz/quiz.service.ts - Quiz operations → Attempt records: records attempts
backend/src/quiz/quiz.service.ts - Quiz operations → Quiz scheduler: scheduled operations
- Quiz user → Authentication UI: authenticates
- Authentication UI → API services: uses
- API services → Auth endpoints: routes requests
client/src/lib/api/routes.ts - Auth endpoints → Account service: delegates
backend/src/auth/auth.controller.ts - Account service → User records: reads and writes
backend/src/auth/auth.service.ts - Account service → Redis service: stores OTPs
backend/src/auth/auth.service.ts - Account service → Mail service: sends messages
backend/src/auth/auth.service.ts - Quiz user → Profile UI: manages profile
- Profile UI → API services: uses
- API services → Profile endpoints: routes requests
- Profile endpoints → Profile service: delegates
backend/src/profile/profile.controller.ts - Profile service → User records: reads and writes
backend/src/profile/profile.service.ts - Profile service → Quiz records: reads
backend/src/profile/profile.service.ts - Profile service → Attempt records: reads
backend/src/profile/profile.service.ts - Profile service → Mail service: sends ticket mail
backend/src/profile/profile.service.ts - Mail service → Resend: delivers email
backend/src/mail/mail.service.ts - MongoDB → User records: stores records
- MongoDB → Quiz records: stores records
- MongoDB → Attempt records: stores records