How harshverma-25/quizzyworld works
QUIZZY is a full-stack multiplayer quiz platform with solo practice, category-based quiz creation, real-time rooms and battles, match results, profiles, rankings, and administration. The principal flow is players selecting or creating a quiz, joining a room or starting solo practice, answering server-timed questions, then reviewing results and history. The graph preserves major documented capabilities, including authentication, payments, and AI quiz generation. Source excerpts and the index establish only selected internal calls; other links are limited to README-documented communication or omitted where wiring is unverified.
Main entry points: auth.service.ts Authentication · socket.ts Socket gateway · useLiveBattle.ts Battle client · room.service.ts Room workflows
Components 30
Web client
- Next.js app
client/app/(public)/page.tsx - Category browsing
client/components/categories/CategoryDetailClient.tsx - Quiz creator
client/components/create/QuizCreatorClient.tsx - Room lobby
client/app/(protected)/lobby/[roomCode]/page.tsx - Battle client
client/features/battle/hooks/useLiveBattle.ts - Match results
client/app/(match)/results/[matchId]/page.tsx - Profile and rankings
client/features/profile/hooks/useUserProfile.ts - Match history
client/features/history/hooks/useMatchHistory.ts - Admin suite
client/app/(admin)/admin/categories/page.tsx - API client
client/hooks/useApiClient.ts
Quiz and battle
- Room workflows
server/src/modules/room/room.service.ts - Battle engine
server/src/modules/battle/battle.service.ts - Question bank
server/src/modules/question/question.service.ts - Quiz generation
server/src/modules/quiz/quiz.service.ts - Socket gateway
server/src/sockets/socket.ts
Identity and accounts
- Client authentication
client/features/auth/hooks/useCurrentUser.ts - Authentication
server/src/modules/auth/auth.service.ts - User profiles
server/src/modules/user/user.service.ts - User repository
server/src/modules/user/user.repository.ts
Results and discovery
- Category catalog
server/src/modules/category/category.service.ts - Match history
server/src/modules/history/history.service.ts - Leaderboard
server/src/modules/leaderboard/leaderboard.routes.ts
Platform services
- Admin management
server/src/modules/admin/admin.service.ts - Pro payments
server/src/modules/payment/payment.service.ts - Server configuration
server/src/config/env.ts - Logging
server/src/config/logger.ts - MongoDB
server/src/config/database.ts
Other components
- Player / admin
- Razorpay
- AI provider
Connections 31
- Player / admin → Next.js app: uses
README.md - Next.js app → Category browsing: browses
README.md - Player / admin → Quiz creator: creates quiz
README.md - Category browsing → Room workflows: starts room
- Quiz creator → Quiz generation: requests generation
- Room lobby → Room workflows: configures room
README.md - Room workflows → Socket gateway: gets socket
server/src/modules/room/room.controller.ts - Player / admin → Socket gateway: joins and answers
README.md - Socket gateway → Battle engine: dispatches rounds
- Battle client → Socket gateway: receives updates
README.md - Battle client → Battle engine: forfeits via REST
client/features/battle/hooks/useLiveBattle.ts - Battle engine → Question bank: uses questions
- Battle client → Match results: shows results
README.md - Match results → Match history: reviews match
- Player / admin → Client authentication: authenticates
README.md - Client authentication → API client: requests user
client/features/auth/hooks/useCurrentUser.ts - API client → Authentication: calls REST API
README.md - Authentication → User repository: reads and writes
server/src/modules/auth/auth.service.ts - Player / admin → Profile and rankings: views profile
README.md - Profile and rankings → User profiles: requests profile
- User profiles → User repository: uses repository
- Player / admin → Match history: reviews history
README.md - Player / admin → Admin suite: manages content
README.md - Admin suite → Admin management: calls service
- Player / admin → Leaderboard: views rankings
README.md - Player / admin → Pro payments: buys Pro
- Pro payments → Razorpay: verifies payments
- Quiz generation → AI provider: generates quizzes
- Authentication → Server configuration: reads settings
server/src/modules/auth/auth.service.ts - Authentication → Logging: logs events
server/src/modules/auth/auth.service.ts - Authentication → User repository: persists accounts
server/src/modules/auth/auth.service.ts