# adityasinghtech/career-guider architecture

> Architecture diagram of the GitHub repository adityasinghtech/career-guider, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adityasinghtech/career-guider
- Repository: https://github.com/adityasinghtech/career-guider

## Overview

PathFinder is a student career-guidance application. Students take an interest-and-strengths quiz, receive stream and career guidance, then explore related education and career resources; signed-in students can track progress, while admins have a separate dashboard. The graph also includes documented chatbot and AI-analysis capabilities. Several pages and integrations are represented by their exact tree paths, but their internal wiring is not inferred where source excerpts were unavailable.

Main entry points: [`src/App.tsx`](https://github.com/adityasinghtech/career-guider/blob/main/src/App.tsx) (Routes and providers), [`src/pages/Results.tsx`](https://github.com/adityasinghtech/career-guider/blob/main/src/pages/Results.tsx) (Results page), [`src/integrations/supabase/client.ts`](https://github.com/adityasinghtech/career-guider/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/pages/Quiz.tsx`](https://github.com/adityasinghtech/career-guider/blob/main/src/pages/Quiz.tsx) (Guidance quiz)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["Routes and providers<br/>[App.tsx]"]
end

subgraph group_guidance["Career guidance"]
  node_quiz["Guidance quiz<br/>[Quiz.tsx]"]
  node_quizdata["Quiz and career data<br/>[quizData.ts]"]
  node_engine["Guidance engine<br/>[guidanceEngine.ts]"]
  node_results["Results page<br/>[Results.tsx]"]
  node_resultviews["Result details"]
  node_pdf["PDF report"]
end

subgraph group_resources["Exploration resources"]
  node_stream["Stream recommender"]
  node_comparison["Career comparison"]
  node_comparisondata["Comparison data"]
  node_learning["Learning resources"]
  node_after12["After-12th guidance<br/>[AfterTwelfth.tsx]"]
  node_practice["Practice quiz<br/>[PracticeQuiz.tsx]"]
  node_deep["Deep analysis<br/>[DeepAnalysis.tsx]"]
end

subgraph group_accounts["Accounts and progress"]
  node_authpage["Authentication page<br/>[Auth.tsx]"]
  node_auth["Auth and roles<br/>[useAuth.tsx]"]
  node_dashboard["Student dashboard"]
  node_admin["Admin dashboard<br/>[AdminDashboard.tsx]"]
  node_supabaseclient["Supabase client<br/>[client.ts]"]
end

subgraph group_ai["AI services"]
  node_chatui["Career chatbot UI<br/>[ChatBot.tsx]"]
  node_chatfn["Career chat function<br/>[index.ts]"]
  node_insightfn["Student insight function<br/>[index.ts]"]
  node_analysisfn["Deep analysis functions"]
  node_practicefn["Practice quiz function<br/>[index.ts]"]
end

node_student(("Student"))
node_supabase[("Supabase")]
node_openrouter["OpenRouter API"]

node_student -->|"opens"| node_app
node_app -->|"routes"| node_quiz
node_app -->|"routes"| node_results
node_app -->|"routes"| node_authpage
node_app -->|"routes"| node_dashboard
node_app -->|"routes"| node_admin
node_app -->|"routes"| node_stream
node_app -->|"routes"| node_comparison
node_app -->|"routes"| node_learning
node_app -->|"routes"| node_after12
node_app -->|"routes"| node_practice
node_app -->|"routes"| node_deep
node_app -->|"renders"| node_chatui
node_quiz -->|"uses questions"| node_quizdata
node_quiz -->|"gets guidance"| node_engine
node_engine -->|"selects result route"| node_results
node_results -->|"renders details"| node_resultviews
node_results -->|"offers report"| node_pdf
node_comparison -->|"reads data"| node_comparisondata
node_authpage -->|"signs in or up"| node_auth
node_auth -->|"queries auth and roles"| node_supabaseclient
node_supabaseclient -->|"connects"| node_supabase
node_dashboard -->|"reads and updates"| node_supabaseclient
node_admin -->|"admin data access"| node_supabaseclient
node_chatfn -->|"requests completions"| node_openrouter

click node_app "https://github.com/adityasinghtech/career-guider/blob/main/src/App.tsx"
click node_quiz "https://github.com/adityasinghtech/career-guider/blob/main/src/pages/Quiz.tsx"
click node_quizdata "https://github.com/adityasinghtech/career-guider/blob/main/src/data/quizData.ts"
click node_engine "https://github.com/adityasinghtech/career-guider/blob/main/src/utils/guidanceEngine.ts"
click node_results "https://github.com/adityasinghtech/career-guider/blob/main/src/pages/Results.tsx"
click node_resultviews "https://github.com/adityasinghtech/career-guider/tree/main/src/components/results"
click node_pdf "https://github.com/adityasinghtech/career-guider/blob/main/src/components/analysis/CareerReportPDF.tsx"
click node_stream "https://github.com/adityasinghtech/career-guider/blob/main/src/pages/StreamRecommender.tsx"
click node_comparison "https://github.com/adityasinghtech/career-guider/blob/main/src/pages/CareerComparison.tsx"
click node_comparisondata "https://github.com/adityasinghtech/career-guider/blob/main/src/data/careerComparison.ts"
click node_learning "https://github.com/adityasinghtech/career-guider/blob/main/src/pages/LearningResources.tsx"
click node_after12 "https://github.com/adityasinghtech/career-guider/blob/main/src/pages/AfterTwelfth.tsx"
click node_practice "https://github.com/adityasinghtech/career-guider/blob/main/src/pages/PracticeQuiz.tsx"
click node_deep "https://github.com/adityasinghtech/career-guider/blob/main/src/pages/DeepAnalysis.tsx"
click node_authpage "https://github.com/adityasinghtech/career-guider/blob/main/src/pages/Auth.tsx"
click node_auth "https://github.com/adityasinghtech/career-guider/blob/main/src/hooks/useAuth.tsx"
click node_dashboard "https://github.com/adityasinghtech/career-guider/blob/main/src/components/dashboard/StudentDashboard.tsx"
click node_admin "https://github.com/adityasinghtech/career-guider/blob/main/src/components/dashboard/AdminDashboard.tsx"
click node_supabaseclient "https://github.com/adityasinghtech/career-guider/blob/main/src/integrations/supabase/client.ts"
click node_chatui "https://github.com/adityasinghtech/career-guider/blob/main/src/components/ChatBot.tsx"
click node_chatfn "https://github.com/adityasinghtech/career-guider/blob/main/supabase/functions/career-chat/index.ts"
click node_insightfn "https://github.com/adityasinghtech/career-guider/blob/main/supabase/functions/generate-student-insight/index.ts"
click node_analysisfn "https://github.com/adityasinghtech/career-guider/tree/main/supabase/functions/deep-analysis"
click node_practicefn "https://github.com/adityasinghtech/career-guider/blob/main/supabase/functions/practice-quiz-generate/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app toneBlue
class node_quiz,node_quizdata,node_engine,node_results,node_resultviews,node_pdf,node_supabase toneAmber
class node_stream,node_comparison,node_comparisondata,node_learning,node_after12,node_practice,node_deep,node_openrouter toneMint
class node_authpage,node_auth,node_dashboard,node_admin,node_supabaseclient toneRose
class node_chatui,node_chatfn,node_insightfn,node_analysisfn,node_practicefn,node_student toneIndigo
```

## Components

### Application shell

- [Routes and providers](https://github.com/adityasinghtech/career-guider/blob/main/src/App.tsx): `src/App.tsx`

### Career guidance

- [Guidance quiz](https://github.com/adityasinghtech/career-guider/blob/main/src/pages/Quiz.tsx): `src/pages/Quiz.tsx`
- [Quiz and career data](https://github.com/adityasinghtech/career-guider/blob/main/src/data/quizData.ts): `src/data/quizData.ts`
- [Guidance engine](https://github.com/adityasinghtech/career-guider/blob/main/src/utils/guidanceEngine.ts): `src/utils/guidanceEngine.ts`
- [Results page](https://github.com/adityasinghtech/career-guider/blob/main/src/pages/Results.tsx): `src/pages/Results.tsx`
- [Result details](https://github.com/adityasinghtech/career-guider/tree/main/src/components/results): `src/components/results`
- [PDF report](https://github.com/adityasinghtech/career-guider/blob/main/src/components/analysis/CareerReportPDF.tsx): `src/components/analysis/CareerReportPDF.tsx`

### Exploration resources

- [Stream recommender](https://github.com/adityasinghtech/career-guider/blob/main/src/pages/StreamRecommender.tsx): `src/pages/StreamRecommender.tsx`
- [Career comparison](https://github.com/adityasinghtech/career-guider/blob/main/src/pages/CareerComparison.tsx): `src/pages/CareerComparison.tsx`
- [Comparison data](https://github.com/adityasinghtech/career-guider/blob/main/src/data/careerComparison.ts): `src/data/careerComparison.ts`
- [Learning resources](https://github.com/adityasinghtech/career-guider/blob/main/src/pages/LearningResources.tsx): `src/pages/LearningResources.tsx`
- [After-12th guidance](https://github.com/adityasinghtech/career-guider/blob/main/src/pages/AfterTwelfth.tsx): `src/pages/AfterTwelfth.tsx`
- [Practice quiz](https://github.com/adityasinghtech/career-guider/blob/main/src/pages/PracticeQuiz.tsx): `src/pages/PracticeQuiz.tsx`
- [Deep analysis](https://github.com/adityasinghtech/career-guider/blob/main/src/pages/DeepAnalysis.tsx): `src/pages/DeepAnalysis.tsx`

### Accounts and progress

- [Authentication page](https://github.com/adityasinghtech/career-guider/blob/main/src/pages/Auth.tsx): `src/pages/Auth.tsx`
- [Auth and roles](https://github.com/adityasinghtech/career-guider/blob/main/src/hooks/useAuth.tsx): `src/hooks/useAuth.tsx`
- [Student dashboard](https://github.com/adityasinghtech/career-guider/blob/main/src/components/dashboard/StudentDashboard.tsx): `src/components/dashboard/StudentDashboard.tsx`
- [Admin dashboard](https://github.com/adityasinghtech/career-guider/blob/main/src/components/dashboard/AdminDashboard.tsx): `src/components/dashboard/AdminDashboard.tsx`
- [Supabase client](https://github.com/adityasinghtech/career-guider/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`

### AI services

- [Career chatbot UI](https://github.com/adityasinghtech/career-guider/blob/main/src/components/ChatBot.tsx): `src/components/ChatBot.tsx`
- [Career chat function](https://github.com/adityasinghtech/career-guider/blob/main/supabase/functions/career-chat/index.ts): `supabase/functions/career-chat/index.ts`
- [Student insight function](https://github.com/adityasinghtech/career-guider/blob/main/supabase/functions/generate-student-insight/index.ts): `supabase/functions/generate-student-insight/index.ts`
- [Deep analysis functions](https://github.com/adityasinghtech/career-guider/tree/main/supabase/functions/deep-analysis): `supabase/functions/deep-analysis`
- [Practice quiz function](https://github.com/adityasinghtech/career-guider/blob/main/supabase/functions/practice-quiz-generate/index.ts): `supabase/functions/practice-quiz-generate/index.ts`

### Other components

- **Student**
- **Supabase**
- **OpenRouter API**

## Connections

- Student → Routes and providers: opens
- Routes and providers → Guidance quiz: routes
- Routes and providers → Results page: routes
- Routes and providers → Authentication page: routes
- Routes and providers → Student dashboard: routes
- Routes and providers → Admin dashboard: routes
- Routes and providers → Stream recommender: routes
- Routes and providers → Career comparison: routes
- Routes and providers → Learning resources: routes
- Routes and providers → After-12th guidance: routes
- Routes and providers → Practice quiz: routes
- Routes and providers → Deep analysis: routes
- Routes and providers → Career chatbot UI: renders
- Guidance quiz → Quiz and career data: uses questions
- Guidance quiz → Guidance engine: gets guidance
- Guidance engine → Results page: selects result route
- Results page → Result details: renders details
- Results page → PDF report: offers report
- Career comparison → Comparison data: reads data
- Authentication page → Auth and roles: signs in or up
- Auth and roles → Supabase client: queries auth and roles
- Supabase client → Supabase: connects
- Student dashboard → Supabase client: reads and updates
- Admin dashboard → Supabase client: admin data access
- Career chat function → OpenRouter API: requests completions
