# ushasreddy060626/profile-based-matching-algorithm architecture

> Architecture diagram of the GitHub repository ushasreddy060626/profile-based-matching-algorithm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ushasreddy060626/profile-based-matching-algorithm
- Repository: https://github.com/ushasreddy060626/profile-based-matching-algorithm

## Overview

This is a Streamlit profile-recommendation application. A user supplies or selects a profile; the app scores candidate profiles using text, MBTI, and location signals, ranks the top five, and presents explanations. Accept/reject feedback personalizes weights and triggers updated rankings. The README also describes analysis, CSV export, and performance reporting. The graph reflects those documented capabilities, but the app excerpt omits much of its control flow, so some relationships are documented rather than source-verified.

Main entry points: [`matching.py`](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/matching.py) (Match engine), [`app.py`](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py) (Streamlit app), [`analysis.py`](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/analysis.py) (Offline evaluation), [`generate_data.py`](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/generate_data.py) (Synthetic data generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Application"]
  node_app["Streamlit app<br/>[app.py]"]
  node_recommendations["Top matches<br/>[app.py]"]
  node_explanations["Match explanations<br/>[app.py]"]
  node_feedback_ui["Accept or reject<br/>[app.py]"]
  node_dashboard["Performance dashboard<br/>[app.py]"]
  node_csv_export["CSV export<br/>[app.py]"]
end

subgraph group_matching["Matching"]
  node_match_engine["Match engine<br/>[matching.py]"]
  node_text_score["Text similarity<br/>[matching.py]"]
  node_mbti_score["MBTI compatibility<br/>[matching.py]"]
  node_location_score["Location score<br/>[matching.py]"]
end

subgraph group_learning["Personalization"]
  node_weight_learning["Weight learning<br/>[matching.py]"]
end

subgraph group_data["Data and evaluation"]
  node_candidate_profiles[("Candidate profiles<br/>[users.csv]")]
  node_feedback_log[("Feedback log<br/>[feedback.csv]")]
  node_data_generation["Synthetic data generation<br/>[generate_data.py]"]
  node_data_cleaning["Data cleaning<br/>[data_pipeline.py]"]
  node_analysis["Offline evaluation<br/>[analysis.py]"]
end

node_user(("Profile seeker"))

node_user -->|"provides profile"| node_app
node_app -.->|"loads profiles"| node_candidate_profiles
node_app -->|"requests matching"| node_match_engine
node_match_engine -->|"calculates"| node_text_score
node_match_engine -->|"calculates"| node_mbti_score
node_match_engine -->|"calculates"| node_location_score
node_match_engine -->|"reads profiles"| node_candidate_profiles
node_match_engine -->|"trains weights"| node_weight_learning
node_app -->|"ranks candidates"| node_recommendations
node_recommendations -->|"shows score breakdown"| node_explanations
node_user -->|"rates matches"| node_feedback_ui
node_feedback_ui -.->|"records feedback"| node_feedback_log
node_feedback_ui -->|"updates preferences"| node_weight_learning
node_weight_learning -->|"reranks matches"| node_recommendations
node_app -->|"presents analysis"| node_dashboard
node_recommendations -->|"exports results"| node_csv_export
node_data_generation -->|"uses feature engine"| node_match_engine
node_data_cleaning -->|"uses MBTI rules"| node_match_engine
node_analysis -->|"evaluates matching"| node_match_engine
node_analysis -->|"uses simulated preferences"| node_data_generation
node_analysis -->|"reads feedback"| node_feedback_log

click node_app "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py"
click node_candidate_profiles "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/users.csv"
click node_feedback_log "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/feedback.csv"
click node_match_engine "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/matching.py"
click node_text_score "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/matching.py"
click node_mbti_score "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/matching.py"
click node_location_score "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/matching.py"
click node_weight_learning "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/matching.py"
click node_recommendations "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py"
click node_explanations "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py"
click node_feedback_ui "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py"
click node_dashboard "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py"
click node_csv_export "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py"
click node_data_generation "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/generate_data.py"
click node_data_cleaning "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/data_pipeline.py"
click node_analysis "https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/analysis.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_app,node_recommendations,node_explanations,node_feedback_ui,node_dashboard,node_csv_export toneBlue
class node_match_engine,node_text_score,node_mbti_score,node_location_score toneAmber
class node_weight_learning toneMint
class node_candidate_profiles,node_feedback_log,node_data_generation,node_data_cleaning,node_analysis toneRose
class node_user toneIndigo
```

## Components

### Application

- [Streamlit app](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py): `app.py`
- [Top matches](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py): `app.py`
- [Match explanations](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py): `app.py`
- [Accept or reject](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py): `app.py`
- [Performance dashboard](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py): `app.py`
- [CSV export](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/app.py): `app.py`

### Matching

- [Match engine](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/matching.py): `matching.py`
- [Text similarity](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/matching.py): `matching.py`
- [MBTI compatibility](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/matching.py): `matching.py`
- [Location score](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/matching.py): `matching.py`

### Personalization

- [Weight learning](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/matching.py): `matching.py`

### Data and evaluation

- [Candidate profiles](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/users.csv): `users.csv`
- [Feedback log](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/feedback.csv): `feedback.csv`
- [Synthetic data generation](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/generate_data.py): `generate_data.py`
- [Data cleaning](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/data_pipeline.py): `data_pipeline.py`
- [Offline evaluation](https://github.com/ushasreddy060626/profile-based-matching-algorithm/blob/main/analysis.py): `analysis.py`

### Other components

- **Profile seeker**

## Connections

- Profile seeker → Streamlit app: provides profile (evidence: `README.md`)
- Streamlit app → Candidate profiles: loads profiles
- Streamlit app → Match engine: requests matching (evidence: `app.py`)
- Match engine → Text similarity: calculates (evidence: `matching.py`)
- Match engine → MBTI compatibility: calculates (evidence: `matching.py`)
- Match engine → Location score: calculates (evidence: `matching.py`)
- Match engine → Candidate profiles: reads profiles (evidence: `matching.py`)
- Match engine → Weight learning: trains weights (evidence: `matching.py`)
- Streamlit app → Top matches: ranks candidates (evidence: `app.py`)
- Top matches → Match explanations: shows score breakdown (evidence: `README.md`)
- Profile seeker → Accept or reject: rates matches (evidence: `README.md`)
- Accept or reject → Feedback log: records feedback
- Accept or reject → Weight learning: updates preferences (evidence: `README.md`)
- Weight learning → Top matches: reranks matches (evidence: `README.md`)
- Streamlit app → Performance dashboard: presents analysis (evidence: `README.md`)
- Top matches → CSV export: exports results (evidence: `README.md`)
- Synthetic data generation → Match engine: uses feature engine (evidence: `generate_data.py`)
- Data cleaning → Match engine: uses MBTI rules (evidence: `data_pipeline.py`)
- Offline evaluation → Match engine: evaluates matching (evidence: `analysis.py`)
- Offline evaluation → Synthetic data generation: uses simulated preferences (evidence: `analysis.py`)
- Offline evaluation → Feedback log: reads feedback (evidence: `analysis.py`)
