# shivam1981-leo/skillsync architecture

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

- Interactive diagram: https://gitdiagram.com/shivam1981-leo/skillsync
- Repository: https://github.com/shivam1981-leo/skillsync

## Overview

#### Purpose and Runtime
SkillSync is a Flask-served resume intelligence platform with a static multi-page frontend. Its core workflow accepts a resume and optional job description, extracts skills, scores fit, identifies missing skills, and returns results for dashboard visualization. The application starts at `app.py`; browser pages are plain HTML plus shared CSS/JavaScript.

Paths: `app.py`, `dashboard.html`, `static/script.js`

#### Entry Points and Page Routing
Flask provides the application entry point and serves the dashboard at `/` and `/dashboard.html`, with separate routes/pages for login, hackathons, jobs, and courses. The frontend navigation is cross-page rather than a single-page application.

Paths: `app.py`, `login.html`, `hackathons.html`

#### Resume Analysis API
The backend is responsible for resume upload/analysis, PDF text extraction, semantic or keyword-based matching, and response construction. It uses `PyPDF2` for document text and can use `sentence-transformers` plus NumPy for embedding-based similarity; keyword scoring is the fallback when BERT-style model support is unavailable.

Paths: `app.py`, `dashboard.html`, `static/script.js`

#### Skill-Gap and Scoring Model
The analysis stage compares extracted resume/JD content against a target-skill set. It produces an overall score and derives `weak_points` from skills absent from the resume, rather than returning a fixed empty list. The dashboard consumes these results to present fit analysis and skill visualizations, including a radar display.

Paths: `app.py`, `dashboard.html`, `static/script.js`

#### Frontend Interaction Layer
Shared browser logic coordinates resume upload, API calls, result rendering, dashboard radar behavior, dropdowns, and session-backed user display. Login stores the user name and role in `sessionStorage`; the dashboard/navbar reads that client-side state. This is a browser session convenience, not server-side authentication.

Paths: `static/script.js`, `login.html`, `dashboard.html`

#### Optional Persistence Boundary
MySQL persistence is optional and isolated behind backend availability checks. When `mysql-connector-python` and the configured database are available, uploaded resume metadata, raw text, and serialized embeddings can be stored in the `resumelens.resumes` table. If unavailable, analysis continues without persistence.

Paths: `app.py`, `README.md`

#### Supporting Discovery Pages
Hackathon, job, and course pages are client-rendered informational surfaces sharing the same design and interaction assets. Their primary logic is local filtering/search rather than backend-driven listings: hackathons filter by organizer/type, jobs by text/type, and courses by roadmap/category controls.

Paths: `hackathons.html`, `jobs.html`, `courses.html`

#### Presentation Boundary
All pages use a shared visual system and common JavaScript, keeping page-specific markup separate from application behavior. The frontend communicates with Flask for resume intelligence while static content filtering remains in the browser.

Paths: `static/style.css`, `static/script.js`, `app.py`

