# spidy20/smart_resume_analyser_app architecture

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

- Interactive diagram: https://gitdiagram.com/spidy20/smart_resume_analyser_app
- Repository: https://github.com/spidy20/smart_resume_analyser_app

## Overview

##### Project Type & Purpose
- The project is a Python-based web application built using Streamlit for analyzing and scoring resumes.
- Its purpose is to extract key information from user-uploaded PDFs (using tools like PyResparser and PDFMiner), evaluate resumes, and provide recommendations on careers, courses, skills, resume writing tips, and even suggest YouTube videos.
- There are roles for both Users and Admins (with preset admin credentials), so the application caters to different user journeys.

##### Analysis of the File Structure
- Top-level files include:
- App.py: The main entry point that runs the Streamlit web application UI.
- Courses.py: Houses information for course and YouTube video recommendations.
- requirements.txt: Lists all the dependencies (including PyResparser, PDFMiner, etc.).
- Logo and README.md: Branding/Documentation.
- Directory:
- Uploaded_Resumes: Contains sample PDF uploads representing user-submitted resumes.
- The README also mentions a "Classifier.py" that implements a KNN algorithm (even though it isn’t in the file tree); this suggests an additional module concerned with scoring or classification.
- There is mention of XAMP/Apache & SQL services, indicating that while the Python app handles the UI and resume parsing, there is also an underlying database (or service) component that might be used for storing analysis results or managing admin/user data.

##### Main Components
- Frontend (Streamlit UI):
- Represented by App.py, this component manages user interactions, resume uploads, and displaying results.
- Different sections for user and admin operations should be indicated.
- Resume Upload & File Management:
- The component that handles receiving resumes from the user and storing them in the Uploaded_Resumes folder.
- Resume Parsing & Extraction Module:
- Uses tools like PyResparser and PDFMiner to extract text and meaningful data from the resumes.
- Recommendation and Classification Engine:
- Consists of:
- The KNN-based classification module (even if referenced only in the README as Classifier.py), which calculates the resume score.
- Recommendation logic from Courses.py for career, courses, skills, and video suggestions.
- Backend/Database Layer:
- Even if minimal, show the connection to an SQL-based datastore as required by the instructions (using XAMP/Apache suggests MySQL or similar).
- Flow of storing and retrieving user analysis data.
- External Libraries & Dependencies:

- From the User Interface to the Resume Upload Module.
- From the Resume Upload Module to the Resume Parsing Module.
- From the Parsing Module to the Recommendation/Classification Engine.
- From both the UI and the Recommendation Engine to the Database (if storing/retrieving data).
- Bi-directional flows where needed (for example, results from the Recommendation Engine being displayed in the UI).

##### Architectural Patterns & Design Principles
- Separation of Concerns:
- Clearly separate UI (Streamlit front end) from the backend analytics (parsing, classification, and recommendations).
- Modularity:
- Each component (upload handler, parser, classification engine, and recommendation system) should be treated as a distinct module.
- Extensibility:
- The design should make it clear how one might extend or replace modules (e.g., changing the recommendation strategy or parser library).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        UI["Streamlit UI (App.py)"]:::frontend
    end

    %% Backend Layer
    subgraph "Backend Layer"
        UMan["Resume Upload Manager"]:::processing
        Uploads["Resume Upload & File Management"]:::upload
        Parser["Resume Parser (PyResparser, PDFMiner)"]:::processing
        Classifier["Classifier (KNN Algorithm)"]:::processing
        RecEngine["Recommendation Engine (Courses.py)"]:::processing
        DB["SQL Database/Backend"]:::database
    end

    %% External & Documentation
    subgraph "External & Documentation"
        ExtLib["External Dependencies (requirements.txt)"]:::external
        Readme["Branding & Documentation (README.md)"]:::doc
        Logo["Logo"]:::doc
    end

    %% User Node
    User["User (Regular/Admin)"]:::user

    %% Data Flow
    User -->|"accesses"| UI
    UI -->|"submits_resume"| UMan
    UMan -->|"stores_resume"| Uploads
    Uploads -->|"triggers_parsing"| Parser
    Parser -->|"extracts_features"| Classifier
    Parser -->|"sends_data"| RecEngine
    Classifier -->|"scores_resume"| RecEngine
    RecEngine -->|"returns_results"| UI
    UI -->|"persists_data"| DB
    RecEngine -->|"stores_analysis"| DB
    Parser -->|"uses"| ExtLib
    UI ---|"shows_branding"| Readme
    UI ---|"shows_branding"| Logo

    %% Click Events
    click UI "https://github.com/spidy20/smart_resume_analyser_app/blob/master/App.py"
    click RecEngine "https://github.com/spidy20/smart_resume_analyser_app/blob/master/Courses.py"
    click Uploads "https://github.com/spidy20/smart_resume_analyser_app/tree/master/Uploaded_Resumes"
    click ExtLib "https://github.com/spidy20/smart_resume_analyser_app/blob/master/requirements.txt"
    click Readme "https://github.com/spidy20/smart_resume_analyser_app/blob/master/README.md"
    click Logo "https://github.com/spidy20/smart_resume_analyser_app/tree/master/Logo"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef user fill:#FFC0CB,stroke:#333,stroke-width:2px;
    classDef upload fill:#FFE4B5,stroke:#333,stroke-width:2px;
    classDef processing fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef database fill:#FFF79A,stroke:#333,stroke-width:2px,stroke-dasharray: 5,5;
    classDef external fill:#FFCCBC,stroke:#333,stroke-width:2px;
    classDef doc fill:#D3D3D3,stroke:#333,stroke-width:2px;
```
