How ahamedamansoor/coder-pod works
Purpose and runtime
This is a Next.js/TypeScript learning platform with tutorial topics, roadmaps, cheatsheets, interview preparation, notes, completion tracking, collaborative interviews, and AI-assisted tools. The App Router is the main delivery surface; the root UI begins at src/app/layout.tsx and src/app/page.tsx, with app-wide client providers in src/app/providers.tsx.
Route and UI composition
Route segments organize major product areas: language learning under src/app/languages, dashboard functions in src/app/dashboard/page.tsx, and preparation content in src/app/prepare/page.tsx. Dynamic [topic] routes pair language-specific layouts/contexts with reusable content-display components, for example src/app/languages/javascript/[topic]/page.tsx, src/app/languages/javascript/javascript-context.tsx, and src/components/languages/javascript/javascript-content-display.tsx.
Curriculum content model
Curriculum is predominantly repository-managed static TypeScript/TSX content. Language metadata and navigation structures live in src/data/languages/index.ts and individual language files such as src/data/languages/react.ts; roadmaps are similarly data-driven in src/data/roadmaps/index.ts. Renderable detailed lessons are distributed by subject under src/components/languages/*/topics, e.g. src/components/languages/react/topics/index.ts.
Shared learning experience
Generic UI layers provide topic navigation, learning-path/roadmap presentation, code snippets, playgrounds, modals, and media features. These abstractions separate course shell behavior from subject-specific content: src/components/shared/generic-content-display.tsx, src/components/shared/learning/generic-learning-roadmap.tsx, and src/components/shared/playground/code-editor-sheet.tsx.
User state, authentication, and persistence
Supabase is the evident identity and persistence boundary. Authentication is represented by src/contexts/SupabaseAuthContext.tsx and src/lib/supabase.ts; auth callback handling enters through src/app/auth/callback/route.ts. Completion, notes, and user data use service-layer adapters, including src/services/unified-completion.service.ts, src/services/supabase-notes.service.ts, and src/services/supabase-user.service.ts. SQL migrations define at least notes and interview-session persistence in supabase-migrations/create_notes_table.sql and supabase-migrations/create_interview_sessions.sql.
AI and interactive-service boundary
AI capabilities are isolated in Genkit-oriented flows under src/ai, covering Q&A, learning generation, interview simulation, simplification, text-to-speech, code compilation/transpilation, and API-key validation. Key orchestration points are src/ai/genkit.ts, src/ai/flows/interview-flow.ts, and src/ai/flows/generate-learning-content.ts. HTTP boundaries expose selected actions through App Router handlers such as src/app/api/interview/route.ts and src/app/api/validate-ai-key/route.ts; Gemini-key UI/hooks indicate user-provided AI credentials (src/hooks/use-gemini-key.ts).
Collaboration, offline delivery, and deployment
Collaborative interview sessions have a feature/service boundary in src/components/shared/collaborative-interview.tsx, src/services/collaborative-session.service.ts, and src/app/collaborative-interview/[roomCode]/page.tsx. The browser client includes service-worker assets for offline/PWA behavior in public/register-sw.js and public/sw.js. Hosting automation targets Firebase through .github/workflows/firebase-hosting-merge.yml and .github/workflows/firebase-hosting-pull-request.yml; a separate deploy-vercel.sh indicates an additional deployment path.
Main entry points: layout.tsx App shell · supabase.ts Supabase · languages Product routes · page.tsx Dynamic topic route
Components 21
Next.js application
- App shell · Root layout, landing page, and client providers.
src/app/layout.tsx - Product routes · Languages, dashboard, and preparation surfaces.
src/app/languages - Dynamic topic route · Composes language context with topic content.
src/app/languages/javascript/[topic]/page.tsx - Language context
src/app/languages/javascript/javascript-context.tsx - Language content display
src/components/languages/javascript/javascript-content-display.tsx - Shared learning UI · Generic content, roadmaps, and code playgrounds.
src/components/shared/generic-content-display.tsx - Interview room route
src/app/collaborative-interview/[roomCode]/page.tsx - Offline delivery · PWA registration and caching.
public/register-sw.js
Curriculum content
- Language catalog · Language metadata and navigation.
src/data/languages/index.ts - Subject lessons · Detailed renderable lesson modules.
src/components/languages/react/topics/index.ts - Roadmap catalog
src/data/roadmaps/index.ts
User and AI services
- Supabase auth · Client authentication and session state.
src/contexts/SupabaseAuthContext.tsx - Auth callback
src/app/auth/callback/route.ts - Learning state services · Completion, notes, and user-data persistence.
src/services/unified-completion.service.ts - Supabase · External identity and database boundary.
src/lib/supabase.ts - Database schema · Defines notes and interview-session storage.
supabase-migrations/create_notes_table.sql - AI HTTP API · Exposes interview and AI-key actions.
src/app/api/interview/route.ts - Genkit orchestration · Interview and generated-learning workflows.
src/ai/genkit.ts - Gemini key hook · Supports user-provided AI credentials.
src/hooks/use-gemini-key.ts - Collaborative interviews · Room-based interview sessions.
src/components/shared/collaborative-interview.tsx
Other components
- Deployment automation · Firebase hosting deployment path.
.github/workflows/firebase-hosting-merge.yml
Connections 19
- App shell → Product routes: serves
- Product routes → Dynamic topic route: includes
- Dynamic topic route → Language context: uses
- Dynamic topic route → Language content display: renders
- Language content display → Shared learning UI: builds on
- Language content display → Subject lessons: renders
- Product routes → Language catalog: reads navigation
- Shared learning UI → Roadmap catalog: presents
- App shell → Supabase auth: provides
- Auth callback → Supabase: completes session with
- Supabase auth → Supabase: uses
- Learning state services → Supabase: persists through
- Database schema → Supabase: defines schema for
- AI HTTP API → Genkit orchestration: invokes
- Gemini key hook → AI HTTP API: supplies credentials to
- Interview room route → Collaborative interviews: hosts
- Collaborative interviews → Learning state services: stores session state via
- App shell → Offline delivery: registers
- Deployment automation → App shell: deploys