How quitlightfe/code-school works
This is a localized Next.js learning frontend for authentication, course browsing, task work, and submission review. The main learner flow is login/register, browse courses, open course tasks, edit and save or submit code, then view submission status; task and course pages call dedicated API services. Separate UI covers dashboard, profile, and settings, while shared auth/token and API layers support requests. The README only describes the default Next.js setup; several page implementations were not sampled, so their internal links are omitted unless the source index documents them.
Main entry points: api.ts HTTP API client · AuthProvider.tsx Auth provider · [courseId]/page.tsx Course detail · tasks/page.tsx Task list
Components 21
Learner experience
- Landing experience
src/app/[locale]/page.tsx - Course catalog
src/app/[locale]/courses/page.tsx - Course detail
src/app/[locale]/courses/[courseId]/page.tsx - Task list
src/app/[locale]/tasks/page.tsx - Task workspace
src/app/[locale]/tasks/[taskId]/page.tsx - Dashboard
src/app/[locale]/dashboard/page.tsx - Profile
src/app/[locale]/profile/page.tsx - Settings
src/app/[locale]/settings/page.tsx
Identity and navigation
- Login and registration
src/app/[locale]/(auth)/login/page.tsx - Auth provider
src/providers/AuthProvider.tsx - Authentication service
src/services/auth.service.ts - Token storage
src/lib/tokens.ts - Localized routing
src/i18n/routing.ts
Learning domain
- Course service
src/services/courses.service.ts - Task service
src/services/tasks.service.ts - Submission service
src/services/submissions.service.ts
Client platform
- API query hook
src/hooks/useApiQuery.ts - HTTP API client
src/lib/api.ts - Request interceptors
src/lib/interceptors.ts
Other components
- Visitor / learner
- Learning API backend
Connections 32
- Visitor / learner → Landing experience: opens
src/app/[locale]/page.tsx - Visitor / learner → Login and registration: authenticates
src/app/[locale]/(auth)/login/page.tsx - Login and registration → Auth provider: uses auth
src/app/[locale]/(auth)/login/page.tsx - Auth provider → Authentication service: calls
src/providers/AuthProvider.tsx - Auth provider → Token storage: stores tokens
src/providers/AuthProvider.tsx - Authentication service → HTTP API client: sends requests
src/services/auth.service.ts - HTTP API client → Learning API backend: calls API
- Visitor / learner → Course catalog: browses
src/app/[locale]/courses/page.tsx - Course catalog → Course service: loads courses
src/app/[locale]/courses/page.tsx - Course detail → Course service: loads course
src/app/[locale]/courses/[courseId]/page.tsx - Course detail → Task service: loads tasks
src/app/[locale]/courses/[courseId]/page.tsx - Course detail → Submission service: loads submissions
src/app/[locale]/courses/[courseId]/page.tsx - Visitor / learner → Task list: opens tasks
src/app/[locale]/tasks/page.tsx - Task list → Task service: loads tasks
src/app/[locale]/tasks/page.tsx - Task list → Submission service: loads submissions
src/app/[locale]/tasks/page.tsx - Task list → Authentication service: loads user
src/app/[locale]/tasks/page.tsx - Visitor / learner → Task workspace: opens workspace
src/app/[locale]/tasks/[taskId]/page.tsx - Task workspace → Task service: loads task
src/app/[locale]/tasks/[taskId]/page.tsx - Task workspace → Submission service: saves or submits
src/app/[locale]/tasks/[taskId]/page.tsx - Course service → HTTP API client: sends requests
src/services/courses.service.ts - Task service → HTTP API client: sends requests
src/services/tasks.service.ts - Submission service → HTTP API client: sends requests
src/services/submissions.service.ts - Request interceptors → HTTP API client: configures
src/lib/interceptors.ts - Request interceptors → Token storage: reads tokens
src/lib/interceptors.ts - Course catalog → API query hook: queries with
src/app/[locale]/courses/page.tsx - Course detail → API query hook: queries with
src/app/[locale]/courses/[courseId]/page.tsx - Visitor / learner → Dashboard: opens
src/app/[locale]/dashboard/page.tsx - Visitor / learner → Profile: opens
src/app/[locale]/profile/page.tsx - Profile → Auth provider: reads account
src/app/[locale]/profile/page.tsx - Visitor / learner → Settings: opens
src/app/[locale]/settings/page.tsx - Settings → Auth provider: reads account
src/app/[locale]/settings/page.tsx - Localized routing → Landing experience: localizes pages