# nnavyy/automation-vacancy-finder architecture

> Architecture diagram of the GitHub repository nnavyy/automation-vacancy-finder, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nnavyy/automation-vacancy-finder
- Repository: https://github.com/nnavyy/automation-vacancy-finder

## Overview

Nanda AI Job Assistant is a multi-user HH.ru job-search and application-tracking product. Users configure search profiles, review vacancies evaluated against their preferences, save or apply to matches, and track outcomes; collection can also notify them through Telegram. Separate capabilities cover company-contact research and outreach, HH.ru negotiation synchronization, and analytics. The collection pipeline and selected API handlers are sampled; several documented subsystems are represented by their exact route or library paths, but their internal calls are not inferred from filenames alone.

Main entry points: [`src/lib/collectionPipeline.ts`](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/collectionPipeline.ts) (Collection pipeline), [`src/lib/db.ts`](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/db.ts) (Application database), [`src/app/api/vacancies/analyze/route.ts`](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/vacancies/analyze/route.ts) (Manual analysis API), [`src/lib/feedbackLearning.ts`](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/feedbackLearning.ts) (Feedback learning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Job Search Experience"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_vacancy_views["Vacancy views<br/>[page.tsx]"]
  node_settings_ui["Profile settings<br/>[page.tsx]"]
  node_analytics_ui["Analytics<br/>[page.tsx]"]
  node_vacancy_api["Vacancy API<br/>[route.ts]"]
  node_settings_api["Settings API<br/>[route.ts]"]
  node_profiles_api["Search profiles<br/>[route.ts]"]
end

subgraph group_intelligence["Collection &amp; Evaluation"]
  node_pipeline["Collection pipeline"]
  node_hh_collection["HH vacancy clients"]
  node_rule_filter["Rule screening<br/>[ruleFilter.ts]"]
  node_feedback["Feedback learning"]
  node_analyzer["AI vacancy analysis<br/>[aiAnalyzer.ts]"]
  node_scoring["Rule scoring<br/>[scoring.ts]"]
  node_manual_analysis["Manual analysis API<br/>[route.ts]"]
end

subgraph group_workflow["Application Workflow"]
  node_vacancy_actions["Vacancy actions<br/>[route.ts]"]
  node_letter_api["Cover letter generation<br/>[route.ts]"]
  node_company_intel["Company contact research<br/>[companyIntel.ts]"]
  node_company_search["Company Intel API<br/>[route.ts]"]
  node_email_api["Outreach email API<br/>[route.ts]"]
end

subgraph group_integrations["External Integrations"]
  node_telegram["Telegram notifications<br/>[telegram.ts]"]
  node_telegram_webhook["Telegram actions<br/>[route.ts]"]
  node_hh_sync["HH negotiation sync<br/>[route.ts]"]
  node_hh_account(("HH.ru"))
  node_ai_services{{"AI providers"}}
  node_telegram_service(("Telegram"))
  node_database[("Application database<br/>[db.ts]")]
end

node_user(("Job seeker"))

node_user -->|"reviews matches"| node_dashboard
node_user -->|"reviews vacancies"| node_vacancy_views
node_user -->|"configures profile"| node_settings_ui
node_user -->|"tracks outcomes"| node_analytics_ui
node_pipeline -->|"reads preferences; stores vacancies"| node_database
node_pipeline -->|"collects listings"| node_hh_collection
node_pipeline -->|"screens vacancies"| node_rule_filter
node_pipeline -->|"gets similar feedback"| node_feedback
node_pipeline -->|"analyzes vacancies"| node_analyzer
node_pipeline -->|"sends match alerts"| node_telegram
node_pipeline -->|"notifies"| node_telegram_service
node_manual_analysis -->|"loads and saves analysis"| node_database
node_manual_analysis -->|"gets similar feedback"| node_feedback
node_manual_analysis -->|"analyzes vacancy"| node_analyzer
node_manual_analysis -->|"calculates rule score"| node_scoring
node_vacancy_api -->|"queries vacancies"| node_database
node_settings_api -->|"reads and writes preferences"| node_database
node_profiles_api -->|"manages profiles"| node_database
node_letter_api -->|"loads and updates letter"| node_database
node_letter_api -->|"gets similar feedback"| node_feedback
node_letter_api -->|"requests letter"| node_ai_services
node_email_api -->|"reads resume"| node_database
node_email_api -->|"generates outreach"| node_ai_services
node_telegram_webhook -->|"reads vacancies; records feedback"| node_database
node_telegram_webhook -->|"saves feedback"| node_feedback
node_telegram_webhook -->|"answers updates"| node_telegram_service
node_company_search -->|"searches contacts"| node_company_intel
node_hh_sync -.->|"syncs negotiations"| node_hh_account
node_pipeline -.->|"uses AI providers"| node_ai_services

click node_dashboard "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/dashboard/page.tsx"
click node_vacancy_views "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/dashboard/vacancies/page.tsx"
click node_settings_ui "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/dashboard/settings/page.tsx"
click node_analytics_ui "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/dashboard/analytics/page.tsx"
click node_vacancy_api "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/vacancies/route.ts"
click node_settings_api "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/settings/route.ts"
click node_profiles_api "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/profiles/route.ts"
click node_pipeline "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/collectionPipeline.ts"
click node_hh_collection "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/hhPublicVacancyClient.ts"
click node_rule_filter "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/ruleFilter.ts"
click node_feedback "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/feedbackLearning.ts"
click node_analyzer "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/aiAnalyzer.ts"
click node_scoring "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/scoring.ts"
click node_manual_analysis "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/vacancies/analyze/route.ts"
click node_vacancy_actions "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/vacancies/%5Bid%5D/route.ts"
click node_letter_api "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/vacancies/%5Bid%5D/regenerate-letter/route.ts"
click node_company_intel "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/companyIntel.ts"
click node_company_search "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/company-intel/search/route.ts"
click node_email_api "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/company-intel/generate-email/route.ts"
click node_telegram "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/telegram.ts"
click node_telegram_webhook "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/telegram/webhook/route.ts"
click node_hh_sync "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/cron/sync-negotiations/route.ts"
click node_ai_services "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/aiProviderRouter.ts"
click node_database "https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/db.ts"

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_dashboard,node_vacancy_views,node_settings_ui,node_analytics_ui,node_vacancy_api,node_settings_api,node_profiles_api toneBlue
class node_pipeline,node_hh_collection,node_rule_filter,node_feedback,node_analyzer,node_scoring,node_manual_analysis toneAmber
class node_vacancy_actions,node_letter_api,node_company_intel,node_company_search,node_email_api toneMint
class node_telegram,node_telegram_webhook,node_hh_sync,node_hh_account,node_ai_services,node_telegram_service,node_database toneRose
class node_user toneIndigo
```

## Components

### Job Search Experience

- [Dashboard](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Vacancy views](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/dashboard/vacancies/page.tsx): `src/app/dashboard/vacancies/page.tsx`
- [Profile settings](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/dashboard/settings/page.tsx): `src/app/dashboard/settings/page.tsx`
- [Analytics](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/dashboard/analytics/page.tsx): `src/app/dashboard/analytics/page.tsx`
- [Vacancy API](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/vacancies/route.ts): `src/app/api/vacancies/route.ts`
- [Settings API](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/settings/route.ts): `src/app/api/settings/route.ts`
- [Search profiles](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/profiles/route.ts): `src/app/api/profiles/route.ts`

### Collection & Evaluation

- [Collection pipeline](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/collectionPipeline.ts): `src/lib/collectionPipeline.ts`
- [HH vacancy clients](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/hhPublicVacancyClient.ts): `src/lib/hhPublicVacancyClient.ts`
- [Rule screening](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/ruleFilter.ts): `src/lib/ruleFilter.ts`
- [Feedback learning](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/feedbackLearning.ts): `src/lib/feedbackLearning.ts`
- [AI vacancy analysis](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/aiAnalyzer.ts): `src/lib/aiAnalyzer.ts`
- [Rule scoring](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/scoring.ts): `src/lib/scoring.ts`
- [Manual analysis API](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/vacancies/analyze/route.ts): `src/app/api/vacancies/analyze/route.ts`

### Application Workflow

- [Vacancy actions](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/vacancies/%5Bid%5D/route.ts): `src/app/api/vacancies/[id]/route.ts`
- [Cover letter generation](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/vacancies/%5Bid%5D/regenerate-letter/route.ts): `src/app/api/vacancies/[id]/regenerate-letter/route.ts`
- [Company contact research](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/companyIntel.ts): `src/lib/companyIntel.ts`
- [Company Intel API](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/company-intel/search/route.ts): `src/app/api/company-intel/search/route.ts`
- [Outreach email API](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/company-intel/generate-email/route.ts): `src/app/api/company-intel/generate-email/route.ts`

### External Integrations

- [Telegram notifications](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/telegram.ts): `src/lib/telegram.ts`
- [Telegram actions](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/telegram/webhook/route.ts): `src/app/api/telegram/webhook/route.ts`
- [HH negotiation sync](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/app/api/cron/sync-negotiations/route.ts): `src/app/api/cron/sync-negotiations/route.ts`
- **HH.ru**
- [AI providers](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/aiProviderRouter.ts): `src/lib/aiProviderRouter.ts`
- **Telegram**
- [Application database](https://github.com/nnavyy/automation-vacancy-finder/blob/main/src/lib/db.ts): `src/lib/db.ts`

### Other components

- **Job seeker**

## Connections

- Job seeker → Dashboard: reviews matches
- Job seeker → Vacancy views: reviews vacancies
- Job seeker → Profile settings: configures profile
- Job seeker → Analytics: tracks outcomes
- Collection pipeline → Application database: reads preferences; stores vacancies
- Collection pipeline → HH vacancy clients: collects listings
- Collection pipeline → Rule screening: screens vacancies
- Collection pipeline → Feedback learning: gets similar feedback
- Collection pipeline → AI vacancy analysis: analyzes vacancies
- Collection pipeline → Telegram notifications: sends match alerts
- Collection pipeline → Telegram: notifies
- Manual analysis API → Application database: loads and saves analysis
- Manual analysis API → Feedback learning: gets similar feedback
- Manual analysis API → AI vacancy analysis: analyzes vacancy
- Manual analysis API → Rule scoring: calculates rule score
- Vacancy API → Application database: queries vacancies
- Settings API → Application database: reads and writes preferences
- Search profiles → Application database: manages profiles
- Cover letter generation → Application database: loads and updates letter
- Cover letter generation → Feedback learning: gets similar feedback
- Cover letter generation → AI providers: requests letter
- Outreach email API → Application database: reads resume
- Outreach email API → AI providers: generates outreach
- Telegram actions → Application database: reads vacancies; records feedback
- Telegram actions → Feedback learning: saves feedback
- Telegram actions → Telegram: answers updates
- Company Intel API → Company contact research: searches contacts
- HH negotiation sync → HH.ru: syncs negotiations
- Collection pipeline → AI providers: uses AI providers
