# nihaar75858/tailorhire architecture

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

- Interactive diagram: https://gitdiagram.com/nihaar75858/tailorhire
- Repository: https://github.com/nihaar75858/tailorhire

## Overview

TailorHire is a career-assistance web app whose main user journey runs from account access through job discovery and application tracking, with AI chat and cover-letter generation as parallel capabilities. The React client routes these experiences to a Django REST API; API views use serializers and domain models backed by the configured database. The README documents job recommendations, saved jobs, and AI features, but their implementation details and several backend relationships were not sampled, so those links are shown only where documented or omitted. Optional AI-provider wiring is unverified.

Main entry points: [`client/app/src/App.jsx`](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/App.jsx) (Route shell), [`client/app/src/services/api.js`](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/services/api.js) (API client), [`server/app/api/views.py`](https://github.com/nihaar75858/tailorhire/blob/main/server/app/api/views.py) (API views), [`client/app/src/pages/Jobs/JobsPage.jsx`](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/pages/Jobs/JobsPage.jsx) (Job discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["Route shell<br/>[App.jsx]"]
  node_identity["Account access"]
  node_auth_state["Session context<br/>[useAuth.jsx]"]
  node_token_store["Token storage<br/>[auth.js]"]
  node_nav["Navigation<br/>[Navbar.jsx]"]
  node_profile["Profile management<br/>[ProfilePage.jsx]"]
  node_job_search["Job discovery<br/>[JobsPage.jsx]"]
  node_job_hook["Job data hook<br/>[useJobs.jsx]"]
  node_job_widgets["Search and listings"]
  node_application_modal["Application composer"]
  node_applications["Application tracking"]
  node_cover_letters["Cover letters"]
  node_chat["Career chat<br/>[ChatPage.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["REST API"]
  node_django_views["API views<br/>[views.py]"]
  node_serializers["Request serialization<br/>[serializer.py]"]
  node_validation["Input validation<br/>[validators.py]"]
  node_ai_limits["AI usage limits<br/>[throttling.py]"]
end

subgraph group_domain["Career domain"]
  node_domain_models["Career records<br/>[models.py]"]
  node_database[("Relational database")]
end

subgraph group_ai["AI assistance"]
  node_recommendations["Job recommendations"]
  node_ai_generation["AI generation"]
end

node_visitor(("Job seeker"))
node_hf_service["Hugging Face"]

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_identity
node_app -->|"routes to"| node_job_search
node_app -->|"routes to"| node_applications
node_app -->|"routes to"| node_cover_letters
node_app -->|"routes to"| node_chat
node_app -->|"renders"| node_nav
node_app -->|"provides context"| node_auth_state
node_nav -->|"reads session"| node_auth_state
node_auth_state -->|"reads tokens"| node_token_store
node_identity -->|"uses tokens"| node_token_store
node_profile -->|"requests profile"| node_api_client
node_job_search -->|"renders"| node_job_widgets
node_job_search -->|"opens"| node_application_modal
node_job_search -->|"uses jobs"| node_job_hook
node_job_hook -->|"fetches jobs"| node_api_client
node_application_modal -->|"loads letters"| node_api_client
node_applications -->|"requests applications"| node_api_client
node_cover_letters -->|"requests letters"| node_api_client
node_chat -->|"sends messages"| node_api_client
node_api_client -->|"HTTP API calls"| node_django_views
node_django_views -->|"reads and writes"| node_domain_models
node_django_views -->|"uses serializers"| node_serializers
node_django_views -->|"validates input"| node_validation
node_django_views -->|"applies throttles"| node_ai_limits
node_domain_models -.->|"persists records"| node_database
node_api_client -.->|"requests matching"| node_recommendations
node_django_views -.->|"generates content"| node_ai_generation
node_ai_generation -.->|"optional provider"| node_hf_service
node_visitor -->|"uses matching"| node_recommendations

click node_app "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/App.jsx"
click node_identity "https://github.com/nihaar75858/tailorhire/tree/main/client/app/src/pages/Auth"
click node_auth_state "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/components/hooks/useAuth.jsx"
click node_token_store "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/utils/auth.js"
click node_nav "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/components/navbar/Navbar.jsx"
click node_profile "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/pages/Profile/ProfilePage.jsx"
click node_job_search "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/pages/Jobs/JobsPage.jsx"
click node_job_hook "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/components/hooks/useJobs.jsx"
click node_job_widgets "https://github.com/nihaar75858/tailorhire/tree/main/client/app/src/components/jobs"
click node_application_modal "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/components/applications/ApplicationModal.jsx"
click node_applications "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/pages/Application/ApplicationsPage.jsx"
click node_cover_letters "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/pages/CoverLetter/CoverLetterPage.jsx"
click node_chat "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/pages/Chat/ChatPage.jsx"
click node_api_client "https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/services/api.js"
click node_django_views "https://github.com/nihaar75858/tailorhire/blob/main/server/app/api/views.py"
click node_serializers "https://github.com/nihaar75858/tailorhire/blob/main/server/app/api/serializer.py"
click node_validation "https://github.com/nihaar75858/tailorhire/blob/main/server/app/api/validators.py"
click node_ai_limits "https://github.com/nihaar75858/tailorhire/blob/main/server/app/api/throttling.py"
click node_domain_models "https://github.com/nihaar75858/tailorhire/blob/main/server/app/api/models.py"
click node_recommendations "https://github.com/nihaar75858/tailorhire/tree/main/server/app/api"
click node_ai_generation "https://github.com/nihaar75858/tailorhire/tree/main/server/app/api"

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,node_identity,node_auth_state,node_token_store,node_nav,node_profile,node_job_search,node_job_hook,node_job_widgets,node_application_modal,node_applications,node_cover_letters,node_chat,node_api_client toneBlue
class node_django_views,node_serializers,node_validation,node_ai_limits toneAmber
class node_domain_models,node_database toneMint
class node_recommendations,node_ai_generation toneRose
class node_visitor,node_hf_service toneIndigo
```

## Components

### React client

- [Route shell](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/App.jsx): `client/app/src/App.jsx`
- [Account access](https://github.com/nihaar75858/tailorhire/tree/main/client/app/src/pages/Auth): `client/app/src/pages/Auth`
- [Session context](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/components/hooks/useAuth.jsx): `client/app/src/components/hooks/useAuth.jsx`
- [Token storage](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/utils/auth.js): `client/app/src/utils/auth.js`
- [Navigation](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/components/navbar/Navbar.jsx): `client/app/src/components/navbar/Navbar.jsx`
- [Profile management](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/pages/Profile/ProfilePage.jsx): `client/app/src/pages/Profile/ProfilePage.jsx`
- [Job discovery](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/pages/Jobs/JobsPage.jsx): `client/app/src/pages/Jobs/JobsPage.jsx`
- [Job data hook](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/components/hooks/useJobs.jsx): `client/app/src/components/hooks/useJobs.jsx`
- [Search and listings](https://github.com/nihaar75858/tailorhire/tree/main/client/app/src/components/jobs): `client/app/src/components/jobs`
- [Application composer](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/components/applications/ApplicationModal.jsx): `client/app/src/components/applications/ApplicationModal.jsx`
- [Application tracking](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/pages/Application/ApplicationsPage.jsx): `client/app/src/pages/Application/ApplicationsPage.jsx`
- [Cover letters](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/pages/CoverLetter/CoverLetterPage.jsx): `client/app/src/pages/CoverLetter/CoverLetterPage.jsx`
- [Career chat](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/pages/Chat/ChatPage.jsx): `client/app/src/pages/Chat/ChatPage.jsx`
- [API client](https://github.com/nihaar75858/tailorhire/blob/main/client/app/src/services/api.js): `client/app/src/services/api.js`

### REST API

- [API views](https://github.com/nihaar75858/tailorhire/blob/main/server/app/api/views.py): `server/app/api/views.py`
- [Request serialization](https://github.com/nihaar75858/tailorhire/blob/main/server/app/api/serializer.py): `server/app/api/serializer.py`
- [Input validation](https://github.com/nihaar75858/tailorhire/blob/main/server/app/api/validators.py): `server/app/api/validators.py`
- [AI usage limits](https://github.com/nihaar75858/tailorhire/blob/main/server/app/api/throttling.py): `server/app/api/throttling.py`

### Career domain

- [Career records](https://github.com/nihaar75858/tailorhire/blob/main/server/app/api/models.py): `server/app/api/models.py`
- **Relational database**

### AI assistance

- [Job recommendations](https://github.com/nihaar75858/tailorhire/tree/main/server/app/api): `server/app/api`
- [AI generation](https://github.com/nihaar75858/tailorhire/tree/main/server/app/api): `server/app/api`

### Other components

- **Job seeker**
- **Hugging Face**

## Connections

- Job seeker → Route shell: opens
- Route shell → Account access: routes to (evidence: `client/app/src/App.jsx`)
- Route shell → Job discovery: routes to (evidence: `client/app/src/App.jsx`)
- Route shell → Application tracking: routes to (evidence: `client/app/src/App.jsx`)
- Route shell → Cover letters: routes to (evidence: `client/app/src/App.jsx`)
- Route shell → Career chat: routes to (evidence: `client/app/src/App.jsx`)
- Route shell → Navigation: renders (evidence: `client/app/src/App.jsx`)
- Route shell → Session context: provides context (evidence: `client/app/src/main.jsx`)
- Navigation → Session context: reads session (evidence: `client/app/src/components/navbar/Navbar.jsx`)
- Session context → Token storage: reads tokens (evidence: `client/app/src/components/hooks/useAuth.jsx`)
- Account access → Token storage: uses tokens (evidence: `client/app/src/pages/Auth/Login.jsx`)
- Profile management → API client: requests profile (evidence: `client/app/src/pages/Profile/ProfilePage.jsx`)
- Job discovery → Search and listings: renders (evidence: `client/app/src/pages/Jobs/JobsPage.jsx`)
- Job discovery → Application composer: opens (evidence: `client/app/src/pages/Jobs/JobsPage.jsx`)
- Job discovery → Job data hook: uses jobs (evidence: `client/app/src/pages/Jobs/JobsPage.jsx`)
- Job data hook → API client: fetches jobs (evidence: `client/app/src/components/hooks/useJobs.jsx`)
- Application composer → API client: loads letters (evidence: `client/app/src/components/applications/ApplicationModal.jsx`)
- Application tracking → API client: requests applications (evidence: `client/app/src/pages/Application/ApplicationsPage.jsx`)
- Cover letters → API client: requests letters (evidence: `client/app/src/pages/CoverLetter/CoverLetterPage.jsx`)
- Career chat → API client: sends messages (evidence: `client/app/src/pages/Chat/ChatPage.jsx`)
- API client → API views: HTTP API calls (evidence: `README.md`)
- API views → Career records: reads and writes (evidence: `server/app/api/views.py`)
- API views → Request serialization: uses serializers (evidence: `server/app/api/views.py`)
- API views → Input validation: validates input (evidence: `server/app/api/views.py`)
- API views → AI usage limits: applies throttles (evidence: `server/app/api/views.py`)
- Career records → Relational database: persists records
- API client → Job recommendations: requests matching
- API views → AI generation: generates content (evidence: `server/app/api/views.py`)
- AI generation → Hugging Face: optional provider (evidence: `README.md`)
- Job seeker → Job recommendations: uses matching (evidence: `README.md`)
