# p-prakash-01/prephub architecture

> Architecture diagram of the GitHub repository p-prakash-01/prephub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/p-prakash-01/prephub
- Repository: https://github.com/p-prakash-01/prephub

## Overview

PrepHub is a candidate job-search and preparation app. The documented journey starts at login, enters the protected dashboard, then branches into job discovery, company tracking, job-description analysis, skill development, learning resources, and profile management. Feature pages keep some state in browser local storage; authentication uses Firebase, while job search and skill extraction are delegated to utility integrations. Several feature implementations were only sampled partially, so unsampled relationships are included only where the README or source index supports them.

Main entry points: [`src/pages/Dashboard.jsx`](https://github.com/p-prakash-01/prephub/blob/main/src/pages/Dashboard.jsx) (Dashboard), [`src/utils/storage.js`](https://github.com/p-prakash-01/prephub/blob/main/src/utils/storage.js) (Browser Storage), [`src/context/AuthContext.jsx`](https://github.com/p-prakash-01/prephub/blob/main/src/context/AuthContext.jsx) (Auth State), [`src/App.jsx`](https://github.com/p-prakash-01/prephub/blob/main/src/App.jsx) (Routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell &amp; Access"]
  node_router["Routes<br/>[App.jsx]"]
  node_guard["Protected Route<br/>[ProtectedRoute.jsx]"]
  node_layout["App Layout<br/>[Layout.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_login["Login<br/>[LoginPage.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_profile["Profile<br/>[Profile.jsx]"]
end

subgraph group_jobsearch["Job Search"]
  node_jobboard["Job Board<br/>[JobBoard.jsx]"]
  node_company["Company Tracker<br/>[CompanyTracker.jsx]"]
end

subgraph group_preparation["Preparation Tools"]
  node_analyzer["JD Analyzer<br/>[JDAnalyzer.jsx]"]
  node_skills["Skill Tracker<br/>[SkillTracker.jsx]"]
  node_resources["Learning Resources<br/>[Resources.jsx]"]
end

subgraph group_services["Auth &amp; Data"]
  node_auth["Auth State<br/>[AuthContext.jsx]"]
  node_firebase["Firebase Auth<br/>[firebase.js]"]
  node_storage[("Browser Storage<br/>[storage.js]")]
  node_jobapi["Job Search API<br/>[jobApi.js]"]
  node_aiapi["Skill Extraction<br/>[aiApi.js]"]
  node_resourcecatalog["Resource Catalog<br/>[resources.js]"]
end

node_candidate(("Candidate"))

node_candidate -->|"signs in"| node_login
node_candidate -->|"uses app"| node_router
node_router -->|"routes to"| node_login
node_router -->|"protects pages"| node_guard
node_guard -->|"wraps access"| node_layout
node_layout -->|"renders"| node_navbar
node_navbar -->|"reads user"| node_auth
node_login -->|"uses authentication"| node_auth
node_auth -->|"calls auth"| node_firebase
node_auth -->|"continues after login"| node_dashboard
node_dashboard -->|"offers navigation"| node_jobboard
node_dashboard -->|"offers navigation"| node_company
node_dashboard -->|"offers navigation"| node_analyzer
node_dashboard -->|"offers navigation"| node_skills
node_dashboard -->|"offers navigation"| node_resources
node_dashboard -->|"offers navigation"| node_profile
node_jobboard -->|"searches jobs"| node_jobapi
node_jobboard -->|"saves jobs"| node_storage
node_company -->|"reads and writes"| node_storage
node_analyzer -->|"extracts skills"| node_aiapi
node_analyzer -->|"saves analysis"| node_storage
node_skills -->|"reads and writes"| node_storage
node_resources -->|"reads saved data"| node_storage
node_resources -->|"uses catalog"| node_resourcecatalog

click node_router "https://github.com/p-prakash-01/prephub/blob/main/src/App.jsx"
click node_guard "https://github.com/p-prakash-01/prephub/blob/main/src/components/ProtectedRoute.jsx"
click node_layout "https://github.com/p-prakash-01/prephub/blob/main/src/components/Layout.jsx"
click node_navbar "https://github.com/p-prakash-01/prephub/blob/main/src/components/Navbar.jsx"
click node_login "https://github.com/p-prakash-01/prephub/blob/main/src/pages/LoginPage.jsx"
click node_dashboard "https://github.com/p-prakash-01/prephub/blob/main/src/pages/Dashboard.jsx"
click node_jobboard "https://github.com/p-prakash-01/prephub/blob/main/src/pages/JobBoard.jsx"
click node_company "https://github.com/p-prakash-01/prephub/blob/main/src/pages/CompanyTracker.jsx"
click node_analyzer "https://github.com/p-prakash-01/prephub/blob/main/src/pages/JDAnalyzer.jsx"
click node_skills "https://github.com/p-prakash-01/prephub/blob/main/src/pages/SkillTracker.jsx"
click node_resources "https://github.com/p-prakash-01/prephub/blob/main/src/pages/Resources.jsx"
click node_profile "https://github.com/p-prakash-01/prephub/blob/main/src/pages/Profile.jsx"
click node_auth "https://github.com/p-prakash-01/prephub/blob/main/src/context/AuthContext.jsx"
click node_firebase "https://github.com/p-prakash-01/prephub/blob/main/src/firebase.js"
click node_storage "https://github.com/p-prakash-01/prephub/blob/main/src/utils/storage.js"
click node_jobapi "https://github.com/p-prakash-01/prephub/blob/main/src/utils/jobApi.js"
click node_aiapi "https://github.com/p-prakash-01/prephub/blob/main/src/utils/aiApi.js"
click node_resourcecatalog "https://github.com/p-prakash-01/prephub/blob/main/src/utils/resources.js"

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_router,node_guard,node_layout,node_navbar,node_login,node_dashboard,node_profile toneBlue
class node_jobboard,node_company toneAmber
class node_analyzer,node_skills,node_resources toneMint
class node_auth,node_firebase,node_storage,node_jobapi,node_aiapi,node_resourcecatalog toneRose
class node_candidate toneIndigo
```

## Components

### App Shell & Access

- [Routes](https://github.com/p-prakash-01/prephub/blob/main/src/App.jsx): `src/App.jsx`
- [Protected Route](https://github.com/p-prakash-01/prephub/blob/main/src/components/ProtectedRoute.jsx): `src/components/ProtectedRoute.jsx`
- [App Layout](https://github.com/p-prakash-01/prephub/blob/main/src/components/Layout.jsx): `src/components/Layout.jsx`
- [Navigation](https://github.com/p-prakash-01/prephub/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Login](https://github.com/p-prakash-01/prephub/blob/main/src/pages/LoginPage.jsx): `src/pages/LoginPage.jsx`
- [Dashboard](https://github.com/p-prakash-01/prephub/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`
- [Profile](https://github.com/p-prakash-01/prephub/blob/main/src/pages/Profile.jsx): `src/pages/Profile.jsx`

### Job Search

- [Job Board](https://github.com/p-prakash-01/prephub/blob/main/src/pages/JobBoard.jsx): `src/pages/JobBoard.jsx`
- [Company Tracker](https://github.com/p-prakash-01/prephub/blob/main/src/pages/CompanyTracker.jsx): `src/pages/CompanyTracker.jsx`

### Preparation Tools

- [JD Analyzer](https://github.com/p-prakash-01/prephub/blob/main/src/pages/JDAnalyzer.jsx): `src/pages/JDAnalyzer.jsx`
- [Skill Tracker](https://github.com/p-prakash-01/prephub/blob/main/src/pages/SkillTracker.jsx): `src/pages/SkillTracker.jsx`
- [Learning Resources](https://github.com/p-prakash-01/prephub/blob/main/src/pages/Resources.jsx): `src/pages/Resources.jsx`

### Auth & Data

- [Auth State](https://github.com/p-prakash-01/prephub/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Firebase Auth](https://github.com/p-prakash-01/prephub/blob/main/src/firebase.js): `src/firebase.js`
- [Browser Storage](https://github.com/p-prakash-01/prephub/blob/main/src/utils/storage.js): `src/utils/storage.js`
- [Job Search API](https://github.com/p-prakash-01/prephub/blob/main/src/utils/jobApi.js): `src/utils/jobApi.js`
- [Skill Extraction](https://github.com/p-prakash-01/prephub/blob/main/src/utils/aiApi.js): `src/utils/aiApi.js`
- [Resource Catalog](https://github.com/p-prakash-01/prephub/blob/main/src/utils/resources.js): `src/utils/resources.js`

### Other components

- **Candidate**

## Connections

- Candidate → Login: signs in (evidence: `README.md`)
- Candidate → Routes: uses app (evidence: `README.md`)
- Routes → Login: routes to (evidence: `src/App.jsx`)
- Routes → Protected Route: protects pages (evidence: `src/App.jsx`)
- Protected Route → App Layout: wraps access (evidence: `src/App.jsx`)
- App Layout → Navigation: renders (evidence: `src/components/Layout.jsx`)
- Navigation → Auth State: reads user (evidence: `src/components/Navbar.jsx`)
- Login → Auth State: uses authentication (evidence: `README.md`)
- Auth State → Firebase Auth: calls auth (evidence: `src/context/AuthContext.jsx`)
- Auth State → Dashboard: continues after login (evidence: `README.md`)
- Dashboard → Job Board: offers navigation (evidence: `README.md`)
- Dashboard → Company Tracker: offers navigation (evidence: `README.md`)
- Dashboard → JD Analyzer: offers navigation (evidence: `README.md`)
- Dashboard → Skill Tracker: offers navigation (evidence: `README.md`)
- Dashboard → Learning Resources: offers navigation (evidence: `README.md`)
- Dashboard → Profile: offers navigation (evidence: `README.md`)
- Job Board → Job Search API: searches jobs (evidence: `src/pages/JobBoard.jsx`)
- Job Board → Browser Storage: saves jobs (evidence: `src/pages/JobBoard.jsx`)
- Company Tracker → Browser Storage: reads and writes (evidence: `src/pages/CompanyTracker.jsx`)
- JD Analyzer → Skill Extraction: extracts skills (evidence: `src/pages/JDAnalyzer.jsx`)
- JD Analyzer → Browser Storage: saves analysis (evidence: `src/pages/JDAnalyzer.jsx`)
- Skill Tracker → Browser Storage: reads and writes (evidence: `src/pages/SkillTracker.jsx`)
- Learning Resources → Browser Storage: reads saved data (evidence: `src/pages/Resources.jsx`)
- Learning Resources → Resource Catalog: uses catalog (evidence: `src/pages/Resources.jsx`)
