How chandru0912/tnpsc-quiz works
This is a TNPSC exam-preparation platform: students browse syllabus-linked lessons and study materials, practice questions and tests, review previous papers, and track progress; administrators manage content and operations. The React app routes users into these experiences and communicates through a shared API client with an Express backend and PostgreSQL. The tree and excerpts establish several major capabilities, but many route and service implementations are unsampled, so links between those subsystems are omitted rather than inferred.
Main entry points: server.ts HTTP server · App.tsx Web app routing · api.ts API client · studyMaterialRoutes.ts Materials endpoints
Components 22
Student learning
- Student authentication
src/context/StudentAuthContext.tsx - Syllabus browsing
src/services/dynamicSyllabusService.ts - Question practice
src/pages/MCQPractice.tsx - Study materials
src/pages/StudyMaterials.tsx - Previous papers
src/pages/PreviousPapers.tsx - Progress analytics
src/pages/ProgressTracker.tsx
Administration
- Admin console
src/pages/Admin.tsx - Paper management
src/components/admin/PreviousYearPapersManager.tsx
Backend services
- HTTP server
backend/src/server.ts - Authentication middleware
backend/src/middleware/auth.ts - Question endpoints
backend/src/routes/questions.ts - Student endpoints
backend/src/routes/student.ts - Syllabus endpoints
backend/src/routes/syllabusRoutes.ts - Materials endpoints
backend/src/routes/studyMaterialRoutes.ts - Previous-paper endpoints
backend/src/routes/previousPapersRoutes.ts - AI syllabus import
backend/src/services/aiSyllabusEngineService.ts - Canonical lesson catalog
backend/src/data/canonicalSyllabusLessons.ts
Platform foundation
- Web app routing
src/App.tsx - API client
src/utils/api.ts - PostgreSQL
backend/src/db.ts
Other components
- Student
- Administrator
Connections 20
- Student → Web app routing: uses
src/App.tsx - Administrator → Web app routing: uses
src/App.tsx - Web app routing → Student authentication: provides auth
src/App.tsx - Web app routing → Admin console: routes to
src/App.tsx - Web app routing → API client: uses
src/App.tsx - Student authentication → API client: requests profile
src/context/StudentAuthContext.tsx - Syllabus browsing → API client: fetches syllabus
src/services/dynamicSyllabusService.ts - Paper management → API client: sends requests
src/components/admin/PreviousYearPapersManager.tsx - Paper management → Previous papers: shares paper workflow
- HTTP server → Authentication middleware: imports middleware
backend/src/server.ts - HTTP server → Question endpoints: registers routes
backend/src/server.ts - HTTP server → Student endpoints: registers routes
backend/src/server.ts - HTTP server → Syllabus endpoints: registers routes
backend/src/server.ts - HTTP server → Materials endpoints: registers routes
backend/src/server.ts - HTTP server → Previous-paper endpoints: registers routes
backend/src/server.ts - Syllabus endpoints → PostgreSQL: queries
backend/src/routes/syllabusRoutes.ts - Materials endpoints → PostgreSQL: queries
backend/src/routes/studyMaterialRoutes.ts - Materials endpoints → Canonical lesson catalog: loads fallback
backend/src/routes/studyMaterialRoutes.ts - AI syllabus import → Canonical lesson catalog: uses lesson catalog
backend/src/services/aiSyllabusEngineService.ts - HTTP server → PostgreSQL: initializes schema
backend/src/server.ts