# ajays0708/naukri_agent architecture

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

- Interactive diagram: https://gitdiagram.com/ajays0708/naukri_agent
- Repository: https://github.com/ajays0708/naukri_agent

## Overview

Naukri AI Job Application Agent is a web application for discovering jobs, evaluating them against a candidate’s profile and preferences, and applying on Naukri with progress and human intervention when needed. A dashboard user starts an autonomous cycle; the backend discovers and filters jobs, runs AI-supported evaluation, and applies to eligible jobs, recording outcomes for the dashboard. The README documents shared browser sessions, screening-answer memory, and pending-question handling. Several route and service implementations were not excerpted, so edges for those documented capabilities cite the README rather than implying source inspection.

Main entry points: [`backend/services/autonomous_cycle/service.py`](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/autonomous_cycle/service.py) (Cycle orchestration), [`backend/database/database.py`](https://github.com/ajays0708/naukri_agent/blob/main/backend/database/database.py) (Application database), [`backend/services/discovery/service.py`](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/discovery/service.py) (Job discovery), [`backend/api/routes/autonomous_cycle.py`](https://github.com/ajays0708/naukri_agent/blob/main/backend/api/routes/autonomous_cycle.py) (Cycle endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Dashboard"]
  node_app["Web dashboard<br/>[App.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["API and orchestration"]
  node_api_routes["HTTP routes"]
  node_cycle_api["Cycle endpoints"]
  node_cycle["Cycle orchestration<br/>[service.py]"]
  node_coordinator["Run coordination<br/>[coordinator.py]"]
end

subgraph group_jobflow["Job processing"]
  node_discovery["Job discovery<br/>[service.py]"]
  node_naukri["Naukri browser adapter<br/>[adapter.py]"]
  node_matching["Job matching<br/>[engine.py]"]
  node_runner["Application runner<br/>[runner.py]"]
  node_application_service["Application records<br/>[service.py]"]
end

subgraph group_support["Profile and AI"]
  node_profile["Profile and resume<br/>[profile_service.py]"]
  node_ai_queue["AI processing queue<br/>[queue.py]"]
  node_ai_provider["AI provider<br/>[provider.py]"]
  node_answer_memory["Screening answer memory<br/>[answer_memory.py]"]
end

subgraph group_state["Persistence and control"]
  node_database[("Application database<br/>[database.py]")]
  node_job_model["Job records<br/>[job.py]"]
  node_application_model["Application records<br/>[application.py]"]
  node_screening_model["Screening state<br/>[screening.py]"]
end

node_user(("Dashboard user"))

node_user -->|"starts cycle"| node_app
node_app -->|"requests status"| node_api_client
node_api_client -.->|"calls cycle API"| node_cycle_api
node_app -->|"starts cycle"| node_api_client
node_api_routes -.->|"routes requests"| node_cycle_api
node_cycle_api -.->|"controls cycle"| node_cycle
node_cycle -->|"runs discovery"| node_discovery
node_discovery -->|"searches jobs"| node_naukri
node_discovery -->|"evaluates jobs"| node_matching
node_cycle -->|"evaluates candidates"| node_matching
node_cycle -->|"processes AI queue"| node_ai_queue
node_ai_queue -->|"requests generation"| node_ai_provider
node_cycle -->|"runs applications"| node_runner
node_runner -.->|"applies to jobs"| node_naukri
node_runner -.->|"checks saved answers"| node_answer_memory
node_answer_memory -.->|"stores answers"| node_screening_model
node_cycle -->|"updates progress"| node_coordinator
node_profile -.->|"persists profile"| node_database
node_discovery -->|"persists discovered jobs"| node_database
node_application_service -->|"stores application records"| node_database
node_database -->|"maps records"| node_job_model
node_database -->|"maps records"| node_application_model
node_cycle_api -.->|"serves pending questions"| node_screening_model

click node_app "https://github.com/ajays0708/naukri_agent/blob/main/frontend/src/app/App.tsx"
click node_api_client "https://github.com/ajays0708/naukri_agent/blob/main/frontend/src/services/api.ts"
click node_api_routes "https://github.com/ajays0708/naukri_agent/tree/main/backend/api/routes"
click node_cycle_api "https://github.com/ajays0708/naukri_agent/blob/main/backend/api/routes/autonomous_cycle.py"
click node_cycle "https://github.com/ajays0708/naukri_agent/blob/main/backend/services/autonomous_cycle/service.py"
click node_coordinator "https://github.com/ajays0708/naukri_agent/blob/main/backend/services/autonomous_cycle/coordinator.py"
click node_discovery "https://github.com/ajays0708/naukri_agent/blob/main/backend/services/discovery/service.py"
click node_naukri "https://github.com/ajays0708/naukri_agent/blob/main/backend/services/naukri/adapter.py"
click node_matching "https://github.com/ajays0708/naukri_agent/blob/main/backend/services/matching/engine.py"
click node_runner "https://github.com/ajays0708/naukri_agent/blob/main/backend/services/applications/runner.py"
click node_application_service "https://github.com/ajays0708/naukri_agent/blob/main/backend/services/applications/service.py"
click node_profile "https://github.com/ajays0708/naukri_agent/blob/main/backend/services/profile/profile_service.py"
click node_ai_queue "https://github.com/ajays0708/naukri_agent/blob/main/backend/services/gemini/queue.py"
click node_ai_provider "https://github.com/ajays0708/naukri_agent/blob/main/backend/services/gemini/provider.py"
click node_answer_memory "https://github.com/ajays0708/naukri_agent/blob/main/backend/services/applications/answer_memory.py"
click node_database "https://github.com/ajays0708/naukri_agent/blob/main/backend/database/database.py"
click node_job_model "https://github.com/ajays0708/naukri_agent/blob/main/backend/models/job.py"
click node_application_model "https://github.com/ajays0708/naukri_agent/blob/main/backend/models/application.py"
click node_screening_model "https://github.com/ajays0708/naukri_agent/blob/main/backend/models/screening.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_api_client,node_user toneBlue
class node_api_routes,node_cycle_api,node_cycle,node_coordinator toneAmber
class node_discovery,node_naukri,node_matching,node_runner,node_application_service toneMint
class node_profile,node_ai_queue,node_ai_provider,node_answer_memory toneRose
class node_database,node_job_model,node_application_model,node_screening_model toneIndigo
```

## Components

### Dashboard

- [Web dashboard](https://github.com/ajays0708/naukri_agent/blob/main/frontend/src/app/App.tsx): `frontend/src/app/App.tsx`
- [API client](https://github.com/ajays0708/naukri_agent/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### API and orchestration

- [HTTP routes](https://github.com/ajays0708/naukri_agent/tree/main/backend/api/routes): `backend/api/routes`
- [Cycle endpoints](https://github.com/ajays0708/naukri_agent/blob/main/backend/api/routes/autonomous_cycle.py): `backend/api/routes/autonomous_cycle.py`
- [Cycle orchestration](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/autonomous_cycle/service.py): `backend/services/autonomous_cycle/service.py`
- [Run coordination](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/autonomous_cycle/coordinator.py): `backend/services/autonomous_cycle/coordinator.py`

### Job processing

- [Job discovery](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/discovery/service.py): `backend/services/discovery/service.py`
- [Naukri browser adapter](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/naukri/adapter.py): `backend/services/naukri/adapter.py`
- [Job matching](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/matching/engine.py): `backend/services/matching/engine.py`
- [Application runner](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/applications/runner.py): `backend/services/applications/runner.py`
- [Application records](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/applications/service.py): `backend/services/applications/service.py`

### Profile and AI

- [Profile and resume](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/profile/profile_service.py): `backend/services/profile/profile_service.py`
- [AI processing queue](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/gemini/queue.py): `backend/services/gemini/queue.py`
- [AI provider](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/gemini/provider.py): `backend/services/gemini/provider.py`
- [Screening answer memory](https://github.com/ajays0708/naukri_agent/blob/main/backend/services/applications/answer_memory.py): `backend/services/applications/answer_memory.py`

### Persistence and control

- [Application database](https://github.com/ajays0708/naukri_agent/blob/main/backend/database/database.py): `backend/database/database.py`
- [Job records](https://github.com/ajays0708/naukri_agent/blob/main/backend/models/job.py): `backend/models/job.py`
- [Application records](https://github.com/ajays0708/naukri_agent/blob/main/backend/models/application.py): `backend/models/application.py`
- [Screening state](https://github.com/ajays0708/naukri_agent/blob/main/backend/models/screening.py): `backend/models/screening.py`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Web dashboard: starts cycle (evidence: `frontend/src/app/App.tsx`)
- Web dashboard → API client: requests status (evidence: `frontend/src/app/App.tsx`)
- API client → Cycle endpoints: calls cycle API (evidence: `README.md`)
- Web dashboard → API client: starts cycle (evidence: `frontend/src/app/App.tsx`)
- HTTP routes → Cycle endpoints: routes requests (evidence: `backend/main.py`)
- Cycle endpoints → Cycle orchestration: controls cycle (evidence: `README.md`)
- Cycle orchestration → Job discovery: runs discovery (evidence: `backend/services/autonomous_cycle/service.py`)
- Job discovery → Naukri browser adapter: searches jobs (evidence: `backend/services/discovery/service.py`)
- Job discovery → Job matching: evaluates jobs (evidence: `backend/services/discovery/service.py`)
- Cycle orchestration → Job matching: evaluates candidates (evidence: `backend/services/autonomous_cycle/service.py`)
- Cycle orchestration → AI processing queue: processes AI queue (evidence: `backend/services/autonomous_cycle/service.py`)
- AI processing queue → AI provider: requests generation (evidence: `backend/services/gemini/queue.py`)
- Cycle orchestration → Application runner: runs applications (evidence: `README.md`)
- Application runner → Naukri browser adapter: applies to jobs (evidence: `README.md`)
- Application runner → Screening answer memory: checks saved answers (evidence: `README.md`)
- Screening answer memory → Screening state: stores answers (evidence: `README.md`)
- Cycle orchestration → Run coordination: updates progress (evidence: `README.md`)
- Profile and resume → Application database: persists profile (evidence: `backend/services/profile/profile_service.py`)
- Job discovery → Application database: persists discovered jobs (evidence: `backend/services/discovery/service.py`)
- Application records → Application database: stores application records (evidence: `backend/services/applications/service.py`)
- Application database → Job records: maps records (evidence: `backend/models/job.py`)
- Application database → Application records: maps records (evidence: `backend/models/application.py`)
- Cycle endpoints → Screening state: serves pending questions (evidence: `README.md`)
