# tabarakmukhtar/smart-ai-resume-analyzer architecture

> Architecture diagram of the GitHub repository tabarakmukhtar/smart-ai-resume-analyzer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tabarakmukhtar/smart-ai-resume-analyzer
- Repository: https://github.com/tabarakmukhtar/smart-ai-resume-analyzer

## Overview

##### Project type and purpose
- This is a monolithic, full-stack Python web application built on Streamlit, designed to let users upload or build a resume, analyze it with NLP/ML models, get ATS scores, keyword gaps, and AI-driven suggestions, then download or export the optimized resume.

##### File structure
- app.py – the Streamlit entrypoint (UI + request router).
- config/ – database connections (SQLite), course and job-role definitions.
- dashboard/ – Streamlit dashboard components (charts, insights).
- feedback/ – feedback database + UI for user comments.
- jobs/ – job-search, portal integration, suggestions.
- resume_analytics/ + utils/resume_analyzer.py – core resume analysis logic (standard + AI).
- utils/resume_parser.py, resume_builder.py – parsing uploaded PDF/Word, building new resumes.
- utils/excel_manager.py – openpyxl exports.
- style/ + assets/ – CSS and static assets for UI theming.
- resume_data.db / feedback.db – SQLite storage for resumes, feedback, usage stats.
- Dockerfile / .devcontainer – containerization for dev & deploy.

##### Key architectural patterns and components
- Single process Monolith with modular code packages.
- MVC-style separation:
- View: Streamlit scripts & ui_components.py
- Controller: app.py routing + dashboard/ + feedback/ + jobs/
- Model: config/database.py + utils/database.py + SQLite DBs.
- Plugin-like modules for NLP/ML: spaCy, scikit-learn, NLTK, PyPDF2, python-docx, openpyxl.