Main entry points: [`static/script.js`](https://github.com/shivam1981-leo/skillsync/blob/main/static/script.js) (Shared browser logic), [`app.py`](https://github.com/shivam1981-leo/skillsync/blob/main/app.py) (Flask application), [`static/style.css`](https://github.com/shivam1981-leo/skillsync/blob/main/static/style.css) (Shared visual system), [`login.html`](https://github.com/shivam1981-leo/skillsync/blob/main/login.html) (Login page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["Flask Backend"]
  node_flask_app["Flask application<br/>Python entry point<br/>[app.py]"]
  node_analysis_api["Resume analysis API<br/>API handler<br/>[app.py]"]
  node_pdf_extraction["PDF text extraction<br/>PyPDF2 stage<br/>[app.py]"]
  node_skill_scoring["Skill-gap scoring<br/>analysis stage<br/>[app.py]"]
  node_semantic_matching["Semantic matching<br/>optional model stage<br/>[app.py]"]
  node_mysql_store[("Optional resume store<br/>MySQL table<br/>[app.py]")]
end

subgraph group_frontend["Static Frontend"]
  node_dashboard["Dashboard page<br/>HTML page<br/>[dashboard.html]"]
  node_login["Login page<br/>HTML page<br/>[login.html]"]
  node_shared_js["Shared browser logic<br/>JavaScript<br/>[script.js]"]
  node_browser_session["Browser session state<br/>sessionStorage<br/>[script.js]"]
  node_shared_css["Shared visual system<br/>CSS<br/>[style.css]"]
end

subgraph group_discovery["Discovery Pages"]
  node_hackathons["Hackathons page<br/>HTML page<br/>[hackathons.html]"]
  node_jobs["Jobs page<br/>HTML page<br/>[jobs.html]"]
  node_courses["Courses page<br/>HTML page<br/>[courses.html]"]
end

node_flask_app -->|"serves / and /dashboard.html"| node_dashboard
node_flask_app -->|"serves route"| node_login
node_flask_app -->|"serves route"| node_hackathons
node_flask_app -->|"serves route"| node_jobs
node_flask_app -->|"serves route"| node_courses
node_dashboard -->|"loads"| node_shared_js
node_login -->|"loads"| node_shared_js
node_hackathons -->|"loads"| node_shared_js
node_jobs -->|"loads"| node_shared_js
node_courses -->|"loads"| node_shared_js
node_shared_css -->|"styles"| node_dashboard
node_shared_css -->|"styles"| node_login
node_shared_css -->|"styles"| node_hackathons
node_shared_css -->|"styles"| node_jobs
node_shared_css -->|"styles"| node_courses
node_shared_js -->|"uploads resume and requests analysis"| node_analysis_api
node_analysis_api -->|"extracts document text"| node_pdf_extraction
node_pdf_extraction -->|"provides resume text"| node_skill_scoring
node_skill_scoring -.->|"uses when available"| node_semantic_matching
node_analysis_api -.->|"persists when available"| node_mysql_store
node_analysis_api -->|"returns score and weak points"| node_shared_js
node_login -->|"stores user name and role"| node_browser_session
node_browser_session -->|"supplies user display state"| node_shared_js

click node_flask_app "https://github.com/shivam1981-leo/skillsync/blob/main/app.py"
click node_analysis_api "https://github.com/shivam1981-leo/skillsync/blob/main/app.py"
click node_pdf_extraction "https://github.com/shivam1981-leo/skillsync/blob/main/app.py"
click node_skill_scoring "https://github.com/shivam1981-leo/skillsync/blob/main/app.py"
click node_semantic_matching "https://github.com/shivam1981-leo/skillsync/blob/main/app.py"
click node_mysql_store "https://github.com/shivam1981-leo/skillsync/blob/main/app.py"
click node_dashboard "https://github.com/shivam1981-leo/skillsync/blob/main/dashboard.html"
click node_login "https://github.com/shivam1981-leo/skillsync/blob/main/login.html"
click node_shared_js "https://github.com/shivam1981-leo/skillsync/blob/main/static/script.js"
click node_browser_session "https://github.com/shivam1981-leo/skillsync/blob/main/static/script.js"
click node_shared_css "https://github.com/shivam1981-leo/skillsync/blob/main/static/style.css"
click node_hackathons "https://github.com/shivam1981-leo/skillsync/blob/main/hackathons.html"
click node_jobs "https://github.com/shivam1981-leo/skillsync/blob/main/jobs.html"
click node_courses "https://github.com/shivam1981-leo/skillsync/blob/main/courses.html"

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_flask_app,node_analysis_api,node_pdf_extraction,node_skill_scoring,node_semantic_matching,node_mysql_store toneBlue
class node_dashboard,node_login,node_shared_js,node_browser_session,node_shared_css toneAmber
class node_hackathons,node_jobs,node_courses toneMint
```

## Components

### Flask Backend

- [Flask application](https://github.com/shivam1981-leo/skillsync/blob/main/app.py): Python entry point · Serves pages and resume analysis routes. · `app.py`
- [Resume analysis API](https://github.com/shivam1981-leo/skillsync/blob/main/app.py): API handler · Accepts resume and optional job description. · `app.py`
- [PDF text extraction](https://github.com/shivam1981-leo/skillsync/blob/main/app.py): PyPDF2 stage · `app.py`
- [Skill-gap scoring](https://github.com/shivam1981-leo/skillsync/blob/main/app.py): analysis stage · Calculates fit score and missing target skills. · `app.py`
- [Semantic matching](https://github.com/shivam1981-leo/skillsync/blob/main/app.py): optional model stage · Uses sentence-transformers and NumPy when available; otherwise keyword scoring. · `app.py`
- [Optional resume store](https://github.com/shivam1981-leo/skillsync/blob/main/app.py): MySQL table · Stores resume metadata, text, and serialized embeddings when available. · `app.py`

### Static Frontend

- [Dashboard page](https://github.com/shivam1981-leo/skillsync/blob/main/dashboard.html): HTML page · Displays fit analysis, weak points, and radar visualization. · `dashboard.html`
- [Login page](https://github.com/shivam1981-leo/skillsync/blob/main/login.html): HTML page · `login.html`
- [Shared browser logic](https://github.com/shivam1981-leo/skillsync/blob/main/static/script.js): JavaScript · Coordinates uploads, API calls, rendering, navigation controls, and session display. · `static/script.js`
- [Browser session state](https://github.com/shivam1981-leo/skillsync/blob/main/static/script.js): sessionStorage · Keeps client-side user name and role; not server authentication. · `static/script.js`
- [Shared visual system](https://github.com/shivam1981-leo/skillsync/blob/main/static/style.css): CSS · `static/style.css`

### Discovery Pages

- [Hackathons page](https://github.com/shivam1981-leo/skillsync/blob/main/hackathons.html): HTML page · Client-side organizer and type filtering. · `hackathons.html`
- [Jobs page](https://github.com/shivam1981-leo/skillsync/blob/main/jobs.html): HTML page · Client-side text and type filtering. · `jobs.html`
- [Courses page](https://github.com/shivam1981-leo/skillsync/blob/main/courses.html): HTML page · Client-side roadmap and category filtering. · `courses.html`

## Connections

- Flask application → Dashboard page: serves / and /dashboard.html
- Flask application → Login page: serves route
- Flask application → Hackathons page: serves route
- Flask application → Jobs page: serves route
- Flask application → Courses page: serves route
- Dashboard page → Shared browser logic: loads
- Login page → Shared browser logic: loads
- Hackathons page → Shared browser logic: loads
- Jobs page → Shared browser logic: loads
- Courses page → Shared browser logic: loads
- Shared visual system → Dashboard page: styles
- Shared visual system → Login page: styles
- Shared visual system → Hackathons page: styles
- Shared visual system → Jobs page: styles
- Shared visual system → Courses page: styles
- Shared browser logic → Resume analysis API: uploads resume and requests analysis
- Resume analysis API → PDF text extraction: extracts document text
- PDF text extraction → Skill-gap scoring: provides resume text
- Skill-gap scoring → Semantic matching: uses when available
- Resume analysis API → Optional resume store: persists when available
- Resume analysis API → Shared browser logic: returns score and weak points
- Login page → Browser session state: stores user name and role
- Browser session state → Shared browser logic: supplies user display state
