# faizan-codes/text-summarizer-project architecture

> Architecture diagram of the GitHub repository faizan-codes/text-summarizer-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/faizan-codes/text-summarizer-project
- Repository: https://github.com/faizan-codes/text-summarizer-project

## Overview

##### Main Components

a) Data Layer:
- Data Ingestion Component
- Configuration Management (config.yaml, params.yaml)

b) Core Processing Layer:
- Text Summarizer Pipeline
- Component Manager
- Entity Management

c) Application Layer:
- FastAPI/Flask Application (app.py)
- Main Execution Module (main.py)

d) Infrastructure Layer:
- Docker Container
- GitHub Workflows (CI/CD)

**[Client/User Interface]**
- ↓
**[Web Application Layer (app.py)]**
- ↓
**[Pipeline Orchestration (main.py)]**
- ↓
**[Text Summarizer Components]**
- ↓
**[Data Management Layer]**

##### Component Relationships

- Rectangles: Core processing components
- Hexagons: Entry points (app.py, main.py)

##### Detailed Component Breakdown

a) Configuration Management (Yellow):
- [config.yaml] ←→ [params.yaml]
- ↓
- [Configuration Manager]

b) Pipeline Structure (Blue):
- [Pipeline Orchestrator]
- ↓
- [Stage 01: Data Ingestion] → [Future Stages]

c) Component Architecture (Green):
- [Component Manager]
- ↓
- [Data Ingestion Component] → [Utils] → [Logging]

##### Important Elements to Highlight

- Modular structure of the src/textSummarizer directory
- Pipeline stages (currently showing data_ingestion)
- Configuration flow from yaml files to components
- Logging and utility functions as supporting services

##### Technical Details

- Docker containerization boundary
- GitHub Actions workflow integration
- Python package structure
- Research notebook integration

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client
        UI[Client Interface]
    end

    subgraph "Application Layer"
        APP["Web Application"]:::entrypoint
        MAIN["Main Execution"]:::entrypoint
    end

    subgraph "Pipeline Layer"
        PIPE["Pipeline Orchestrator"]:::pipeline
        STAGE1["Data Ingestion Stage"]:::pipeline
        FUTURE["Future Stages"]:::pipeline
    end

    subgraph "Component Layer"
        COMP_MGR["Component Manager"]:::component
        DATA_ING["Data Ingestion Component"]:::component
        UTILS["Utility Functions"]:::utils
        LOG["Logging System"]:::utils
    end

    subgraph "Data & Config Layer"
        CONFIG["Configuration Manager"]:::config
        CONF_FILE["config.yaml"]:::config
        PARAMS["params.yaml"]:::config
        ENTITY["Entity Management"]:::data
    end

    subgraph "Infrastructure"
        DOCKER["Docker Container"]:::infra
        GITHUB["GitHub Actions CI/CD"]:::infra
        RESEARCH["Research Notebooks"]:::research
    end

    UI --> APP
    APP --> MAIN
    MAIN --> PIPE
    PIPE --> STAGE1
    STAGE1 --> FUTURE

    STAGE1 --> DATA_ING
    DATA_ING --> COMP_MGR
    COMP_MGR --> UTILS
    UTILS --> LOG

    DATA_ING --> ENTITY
    CONFIG --> DATA_ING
    CONF_FILE --> CONFIG
    PARAMS --> CONFIG

    RESEARCH -.-> PIPE
    DOCKER --> APP
    GITHUB --> DOCKER

    %% Click Events
    click APP "https://github.com/faizan-codes/Text-Summarizer-Project/blob/main/app.py"
    click MAIN "https://github.com/faizan-codes/Text-Summarizer-Project/blob/main/main.py"
    click DATA_ING "https://github.com/faizan-codes/Text-Summarizer-Project/blob/main/src/textSummarizer/components/data_ingestion.py"
    click CONF_FILE "https://github.com/faizan-codes/Text-Summarizer-Project/blob/main/config/config.yaml"
    click PARAMS "https://github.com/faizan-codes/Text-Summarizer-Project/blob/main/params.yaml"
    click CONFIG "https://github.com/faizan-codes/Text-Summarizer-Project/blob/main/src/textSummarizer/config/configuration.py"
    click STAGE1 "https://github.com/faizan-codes/Text-Summarizer-Project/blob/main/src/textSummarizer/pipeline/stage_01_data_ingestion.py"
    click ENTITY "https://github.com/faizan-codes/Text-Summarizer-Project/tree/main/src/textSummarizer/entity"
    click COMP_MGR "https://github.com/faizan-codes/Text-Summarizer-Project/tree/main/src/textSummarizer/components"
    click UTILS "https://github.com/faizan-codes/Text-Summarizer-Project/blob/main/src/textSummarizer/utils/common.py"
    click LOG "https://github.com/faizan-codes/Text-Summarizer-Project/tree/main/src/textSummarizer/logging"
    click DOCKER "https://github.com/faizan-codes/Text-Summarizer-Project/tree/main/Dockerfile"
    click GITHUB "https://github.com/faizan-codes/Text-Summarizer-Project/tree/main/.github/workflows"
    click RESEARCH "https://github.com/faizan-codes/Text-Summarizer-Project/tree/main/research"

    %% Styling
    classDef entrypoint fill:#ff6b6b,stroke:#333,stroke-width:2px
    classDef pipeline fill:#4ecdc4,stroke:#333,stroke-width:2px
    classDef component fill:#45b7d1,stroke:#333,stroke-width:2px
    classDef utils fill:#96ceb4,stroke:#333,stroke-width:2px
    classDef config fill:#ffeead,stroke:#333,stroke-width:2px
    classDef data fill:#d4a5a5,stroke:#333,stroke-width:2px
    classDef infra fill:#a9a9a9,stroke:#333,stroke-width:2px
    classDef research fill:#ffad60,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1["Entry Points"]:::entrypoint
        L2["Pipeline Components"]:::pipeline
        L3["Core Components"]:::component
        L4["Utility Functions"]:::utils
        L5["Configuration"]:::config
        L6["Data Management"]:::data
        L7["Infrastructure"]:::infra
        L8["Research"]:::research
    end
```