##### Main components & interactions (
a.  Frontend (Streamlit UI)
- Components: app.py, dashboard/dashboard.py, dashboard/components.py, ui_components.py, style/style.css
- Renders pages: Home, Resume Analyzer, Builder, Dashboard, Job Search, Feedback, About
b.  Backend logic
- Resume Parser & Uploader (utils/resume_parser.py)
- Standard Analyzer (resume_analytics/analyzer.py + utils/resume_analyzer.py)
- AI-Powered Analyzer (utils/resume_analyzer.py invoking external AI or local ML)
- Resume Builder (utils/resume_builder.py + template modules)
- Job Search & Suggestions (jobs/*)
- Feedback Handler (feedback/feedback.py + feedback.db)
c.  Data Layer
- SQLite databases: resume_data.db, feedback.db, resume_analysis.db
- Tables for resumes, analysis results, user feedback
d.  External Services & Libraries
- spaCy, NLTK for NLP
- scikit-learn for ML models
- PyPDF2, python-docx for file parsing/generation
- openpyxl for Excel export
- (Optional) Google Gemini via API key for AI in Version 2.0
e.  Deployment / DevOps
- Docker container (Dockerfile)
- VS Code remote container (.devcontainer.json)

##### Relationships & data flows
- User → Streamlit UI → Upload/Fill Resume
- UI calls Parser → Extract text → Pass to Analyzer module(s)
- Analyzer reads/writes to resume_analysis.db
- Analyzer returns results → UI renders charts (Plotly) & recommendations
- User selects builder templates → Builder module generates Word/PDF → Download
- Job Search UI → jobs/* modules call external portals → suggestions → UI
- Feedback UI → feedback module writes to feedback.db → Admin Dashboard reads feedback
- Dashboard module reads all DBs → aggregates metrics → displays to admin

##### Architectural patterns & design principles
- Modular separation by feature area (config, dashboard, jobs, feedback, analytics, utils)
- Single responsibility per module
- Clear controller logic in app.py that routes user events to feature modules
- Data-access layer abstracted in utils/database.py & config/database.py
- Reusable UI components in ui_components.py

- Component names: “Streamlit UI”, “Resume Parser”, “Standard Analyzer”, “AI Analyzer”, “Resume Builder”, “Job Search Engine”, “Feedback Handler”, “Dashboard Aggregator”, “SQLite DBs”
- Technology labels: Python, Streamlit, SQLite, spaCy, scikit-learn, PyPDF2, python-docx, openpyxl, NLTK
- Environment boundary: “Docker Container” surrounding all internal components

## Diagram (Mermaid)

```mermaid
flowchart TB
  subgraph "Docker Container"
    subgraph "UI Layer"
      StreamlitUI["Streamlit UI\n(app.py)"]:::ui
      DashboardPage["Dashboard Pages\n(/dashboard/dashboard.py)"]:::ui
      DashboardComp["Dashboard Components\n(/dashboard/components.py)"]:::ui
      UIComponents["UI Components\n(/ui_components.py)"]:::ui
      Style["Stylesheet\n(/style/style.css)"]:::ui
      Assets["Static Assets\n(/assets/)"]:::ui
    end

    subgraph "Logic Layer"
      Parser["Resume Parser\n(/utils/resume_parser.py)"]:::logic
      StdAnalyzer["Standard Analyzer\n(/resume_analytics/analyzer.py)"]:::logic
      AIAnalyzer["AI-Powered Analyzer\n(/utils/resume_analyzer.py)"]:::logic
      Builder["Resume Builder\n(/utils/resume_builder.py)"]:::logic
      ExcelMgr["Excel Export Manager\n(/utils/excel_manager.py)"]:::logic

      subgraph "Job Search Services"
        JobSearch["Job Search Engine\n(/jobs/job_search.py)"]:::logic
        Portals["Portal Integration\n(/jobs/job_portals.py)"]:::logic
        Companies["Company Handlers\n(/jobs/companies.py)"]:::logic
        Suggestions["AI Job Suggestions\n(/jobs/suggestions.py)"]:::logic
      end

      Feedback["Feedback Handler\n(/feedback/feedback.py)"]:::logic
      DashboardAgg["Dashboard Aggregator\n(/dashboard/dashboard.py)"]:::logic
    end

    subgraph "Data Layer"
      DBResume["Resume DB\n(resume_data.db)"]:::db
      DBAnalysis["Analysis DB\n(resume_analysis.db)"]:::db
      DBFeedback["Feedback DB\n(/feedback/feedback.db)"]:::db
      DBConfig["Config DB\n(config/database.py)"]:::db
    end

    subgraph "External Services"
      spaCy["spaCy"]:::ext
      NLTK["NLTK"]:::ext
      SKlearn["scikit-learn"]:::ext
      PyPDF2["PyPDF2"]:::ext
      Docx["python-docx"]:::ext
      Openpyxl["openpyxl"]:::ext
      AIService["AI Service\n(Google Gemini / OpenAI)"]:::ext
    end
  end

  %% Data flows
  StreamlitUI -->|"upload file"| Parser
  Parser -->|"text extracted"| StdAnalyzer
  Parser -->|"text extracted"| AIAnalyzer
  StdAnalyzer -->|"write/read results"| DBAnalysis
  AIAnalyzer -->|"write/read results"| DBAnalysis
  StdAnalyzer -->|"analysis results"| StreamlitUI
  AIAnalyzer -->|"analysis results"| StreamlitUI
  StreamlitUI -->|"download resume"| Builder
  Builder -->|"generate file"| StreamlitUI
  StreamlitUI -->|"export to Excel"| ExcelMgr
  ExcelMgr -->|"Excel file"| StreamlitUI

  StreamlitUI -->|"job query"| JobSearch
  JobSearch -->|"call portals"| Portals
  Portals -->|"fetch data"| JobSearch
  JobSearch -->|"suggestions"| Suggestions
  Suggestions -->|"results"| StreamlitUI

  StreamlitUI -->|"submit feedback"| Feedback
  Feedback -->|"write feedback"| DBFeedback
  DashboardAgg -->|"read feedback"| DBFeedback
  DashboardAgg -->|"read resumes"| DBResume
  DashboardAgg -->|"read analysis"| DBAnalysis
  DashboardAgg -->|"render charts"| StreamlitUI

  StdAnalyzer --> spaCy
  StdAnalyzer --> NLTK
  StdAnalyzer --> SKlearn
  Parser --> PyPDF2
  Parser --> Docx
  ExcelMgr --> Openpyxl
  AIAnalyzer --> AIService

  %% Click events
  click StreamlitUI "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//app.py"
  click DashboardPage "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//dashboard/dashboard.py"
  click DashboardComp "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//dashboard/components.py"
  click UIComponents "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//ui_components.py"
  click Style "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//style/style.css"
  click Assets "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/tree/main//assets/"
  click Parser "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//utils/resume_parser.py"
  click StdAnalyzer "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//resume_analytics/analyzer.py"
  click AIAnalyzer "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//utils/resume_analyzer.py"
  click Builder "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//utils/resume_builder.py"
  click ExcelMgr "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//utils/excel_manager.py"
  click JobSearch "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//jobs/job_search.py"
  click Portals "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//jobs/job_portals.py"
  click Companies "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//jobs/companies.py"
  click Suggestions "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//jobs/suggestions.py"
  click Feedback "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//feedback/feedback.py"
  click DBFeedback "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//feedback/feedback.db"
  click DashboardAgg "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//dashboard/dashboard.py"
  click DBConfig "https://github.com/tabarakmukhtar/smart-ai-resume-analyzer/blob/main//config/database.py"

  %% Styles
  classDef ui fill:#D0E6FF,stroke:#0366D6,color:#0366D6;
  classDef logic fill:#DFFFE0,stroke:#2E8B57,color:#2E8B57;
  classDef db fill:#FFF4E5,stroke:#D2691E,color:#D2691E;
  classDef ext fill:#F3E5FF,stroke:#8A2BE2,color:#8A2BE2
```
