# tejahereppl/jee_qpaper_generator architecture

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

- Interactive diagram: https://gitdiagram.com/tejahereppl/jee_qpaper_generator
- Repository: https://github.com/tejahereppl/jee_qpaper_generator

## Overview

##### Project Type & Purpose
- The README clearly states that this is a “JEE Model Question Paper Generator” – a tool built to help students generate customized examination papers based on subject and topic.
- The tool follows an agent–task architectural pattern, meaning that different agents (each possibly handling question selection, validation, formatting, etc.) are orchestrated through defined tasks.
- Although the project directory is under “src/instagram”, despite the naming, the README confirms that the primary objective is to generate exam papers.

##### Analyzing the File Structure
- Top-Level Files: The presence of configuration files (pyproject.toml, .gitignore, .vscode) and README hints at a Python project that likely uses modern packaging practices.
- main.py: The main entry point that likely ties together the overall processing.
- crew.py: Possibly a coordinator that manages or registers agents.
- test_vertex_ai.py: Likely for integration tests with external services such as Vertex AI.
- The “config” folder contains YAML files (agents.yaml and tasks.yaml). These files outline the definitions for agent roles and the steps (tasks) they perform.

##### Key Architectural Components
a. Input/Interface Module:
- Although not explicitly a GUI or web interface, the entry point (main.py) would accept user inputs such as subject and topic.
b. Core Orchestration/Processing Engine:
- The Main Module (main.py) and possibly crew.py act as the orchestrators of the exam paper generation. They take user inputs and coordinate processing.
c. Agent Components:
d. Task Module:
- Derived from tasks.yaml, this component outlines the sequential or parallel steps implemented by the agents. It should be represented as an orchestrated workflow that defines how agents interact.
e. Utility/Tools Components:
f. External Services Integration:
g. Configuration Module:
- The YAML files (agents.yaml and tasks.yaml) should be represented as part of the configuration layer that feeds into the entire agent-task mechanism.

##### Relationships & Data Flow
- That agents interact with the “Custom Tools” and potential “External Services” (Vertex AI) for specialized tasks.
- The configuration (YAML files) can be shown as feeding into the orchestrator and the agents, ensuring that design patterns (modular, configurable, and extensible) are clearly communicated.

##### Architectural Patterns & Technologies
- Agent–task architecture as the core design principle.
- Clear separation of concerns:
- The separation between configuration (YAML) and execution (Python modules).
- Distinct areas for input handling, orchestrated logic, processing agents, and external tools or integrations.
- Mention that this design allows for modular updates and easy scalability (agents and tasks can be updated independently).

## Diagram (Mermaid)

```mermaid
graph TD
    %% Presentation/Interface Layer
    subgraph "Presentation/Interface Layer"
        UI["User Input/Main Entry (main.py)"]:::presentation
    end

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        Orch["Core Orchestrator (crew.py)"]:::logic
        Agents["Agents Module (agents.yaml)"]:::logic
        Tasks["Task Workflow (tasks.yaml)"]:::logic
    end

    %% Integration & Utility Layer
    subgraph "Integration & Utility Layer"
        CustomTool["Custom Tool (custom_tool.py)"]:::utility
        CustomVertex["Custom Vertex Tool (custom_vertex_tool.py)"]:::utility
        OSCode["OS Codes/Utility Modules"]:::utility
        External["External Service Integration (Vertex AI)"]:::external
    end

    %% Connections - Data Flow
    UI -->|"sends_input"| Orch
    Orch -->|"loads_agents"| Agents
    Orch -->|"loads_tasks"| Tasks
    Agents -->|"uses_tool"| CustomTool
    Agents -->|"utilizes_OS"| OSCode
    Tasks -->|"uses_vertex_tool"| CustomVertex
    Orch -->|"integrates_with"| External

    %% Click Events
    click UI "https://github.com/tejahereppl/jee_qpaper_generator/blob/main/src/instagram/main.py"
    click Orch "https://github.com/tejahereppl/jee_qpaper_generator/blob/main/src/instagram/crew.py"
    click Agents "https://github.com/tejahereppl/jee_qpaper_generator/blob/main/src/instagram/config/agents.yaml"
    click Tasks "https://github.com/tejahereppl/jee_qpaper_generator/blob/main/src/instagram/config/tasks.yaml"
    click External "https://github.com/tejahereppl/jee_qpaper_generator/blob/main/src/instagram/test_vertex_ai.py"
    click CustomTool "https://github.com/tejahereppl/jee_qpaper_generator/blob/main/src/instagram/tools/custom_tool.py"
    click CustomVertex "https://github.com/tejahereppl/jee_qpaper_generator/blob/main/src/instagram/tools/custom_vertex_tool.py"
    click OSCode "https://github.com/tejahereppl/jee_qpaper_generator/tree/main/src/instagram/tools/Os_codes"

    %% Styles
    classDef presentation fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef logic fill:#FAD7A0,stroke:#D68910,stroke-width:2px;
    classDef utility fill:#A9DFBF,stroke:#27AE60,stroke-width:2px;
    classDef external fill:#D2B4DE,stroke:#8E44AD,stroke-width:2px;
```
