# abhay1verma5/project-alpha architecture

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

- Interactive diagram: https://gitdiagram.com/abhay1verma5/project-alpha
- Repository: https://github.com/abhay1verma5/project-alpha

## Overview

This is a government-jobs and exam-preparation platform with a Next.js frontend and Django API. The primary workflow is browsing or searching job listings; a separate study workflow provides previous-year questions, quizzes, and related learning tools. The backend also covers job crawling, AI assistance, current affairs, and topic weightage. Edges are limited to relationships visible in excerpts or the source index; the README is empty, so undocumented wiring is not inferred.

Main entry points: [`backend/jobs/views.py`](https://github.com/abhay1verma5/project-alpha/blob/main/backend/jobs/views.py) (Job API), [`frontend/src/components/pyq/PYQClient.tsx`](https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/pyq/PYQClient.tsx) (PYQ study UI), [`frontend/src/components/SearchPageClient.tsx`](https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/SearchPageClient.tsx) (Job search UI), [`backend/ai/views.py`](https://github.com/abhay1verma5/project-alpha/blob/main/backend/ai/views.py) (AI endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Job discovery"]
  node_job_search_ui["Job search UI"]
  node_job_card["Job cards<br/>[JobCard.tsx]"]
  node_job_api["Job API<br/>[views.py]"]
  node_job_filters["Job filters<br/>[filters.py]"]
  node_job_serializers["Job serializers<br/>[serializers.py]"]
  node_job_store[("Job records<br/>[models.py]")]
end

subgraph group_ingestion["Job ingestion"]
  node_crawler_command["Job crawler<br/>[crawl_jobs.py]"]
  node_parser_base["Parser base<br/>[base.py]"]
  node_engineering_parser["Engineering parser<br/>[engineering.py]"]
  node_seed_jobs["Job seeding<br/>[seed_jobs.py]"]
end

subgraph group_learning["Exam preparation"]
  node_pyq_ui["PYQ study UI<br/>[PYQClient.tsx]"]
  node_question_notes["Question notes<br/>[QuestionNotes.tsx]"]
  node_math_text["Math rendering<br/>[MathText.tsx]"]
  node_pyq_api["PYQ API<br/>[views.py]"]
  node_question_store[("Exam questions<br/>[models.py]")]
  node_question_seed["Question seeding<br/>[seed_500k_v2.py]"]
  node_weightage["Exam weightage"]
end

subgraph group_assistance["AI and current affairs"]
  node_ai_views["AI endpoints<br/>[views.py]"]
  node_ai_prompts["AI prompts<br/>[prompts.py]"]
  node_gemini_client["Gemini client<br/>[gemini.py]"]
  node_current_affairs_views["Current affairs API<br/>[views.py]"]
  node_affairs_crawl["Affairs crawler"]
  node_affairs_store[("Affairs records<br/>[models.py]")]
end

subgraph group_platform["Shared platform"]
  node_api_client["API client<br/>[api.ts]"]
  node_language["Language support"]
end

node_job_seeker(("Job seeker"))

node_job_seeker -->|"searches listings"| node_job_search_ui
node_job_search_ui -->|"calls searchJobs"| node_api_client
node_job_api -->|"applies filters"| node_job_filters
node_job_api -->|"queries jobs"| node_job_store
node_job_api -->|"serializes results"| node_job_serializers
node_job_search_ui -->|"renders results"| node_job_card
node_job_card -->|"uses translations"| node_language
node_crawler_command -.->|"dispatches parsers"| node_engineering_parser
node_engineering_parser -->|"inherits parser"| node_parser_base
node_seed_jobs -->|"writes jobs"| node_job_store
node_pyq_ui -->|"loads metadata"| node_api_client
node_pyq_ui -->|"renders math"| node_math_text
node_pyq_ui -->|"uses notes"| node_question_notes
node_question_seed -->|"inserts questions"| node_question_store
node_ai_views -->|"uses prompts"| node_ai_prompts
node_ai_views -->|"requests generation"| node_gemini_client
node_affairs_crawl -->|"generates content"| node_gemini_client
node_affairs_crawl -->|"stores articles"| node_affairs_store
node_current_affairs_views -->|"reads articles"| node_affairs_store
node_current_affairs_views -->|"selects quiz questions"| node_question_store

click node_job_search_ui "https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/SearchPageClient.tsx"
click node_job_card "https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/JobCard.tsx"
click node_api_client "https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/lib/api.ts"
click node_job_api "https://github.com/abhay1verma5/project-alpha/blob/main/backend/jobs/views.py"
click node_job_filters "https://github.com/abhay1verma5/project-alpha/blob/main/backend/jobs/filters.py"
click node_job_serializers "https://github.com/abhay1verma5/project-alpha/blob/main/backend/jobs/serializers.py"
click node_job_store "https://github.com/abhay1verma5/project-alpha/blob/main/backend/jobs/models.py"
click node_crawler_command "https://github.com/abhay1verma5/project-alpha/blob/main/backend/crawler/management/commands/crawl_jobs.py"
click node_parser_base "https://github.com/abhay1verma5/project-alpha/blob/main/backend/crawler/parsers/base.py"
click node_engineering_parser "https://github.com/abhay1verma5/project-alpha/blob/main/backend/crawler/parsers/engineering.py"
click node_seed_jobs "https://github.com/abhay1verma5/project-alpha/blob/main/backend/crawler/management/commands/seed_jobs.py"
click node_pyq_ui "https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/pyq/PYQClient.tsx"
click node_question_notes "https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/pyq/QuestionNotes.tsx"
click node_math_text "https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/pyq/MathText.tsx"
click node_pyq_api "https://github.com/abhay1verma5/project-alpha/blob/main/backend/pyq/views.py"
click node_question_store "https://github.com/abhay1verma5/project-alpha/blob/main/backend/pyq/models.py"
click node_question_seed "https://github.com/abhay1verma5/project-alpha/blob/main/backend/seed_500k_v2.py"
click node_ai_views "https://github.com/abhay1verma5/project-alpha/blob/main/backend/ai/views.py"
click node_ai_prompts "https://github.com/abhay1verma5/project-alpha/blob/main/backend/ai/prompts.py"
click node_gemini_client "https://github.com/abhay1verma5/project-alpha/blob/main/backend/config/gemini.py"
click node_current_affairs_views "https://github.com/abhay1verma5/project-alpha/blob/main/backend/currentaffairs/views.py"
click node_affairs_crawl "https://github.com/abhay1verma5/project-alpha/blob/main/backend/currentaffairs/management/commands/crawl_current_affairs.py"
click node_affairs_store "https://github.com/abhay1verma5/project-alpha/blob/main/backend/currentaffairs/models.py"
click node_language "https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/LanguageProvider.tsx"
click node_weightage "https://github.com/abhay1verma5/project-alpha/tree/main/backend/weightage"

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_job_search_ui,node_job_card,node_job_api,node_job_filters,node_job_serializers,node_job_store toneBlue
class node_crawler_command,node_parser_base,node_engineering_parser,node_seed_jobs toneAmber
class node_pyq_ui,node_question_notes,node_math_text,node_pyq_api,node_question_store,node_question_seed,node_weightage toneMint
class node_ai_views,node_ai_prompts,node_gemini_client,node_current_affairs_views,node_affairs_crawl,node_affairs_store toneRose
class node_api_client,node_language,node_job_seeker toneIndigo
```

## Components

### Job discovery

- [Job search UI](https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/SearchPageClient.tsx): `frontend/src/components/SearchPageClient.tsx`
- [Job cards](https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/JobCard.tsx): `frontend/src/components/JobCard.tsx`
- [Job API](https://github.com/abhay1verma5/project-alpha/blob/main/backend/jobs/views.py): `backend/jobs/views.py`
- [Job filters](https://github.com/abhay1verma5/project-alpha/blob/main/backend/jobs/filters.py): `backend/jobs/filters.py`
- [Job serializers](https://github.com/abhay1verma5/project-alpha/blob/main/backend/jobs/serializers.py): `backend/jobs/serializers.py`
- [Job records](https://github.com/abhay1verma5/project-alpha/blob/main/backend/jobs/models.py): `backend/jobs/models.py`

### Job ingestion

- [Job crawler](https://github.com/abhay1verma5/project-alpha/blob/main/backend/crawler/management/commands/crawl_jobs.py): `backend/crawler/management/commands/crawl_jobs.py`
- [Parser base](https://github.com/abhay1verma5/project-alpha/blob/main/backend/crawler/parsers/base.py): `backend/crawler/parsers/base.py`
- [Engineering parser](https://github.com/abhay1verma5/project-alpha/blob/main/backend/crawler/parsers/engineering.py): `backend/crawler/parsers/engineering.py`
- [Job seeding](https://github.com/abhay1verma5/project-alpha/blob/main/backend/crawler/management/commands/seed_jobs.py): `backend/crawler/management/commands/seed_jobs.py`

### Exam preparation

- [PYQ study UI](https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/pyq/PYQClient.tsx): `frontend/src/components/pyq/PYQClient.tsx`
- [Question notes](https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/pyq/QuestionNotes.tsx): `frontend/src/components/pyq/QuestionNotes.tsx`
- [Math rendering](https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/pyq/MathText.tsx): `frontend/src/components/pyq/MathText.tsx`
- [PYQ API](https://github.com/abhay1verma5/project-alpha/blob/main/backend/pyq/views.py): `backend/pyq/views.py`
- [Exam questions](https://github.com/abhay1verma5/project-alpha/blob/main/backend/pyq/models.py): `backend/pyq/models.py`
- [Question seeding](https://github.com/abhay1verma5/project-alpha/blob/main/backend/seed_500k_v2.py): `backend/seed_500k_v2.py`
- [Exam weightage](https://github.com/abhay1verma5/project-alpha/tree/main/backend/weightage): `backend/weightage`

### AI and current affairs

- [AI endpoints](https://github.com/abhay1verma5/project-alpha/blob/main/backend/ai/views.py): `backend/ai/views.py`
- [AI prompts](https://github.com/abhay1verma5/project-alpha/blob/main/backend/ai/prompts.py): `backend/ai/prompts.py`
- [Gemini client](https://github.com/abhay1verma5/project-alpha/blob/main/backend/config/gemini.py): `backend/config/gemini.py`
- [Current affairs API](https://github.com/abhay1verma5/project-alpha/blob/main/backend/currentaffairs/views.py): `backend/currentaffairs/views.py`
- [Affairs crawler](https://github.com/abhay1verma5/project-alpha/blob/main/backend/currentaffairs/management/commands/crawl_current_affairs.py): `backend/currentaffairs/management/commands/crawl_current_affairs.py`
- [Affairs records](https://github.com/abhay1verma5/project-alpha/blob/main/backend/currentaffairs/models.py): `backend/currentaffairs/models.py`

### Shared platform

- [API client](https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [Language support](https://github.com/abhay1verma5/project-alpha/blob/main/frontend/src/components/LanguageProvider.tsx): `frontend/src/components/LanguageProvider.tsx`

### Other components

- **Job seeker**

## Connections

- Job seeker → Job search UI: searches listings
- Job search UI → API client: calls searchJobs (evidence: `frontend/src/components/SearchPageClient.tsx`)
- Job API → Job filters: applies filters (evidence: `backend/jobs/views.py`)
- Job API → Job records: queries jobs (evidence: `backend/jobs/views.py`)
- Job API → Job serializers: serializes results (evidence: `backend/jobs/views.py`)
- Job search UI → Job cards: renders results (evidence: `frontend/src/components/SearchPageClient.tsx`)
- Job cards → Language support: uses translations (evidence: `frontend/src/components/JobCard.tsx`)
- Job crawler → Engineering parser: dispatches parsers
- Engineering parser → Parser base: inherits parser (evidence: `backend/crawler/parsers/engineering.py`)
- Job seeding → Job records: writes jobs (evidence: `backend/crawler/management/commands/seed_jobs.py`)
- PYQ study UI → API client: loads metadata (evidence: `frontend/src/components/pyq/PYQClient.tsx`)
- PYQ study UI → Math rendering: renders math (evidence: `frontend/src/components/pyq/PYQClient.tsx`)
- PYQ study UI → Question notes: uses notes (evidence: `frontend/src/components/pyq/PYQClient.tsx`)
- Question seeding → Exam questions: inserts questions (evidence: `backend/seed_500k_v2.py`)
- AI endpoints → AI prompts: uses prompts (evidence: `backend/ai/views.py`)
- AI endpoints → Gemini client: requests generation (evidence: `backend/ai/views.py`)
- Affairs crawler → Gemini client: generates content (evidence: `backend/currentaffairs/management/commands/crawl_current_affairs.py`)
- Affairs crawler → Affairs records: stores articles (evidence: `backend/currentaffairs/management/commands/crawl_current_affairs.py`)
- Current affairs API → Affairs records: reads articles (evidence: `backend/currentaffairs/views.py`)
- Current affairs API → Exam questions: selects quiz questions (evidence: `backend/currentaffairs/views.py`)
