# kanav14/networkpilot architecture

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

- Interactive diagram: https://gitdiagram.com/kanav14/networkpilot
- Repository: https://github.com/kanav14/networkpilot

## Overview

NetworkPilot is a local-first job-search CRM. The main workflow imports LinkedIn data, combines it with a career profile to score contacts, supports locally generated research and message drafts, and tracks user-recorded outreach and follow-ups. Its other documented capabilities include hiring-board signals, referrals, backups, and data management. The graph uses README workflow statements and shown source references; several router and service internals were not excerpted, so those links are documented rather than inferred from module names.

Main entry points: [`backend/app/db.py`](https://github.com/kanav14/networkpilot/blob/main/backend/app/db.py) (Local SQLite), [`frontend/src/app/settings/page.tsx`](https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/settings/page.tsx) (Settings page), [`backend/app/scoring/engine.py`](https://github.com/kanav14/networkpilot/blob/main/backend/app/scoring/engine.py) (Contact scoring), [`backend/app/ai/context.py`](https://github.com/kanav14/networkpilot/blob/main/backend/app/ai/context.py) (Career profile context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_import_ui["Import page<br/>[page.tsx]"]
  node_contacts_ui["Contacts page<br/>[page.tsx]"]
  node_contact_ui["Contact workspace<br/>[contact-view.tsx]"]
  node_dashboard_ui["Dashboard<br/>[page.tsx]"]
  node_pipeline_ui["Pipeline page<br/>[page.tsx]"]
  node_followups_ui["Follow-ups page<br/>[page.tsx]"]
  node_hiring_ui["Hiring page<br/>[page.tsx]"]
  node_referrals_ui["Referrals page<br/>[page.tsx]"]
  node_settings_ui["Settings page<br/>[page.tsx]"]
end

subgraph group_ingestion["Import and contacts"]
  node_import_service["Export importer<br/>[service.py]"]
  node_parsers["Export parsers<br/>[parsers.py]"]
  node_contacts_api["Contact management<br/>[contacts.py]"]
  node_contact_api["Contact details<br/>[contact_detail.py]"]
end

subgraph group_intelligence["Scoring and AI"]
  node_scoring_engine["Contact scoring<br/>[engine.py]"]
  node_scoring_rules["Scoring rules<br/>[rules.py]"]
  node_research_api["Profile research<br/>[research.py]"]
  node_profile_analysis["AI analysis"]
  node_ai_provider["Local AI provider<br/>[provider.py]"]
  node_ai_structured["Structured AI output<br/>[structured.py]"]
  node_career_context["Career profile context<br/>[context.py]"]
  node_hiring_service["Hiring signals<br/>[service.py]"]
  node_hiring_boards["Board discovery<br/>[boards.py]"]
  node_referrals_api["Referral signals<br/>[referrals.py]"]
end

subgraph group_engagement["Outreach and tracking"]
  node_drafts["Message drafts<br/>[drafts.py]"]
  node_followup_engine["Follow-up scheduler<br/>[engine.py]"]
  node_pipeline_api["Pipeline data<br/>[pipeline.py]"]
end

subgraph group_operations["Local operations"]
  node_settings_api["Profile settings<br/>[app_settings.py]"]
  node_backup_service["Backup and restore<br/>[backup.py]"]
  node_data_api["Data management<br/>[data.py]"]
  node_api_app["API application<br/>[main.py]"]
  node_sqlite[("Local SQLite<br/>[db.py]")]
end

node_user(("Job seeker"))
node_ollama["Local model runtime<br/>external system"]
node_public_boards["Public job boards<br/>external system"]

node_user -->|"uploads export"| node_import_ui
node_import_ui -->|"previews and commits"| node_import_service
node_import_service -->|"parses export"| node_parsers
node_import_service -->|"stores imported data"| node_sqlite
node_user -->|"sets profile"| node_settings_ui
node_settings_ui -->|"updates settings"| node_settings_api
node_settings_api -->|"uses career context"| node_career_context
node_user -->|"reviews contacts"| node_contacts_ui
node_contacts_ui -->|"browses and scores"| node_contacts_api
node_contacts_api -.->|"runs scoring"| node_scoring_engine
node_scoring_engine -->|"scores by rules"| node_scoring_rules
node_scoring_engine -->|"loads career profile"| node_career_context
node_scoring_engine -->|"reads and updates"| node_sqlite
node_contacts_ui -->|"opens contact"| node_contact_ui
node_contact_ui -->|"submits research"| node_research_api
node_research_api -->|"analyzes contact"| node_profile_analysis
node_profile_analysis -->|"requests structured output"| node_ai_structured
node_ai_structured -->|"calls model provider"| node_ai_provider
node_ai_provider -->|"queries model"| node_ollama
node_ollama -->|"returns model output"| node_ai_provider
node_profile_analysis -->|"uses career context"| node_career_context
node_research_api -->|"saves research"| node_sqlite
node_contact_ui -->|"requests draft"| node_drafts
node_drafts -->|"uses profile context"| node_career_context
node_drafts -->|"generates draft"| node_ai_structured
node_user -->|"manages pipeline"| node_pipeline_ui
node_pipeline_ui -->|"loads pipeline"| node_pipeline_api
node_pipeline_api -->|"reads contact statuses"| node_sqlite
node_user -->|"records responses"| node_followups_ui
node_followups_ui -.->|"views follow-ups"| node_followup_engine
node_api_app -->|"sweeps due items"| node_followup_engine
node_followup_engine -->|"updates activities"| node_sqlite
node_user -->|"checks job signals"| node_hiring_ui
node_hiring_ui -->|"requests board refresh"| node_hiring_service
node_hiring_service -->|"uses board fetchers"| node_hiring_boards
node_hiring_service -->|"stores job signals"| node_sqlite
node_hiring_boards -->|"checks public boards"| node_public_boards
node_user -->|"reviews referrals"| node_referrals_ui
node_referrals_ui -.->|"loads referral signals"| node_referrals_api
node_user -->|"views plan"| node_dashboard_ui
node_user -->|"manages backups"| node_settings_ui
node_settings_ui -->|"backs up or restores"| node_backup_service
node_settings_ui -->|"deletes data"| node_data_api
node_api_app -->|"initializes database"| node_sqlite

click node_import_ui "https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/import/page.tsx"
click node_contacts_ui "https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/contacts/page.tsx"
click node_contact_ui "https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/contacts/%5Bid%5D/contact-view.tsx"
click node_dashboard_ui "https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/page.tsx"
click node_pipeline_ui "https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/pipeline/page.tsx"
click node_followups_ui "https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/followups/page.tsx"
click node_hiring_ui "https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/hiring/page.tsx"
click node_referrals_ui "https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/referrals/page.tsx"
click node_settings_ui "https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/settings/page.tsx"
click node_import_service "https://github.com/kanav14/networkpilot/blob/main/backend/app/importer/service.py"
click node_parsers "https://github.com/kanav14/networkpilot/blob/main/backend/app/importer/parsers.py"
click node_contacts_api "https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/contacts.py"
click node_contact_api "https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/contact_detail.py"
click node_scoring_engine "https://github.com/kanav14/networkpilot/blob/main/backend/app/scoring/engine.py"
click node_scoring_rules "https://github.com/kanav14/networkpilot/blob/main/backend/app/scoring/rules.py"
click node_research_api "https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/research.py"
click node_profile_analysis "https://github.com/kanav14/networkpilot/blob/main/backend/app/ai/profile_analysis.py"
click node_ai_provider "https://github.com/kanav14/networkpilot/blob/main/backend/app/ai/provider.py"
click node_ai_structured "https://github.com/kanav14/networkpilot/blob/main/backend/app/ai/structured.py"
click node_career_context "https://github.com/kanav14/networkpilot/blob/main/backend/app/ai/context.py"
click node_drafts "https://github.com/kanav14/networkpilot/blob/main/backend/app/outreach/drafts.py"
click node_followup_engine "https://github.com/kanav14/networkpilot/blob/main/backend/app/followups/engine.py"
click node_pipeline_api "https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/pipeline.py"
click node_hiring_service "https://github.com/kanav14/networkpilot/blob/main/backend/app/hiring/service.py"
click node_hiring_boards "https://github.com/kanav14/networkpilot/blob/main/backend/app/hiring/boards.py"
click node_referrals_api "https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/referrals.py"
click node_settings_api "https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/app_settings.py"
click node_backup_service "https://github.com/kanav14/networkpilot/blob/main/backend/app/backup.py"
click node_data_api "https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/data.py"
click node_api_app "https://github.com/kanav14/networkpilot/blob/main/backend/app/main.py"
click node_sqlite "https://github.com/kanav14/networkpilot/blob/main/backend/app/db.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_import_ui,node_contacts_ui,node_contact_ui,node_dashboard_ui,node_pipeline_ui,node_followups_ui,node_hiring_ui,node_referrals_ui,node_settings_ui toneBlue
class node_import_service,node_parsers,node_contacts_api,node_contact_api toneAmber
class node_scoring_engine,node_scoring_rules,node_research_api,node_profile_analysis,node_ai_provider,node_ai_structured,node_career_context,node_hiring_service,node_hiring_boards,node_referrals_api toneMint
class node_drafts,node_followup_engine,node_pipeline_api toneRose
class node_settings_api,node_backup_service,node_data_api,node_api_app,node_sqlite,node_user,node_ollama,node_public_boards toneIndigo
```

## Components

### User experience

- [Import page](https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/import/page.tsx): `frontend/src/app/import/page.tsx`
- [Contacts page](https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/contacts/page.tsx): `frontend/src/app/contacts/page.tsx`
- [Contact workspace](https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/contacts/%5Bid%5D/contact-view.tsx): `frontend/src/app/contacts/[id]/contact-view.tsx`
- [Dashboard](https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Pipeline page](https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/pipeline/page.tsx): `frontend/src/app/pipeline/page.tsx`
- [Follow-ups page](https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/followups/page.tsx): `frontend/src/app/followups/page.tsx`
- [Hiring page](https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/hiring/page.tsx): `frontend/src/app/hiring/page.tsx`
- [Referrals page](https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/referrals/page.tsx): `frontend/src/app/referrals/page.tsx`
- [Settings page](https://github.com/kanav14/networkpilot/blob/main/frontend/src/app/settings/page.tsx): `frontend/src/app/settings/page.tsx`

### Import and contacts

- [Export importer](https://github.com/kanav14/networkpilot/blob/main/backend/app/importer/service.py): `backend/app/importer/service.py`
- [Export parsers](https://github.com/kanav14/networkpilot/blob/main/backend/app/importer/parsers.py): `backend/app/importer/parsers.py`
- [Contact management](https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/contacts.py): `backend/app/routers/contacts.py`
- [Contact details](https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/contact_detail.py): `backend/app/routers/contact_detail.py`

### Scoring and AI

- [Contact scoring](https://github.com/kanav14/networkpilot/blob/main/backend/app/scoring/engine.py): `backend/app/scoring/engine.py`
- [Scoring rules](https://github.com/kanav14/networkpilot/blob/main/backend/app/scoring/rules.py): `backend/app/scoring/rules.py`
- [Profile research](https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/research.py): `backend/app/routers/research.py`
- [AI analysis](https://github.com/kanav14/networkpilot/blob/main/backend/app/ai/profile_analysis.py): `backend/app/ai/profile_analysis.py`
- [Local AI provider](https://github.com/kanav14/networkpilot/blob/main/backend/app/ai/provider.py): `backend/app/ai/provider.py`
- [Structured AI output](https://github.com/kanav14/networkpilot/blob/main/backend/app/ai/structured.py): `backend/app/ai/structured.py`
- [Career profile context](https://github.com/kanav14/networkpilot/blob/main/backend/app/ai/context.py): `backend/app/ai/context.py`
- [Hiring signals](https://github.com/kanav14/networkpilot/blob/main/backend/app/hiring/service.py): `backend/app/hiring/service.py`
- [Board discovery](https://github.com/kanav14/networkpilot/blob/main/backend/app/hiring/boards.py): `backend/app/hiring/boards.py`
- [Referral signals](https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/referrals.py): `backend/app/routers/referrals.py`

### Outreach and tracking

- [Message drafts](https://github.com/kanav14/networkpilot/blob/main/backend/app/outreach/drafts.py): `backend/app/outreach/drafts.py`
- [Follow-up scheduler](https://github.com/kanav14/networkpilot/blob/main/backend/app/followups/engine.py): `backend/app/followups/engine.py`
- [Pipeline data](https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/pipeline.py): `backend/app/routers/pipeline.py`

### Local operations

- [Profile settings](https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/app_settings.py): `backend/app/routers/app_settings.py`
- [Backup and restore](https://github.com/kanav14/networkpilot/blob/main/backend/app/backup.py): `backend/app/backup.py`
- [Data management](https://github.com/kanav14/networkpilot/blob/main/backend/app/routers/data.py): `backend/app/routers/data.py`
- [API application](https://github.com/kanav14/networkpilot/blob/main/backend/app/main.py): `backend/app/main.py`
- [Local SQLite](https://github.com/kanav14/networkpilot/blob/main/backend/app/db.py): `backend/app/db.py`

### Other components

- **Job seeker**
- **Local model runtime**: external system
- **Public job boards**: external system

## Connections

- Job seeker → Import page: uploads export
- Import page → Export importer: previews and commits
- Export importer → Export parsers: parses export (evidence: `backend/app/importer/service.py`)
- Export importer → Local SQLite: stores imported data (evidence: `backend/app/importer/service.py`)
- Job seeker → Settings page: sets profile
- Settings page → Profile settings: updates settings
- Profile settings → Career profile context: uses career context (evidence: `backend/app/routers/app_settings.py`)
- Job seeker → Contacts page: reviews contacts
- Contacts page → Contact management: browses and scores
- Contact management → Contact scoring: runs scoring
- Contact scoring → Scoring rules: scores by rules (evidence: `backend/app/scoring/engine.py`)
- Contact scoring → Career profile context: loads career profile (evidence: `backend/app/scoring/engine.py`)
- Contact scoring → Local SQLite: reads and updates (evidence: `backend/app/scoring/engine.py`)
- Contacts page → Contact workspace: opens contact
- Contact workspace → Profile research: submits research
- Profile research → AI analysis: analyzes contact (evidence: `backend/app/routers/research.py`)
- AI analysis → Structured AI output: requests structured output (evidence: `backend/app/ai/profile_analysis.py`)
- Structured AI output → Local AI provider: calls model provider (evidence: `backend/app/ai/structured.py`)
- Local AI provider → Local model runtime: queries model
- Local model runtime → Local AI provider: returns model output
- AI analysis → Career profile context: uses career context (evidence: `backend/app/ai/profile_analysis.py`)
- Profile research → Local SQLite: saves research (evidence: `backend/app/routers/research.py`)
- Contact workspace → Message drafts: requests draft
- Message drafts → Career profile context: uses profile context (evidence: `backend/app/outreach/drafts.py`)
- Message drafts → Structured AI output: generates draft (evidence: `backend/app/outreach/drafts.py`)
- Job seeker → Pipeline page: manages pipeline
- Pipeline page → Pipeline data: loads pipeline
- Pipeline data → Local SQLite: reads contact statuses (evidence: `backend/app/routers/pipeline.py`)
- Job seeker → Follow-ups page: records responses
- Follow-ups page → Follow-up scheduler: views follow-ups
- API application → Follow-up scheduler: sweeps due items (evidence: `backend/app/main.py`)
- Follow-up scheduler → Local SQLite: updates activities (evidence: `backend/app/followups/engine.py`)
- Job seeker → Hiring page: checks job signals
- Hiring page → Hiring signals: requests board refresh
- Hiring signals → Board discovery: uses board fetchers (evidence: `backend/app/hiring/service.py`)
- Hiring signals → Local SQLite: stores job signals (evidence: `backend/app/hiring/service.py`)
- Board discovery → Public job boards: checks public boards
- Job seeker → Referrals page: reviews referrals
- Referrals page → Referral signals: loads referral signals
- Job seeker → Dashboard: views plan
- Job seeker → Settings page: manages backups
- Settings page → Backup and restore: backs up or restores
- Settings page → Data management: deletes data
- API application → Local SQLite: initializes database (evidence: `backend/app/main.py`)
