# dheerajrai-dev/nextrole architecture

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

- Interactive diagram: https://gitdiagram.com/dheerajrai-dev/nextrole
- Repository: https://github.com/dheerajrai-dev/nextrole

## Overview

NextRole is a job and internship discovery app: users enter keywords and filters, the backend queries TinyFish, normalizes and deduplicates live listings, and the UI presents results with original application links and verification status. The graph follows this workflow and includes health/status handling and the shared data contract. Source excerpts show the backend orchestration and UI calls; unsampled component internals and the exact browser-to-server deployment wiring are not inferred.

Main entry points: [`frontend/src/App.tsx`](https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/App.tsx) (App coordinator), [`backend/app/routes/search.py`](https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/routes/search.py) (Search API), [`frontend/src/services/api.ts`](https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/services/api.ts) (HTTP client), [`frontend/src/components/SearchBar.tsx`](https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/components/SearchBar.tsx) (Search filters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Search interface"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_searchbar["Search filters<br/>[SearchBar.tsx]"]
  node_api_client["HTTP client<br/>[api.ts]"]
  node_status_views["Search states<br/>[StatusViews.tsx]"]
  node_job_card["Job result card<br/>[JobCard.tsx]"]
  node_header["Service status header<br/>[Header.tsx]"]
end

subgraph group_backend["Search backend"]
  node_main["FastAPI app<br/>[main.py]"]
  node_search_route["Search API<br/>[search.py]"]
  node_models["Search data models<br/>[models.py]"]
  node_tinyfish["TinyFish client<br/>[tinyfish.py]"]
end

subgraph group_processing["Listing processing"]
  node_parser["Listing parser<br/>[job_parser.py]"]
  node_dedupe["Duplicate removal<br/>[deduplication.py]"]
end

node_user(("Job seeker"))
node_tinyfish_service{{"TinyFish Web API"}}
node_opportunities{{"Career platforms"}}
node_apply_sites{{"Original application sites"}}

node_user -->|"enters filters"| node_searchbar
node_app -->|"renders"| node_searchbar
node_searchbar -->|"submits search"| node_app
node_app -->|"executes search"| node_api_client
node_api_client -->|"POST /api/search"| node_search_route
node_main -->|"registers routes"| node_search_route
node_search_route -->|"searches"| node_tinyfish
node_tinyfish -->|"queries"| node_tinyfish_service
node_tinyfish_service -.->|"searches listings"| node_opportunities
node_search_route -->|"parses results"| node_parser
node_parser -->|"creates listings"| node_models
node_search_route -->|"deduplicates"| node_dedupe
node_dedupe -->|"uses listing model"| node_models
node_search_route -->|"validates response"| node_models
node_api_client -.->|"checks health"| node_main
node_app -->|"renders status"| node_header
node_app -->|"renders states"| node_status_views
node_app -->|"renders results"| node_job_card
node_job_card -->|"opens listing link"| node_apply_sites
node_user -->|"views results"| node_job_card

click node_app "https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/App.tsx"
click node_searchbar "https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/components/SearchBar.tsx"
click node_api_client "https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/services/api.ts"
click node_status_views "https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/components/StatusViews.tsx"
click node_job_card "https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/components/JobCard.tsx"
click node_header "https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/components/Header.tsx"
click node_main "https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/main.py"
click node_search_route "https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/routes/search.py"
click node_models "https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/models.py"
click node_tinyfish "https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/services/tinyfish.py"
click node_parser "https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/services/job_parser.py"
click node_dedupe "https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/services/deduplication.py"

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_searchbar,node_api_client,node_status_views,node_job_card,node_header toneBlue
class node_main,node_search_route,node_models,node_tinyfish toneAmber
class node_parser,node_dedupe,node_tinyfish_service toneMint
class node_user,node_opportunities,node_apply_sites toneIndigo
```

## Components

### Search interface

- [App coordinator](https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Search filters](https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/components/SearchBar.tsx): `frontend/src/components/SearchBar.tsx`
- [HTTP client](https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`
- [Search states](https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/components/StatusViews.tsx): `frontend/src/components/StatusViews.tsx`
- [Job result card](https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/components/JobCard.tsx): `frontend/src/components/JobCard.tsx`
- [Service status header](https://github.com/dheerajrai-dev/nextrole/blob/main/frontend/src/components/Header.tsx): `frontend/src/components/Header.tsx`

### Search backend

- [FastAPI app](https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/main.py): `backend/app/main.py`
- [Search API](https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/routes/search.py): `backend/app/routes/search.py`
- [Search data models](https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/models.py): `backend/app/models.py`
- [TinyFish client](https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/services/tinyfish.py): `backend/app/services/tinyfish.py`

### Listing processing

- [Listing parser](https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/services/job_parser.py): `backend/app/services/job_parser.py`
- [Duplicate removal](https://github.com/dheerajrai-dev/nextrole/blob/main/backend/app/services/deduplication.py): `backend/app/services/deduplication.py`

### Other components

- **Job seeker**
- **TinyFish Web API**
- **Career platforms**
- **Original application sites**

## Connections

- Job seeker → Search filters: enters filters (evidence: `README.md`)
- App coordinator → Search filters: renders (evidence: `frontend/src/App.tsx`)
- Search filters → App coordinator: submits search (evidence: `frontend/src/App.tsx`)
- App coordinator → HTTP client: executes search (evidence: `frontend/src/App.tsx`)
- HTTP client → Search API: POST /api/search (evidence: `frontend/src/services/api.ts`)
- FastAPI app → Search API: registers routes (evidence: `backend/app/main.py`)
- Search API → TinyFish client: searches (evidence: `backend/app/routes/search.py`)
- TinyFish client → TinyFish Web API: queries (evidence: `backend/app/services/tinyfish.py`)
- TinyFish Web API → Career platforms: searches listings (evidence: `README.md`)
- Search API → Listing parser: parses results (evidence: `backend/app/routes/search.py`)
- Listing parser → Search data models: creates listings (evidence: `backend/app/services/job_parser.py`)
- Search API → Duplicate removal: deduplicates (evidence: `backend/app/routes/search.py`)
- Duplicate removal → Search data models: uses listing model (evidence: `backend/app/services/deduplication.py`)
- Search API → Search data models: validates response (evidence: `backend/app/routes/search.py`)
- HTTP client → FastAPI app: checks health
- App coordinator → Service status header: renders status (evidence: `frontend/src/App.tsx`)
- App coordinator → Search states: renders states (evidence: `frontend/src/App.tsx`)
- App coordinator → Job result card: renders results (evidence: `frontend/src/App.tsx`)
- Job result card → Original application sites: opens listing link (evidence: `frontend/src/components/JobCard.tsx`)
- Job seeker → Job result card: views results (evidence: `README.md`)
