# jitinchekka/github-repo-analyzer architecture

> Architecture diagram of the GitHub repository jitinchekka/github-repo-analyzer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jitinchekka/github-repo-analyzer
- Repository: https://github.com/jitinchekka/github-repo-analyzer

## Overview

##### Main Components

a) External Services Layer:
- GitHub API (for fetching repository data)
- OpenAI API (for GPT-3.5-turbo)
- FAISS Vector Store
- Activeloop (mentioned in environment setup)

b) Application Layer:
- Streamlit Web Interface
- Core Analysis Engine
- Configuration Management

c) Data Processing Layer:
- Repository Data Collection
- Analysis Pipeline
- Scoring System

**┌─ User Interface Layer ─┐**
- (Streamlit)       │
- ┬───────────┘
- ↓
**┌─ Core Application ────┐**
- Main Analyzer      │
- Utils              │
- Config Management  │
- ┬───────────┘
- ↓
**┌─ External Services ───┐**
- GitHub API         │
- OpenAI API        │
- FAISS             │
- Activeloop        │
- ┘

##### Component Relationships

- User → Streamlit Interface
- Streamlit → Main Analyzer
- Main Analyzer → GitHub API
- Main Analyzer → OpenAI API
- Main Analyzer → FAISS
- Config Management → All Components

##### Key Processes to Highlight

**Repository Fetch → Data Processing → GPT Analysis → FAISS Vector Storage → Scoring → Results**

##### Important Details

- A note about the environment configuration requirements
- Data flow for repository analysis
- Where the configuration management (utils/config.py) interfaces with other components
- Entry point (main.py)
- Where the repo_data.csv is generated and used

##### Technical Specifications

- Python 3.9+
- LangChain integration points
- GPT-3.5-turbo model specification
- FAISS vector store implementation

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#2ecc71,stroke:#27ae60,color:white
    classDef external fill:#e67e22,stroke:#d35400,color:white
    classDef storage fill:#9b59b6,stroke:#8e44ad,color:white
    classDef config fill:#95a5a6,stroke:#7f8c8d,color:white

    %% User Interface Layer
    subgraph UI
        User(("User"))
        StreamlitUI["Streamlit Web Interface"]:::ui
    end

    %% Core Application Layer
    subgraph CoreApp
        MainAnalyzer["Main Analyzer"]:::core
        ConfigMgmt["Configuration Management"]:::config
        Utils["Utility Components"]:::core
        Constants["System Constants"]:::core
    end

    %% Data Processing Layer
    subgraph Processing
        RepoCollector["Repository Data Collection"]:::core
        AnalysisPipeline["Analysis Pipeline"]:::core
        ScoringSystem["Scoring System"]:::core
    end

    %% External Services Layer
    subgraph External
        GitHubAPI["GitHub API"]:::external
        OpenAIAPI["OpenAI GPT-3.5"]:::external
        FAISS["FAISS Vector Store"]:::external
        Activeloop["Activeloop"]:::external
    end

    %% Data Storage
    RepoData[("repo_data.csv")]:::storage

    %% Relationships
    User --> StreamlitUI
    StreamlitUI --> MainAnalyzer
    MainAnalyzer --> RepoCollector
    RepoCollector --> GitHubAPI
    RepoCollector --> RepoData
    MainAnalyzer --> AnalysisPipeline
    AnalysisPipeline --> OpenAIAPI
    AnalysisPipeline --> FAISS
    AnalysisPipeline --> Activeloop
    AnalysisPipeline --> ScoringSystem
    ConfigMgmt --> MainAnalyzer
    ConfigMgmt --> RepoCollector
    ConfigMgmt --> AnalysisPipeline
    Utils --> MainAnalyzer
    Constants --> MainAnalyzer
    ScoringSystem --> RepoData

    %% Click Events
    click MainAnalyzer "https://github.com/jitinchekka/github-repo-analyzer/blob/main/main.py"
    click ConfigMgmt "https://github.com/jitinchekka/github-repo-analyzer/blob/main/utils/config.py"
    click Constants "https://github.com/jitinchekka/github-repo-analyzer/blob/main/utils/constants.py"
    click RepoData "https://github.com/jitinchekka/github-repo-analyzer/blob/main/repo_data.csv"
    click Utils "https://github.com/jitinchekka/github-repo-analyzer/tree/main/utils/"

    %% Legend
    subgraph Legend
        UI_Legend["User Interface"]:::ui
        Core_Legend["Core Components"]:::core
        External_Legend["External Services"]:::external
        Storage_Legend["Data Storage"]:::storage
        Config_Legend["Configuration"]:::config
    end
```
