# sonmezahmet/zoom-poll-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/sonmezahmet/zoom-poll-analyzer
- Repository: https://github.com/sonmezahmet/zoom-poll-analyzer

## Overview

##### Project Type and Purpose
- This project is a Python-based application built as a course project (CSE3063 OOSD Fall 2020). Its main purpose is to analyze, convert, and generate reports and charts from polling data, answer keys, and student lists (all provided in formats such as XLS and TXT).
- The project appears to automate the processing of classroom data (polls, attendance, and various evaluation artifacts) and produce outputs (CSV, XLS, PDF charts) to help analyze student performance or participation.

##### Analyzing the File Structure
- At the root, you see multiple Python modules (e.g., Analyzer.py, GUI.py, PollAnalyzer.py, PollReport.py, etc.) which indicate that the business logic is broken into several components.
- The existence of files like Config.py and config.json suggests that configuration management is a separate component.
- There are dedicated directories:
- “answerKeys” and “answerKeys_txt” for source answer data.
- “artifacts” containing design and documentation files from iterations (these show the evolution of the design).
- “outputs” with subdirectories for anomalies, attendance charts/reports, and poll reports which show that the system generates various output artifacts.
- “pollReports” and “studentList” directories house raw CSV and XLS data that likely feed into the analysis.
- The file names themselves (AnswerKeyConverter, PollAnalyzer, etc.) suggest a modular design where each module has a distinct responsibility (data ingestion, analysis, conversion, and reporting).

##### Extracting Details from the README
- The README is minimal and primarily identifies the project as a group project for an Object Oriented Software Development course. This informs the design by implying that object-oriented principles (such as modularization and separation of concerns) are used.

##### Components
a. Main Entry and Configuration:
- “main.py” should be shown as the starting point. It likely handles initialization, reading config.json (managed by Config.py), and orchestrating the workflow.
b. Data Ingestion and Pre-processing:
- Modules and directories that read input files: “answerKeys”, “answerKeys_txt”, “pollReports”, and “studentList”.
- AnswerKey.py and AnswerKeyConverter.py as components converting raw answer data into structured formats.
c. Domain Model and Business Logic:
- Domain objects such as Student (Student.py), Question (Question.py), and Poll (Poll.py), which encapsulate the core business entities.
- Analysis components: Analyzer.py, PollAnalyzer.py, PollOutput.py, PollReport.py, and PollReportRow.py. These implement the business logic for processing polling data and computing reports.
d. User Interface:
- GUI.py module as the user interface layer, which might allow users to interact with the application (e.g., selecting files, triggering report generation).
e. Output Generation:
- Outputs component, representing the subdirectories that contain the generated CSV, PDF, and XLS files (outputs/anomalies, outputs/attendanceCharts, outputs/charts, etc.). This reflects the reporting and visualization part of the system.

##### Architectural Relationships and Data Flow
- Next, channel input data from file directories (answerKeys, pollReports, studentList) into the ingestion modules (AnswerKey, AnswerKeyConverter, etc.).
- That the processed data flows into the reporting modules (PollReport, PollOutput, PollReportRow) that generate structured reports.
- Finally, indicate that these outputs are written to the “outputs” directories (and similar for charts and attendance reports).
- That the GUI interacts with the core layer to both trigger processes and possibly display results, forming a feedback loop.

##### Design Principles and Patterns
- Separation of concerns:
- Input/Output is separated from the processing logic.
- The design follows an object-oriented approach, as encouraged by the course.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Main Entry and Configuration"
        main("main.py"):::entry
        subgraph "Configuration Manager"
            cfg("Config.py"):::config
            cfgjson("config.json"):::config
        end
    end

    subgraph "Data Ingestion and Pre-processing"
        ak("AnswerKey.py"):::ingest
        akc("AnswerKeyConverter.py"):::ingest
        akDir("answerKeys (dir)"):::ingest
        ak_txt("answerKeys_txt (dir)"):::ingest
        pr("pollReports (dir)"):::ingest
        sl("studentList (dir)"):::ingest
    end

    subgraph "Domain Model and Business Logic"
        student("Student.py"):::domain
        question("Question.py"):::domain
        poll("Poll.py"):::domain
        analyzer("Analyzer.py"):::analysis
        pollan("PollAnalyzer.py"):::analysis
        polloutput("PollOutput.py"):::report
        pollreport("PollReport.py"):::report
        pollreportrow("PollReportRow.py"):::report
    end

    subgraph "User Interface"
        gui("GUI.py"):::ui
    end

    subgraph "Output Generation"
        outputs("outputs (dir)"):::output
    end

    %% Connections: Main Entry and Config
    main -->|"reads"| cfg
    cfg -->|"loads"| cfgjson

    %% Connections: Ingestion triggered by configuration
    cfgjson -->|"initiates_ingestion"| ak
    cfgjson -->|"initiates_ingestion"| akc
    cfgjson -->|"initiates_ingestion"| akDir
    cfgjson -->|"initiates_ingestion"| ak_txt
    cfgjson -->|"initiates_ingestion"| pr
    cfgjson -->|"initiates_ingestion"| sl

    %% Connections: Data Ingestion to Analysis
    ak -->|"data_conversion"| analyzer
    akc -->|"data_conversion"| analyzer
    akDir -->|"raw_answer_data"| analyzer
    ak_txt -->|"raw_answer_data"| analyzer
    pr -->|"poll_data"| pollan
    sl -->|"student_data"| pollan

    %% Connections: Domain Model Processing
    analyzer -->|"processes"| student
    analyzer -->|"processes"| question
    pollan -->|"processes"| poll

    %% Reporting Chain
    analyzer -->|"generates"| polloutput
    pollan -->|"generates"| polloutput
    polloutput -->|"formats"| pollreport
    pollreport -->|"structures"| pollreportrow
    pollreportrow -->|"writes_report"| outputs

    %% GUI Interactions
    main -->|"initializes"| gui
    gui -->|"triggers_process"| analyzer
    analyzer -->|"results_to_UI"| gui

    %% Styles
    classDef entry fill:#ADD8E6,stroke:#000,stroke-width:1px;
    classDef config fill:#FFFFCC,stroke:#000,stroke-width:1px;
    classDef ingest fill:#FFC0CB,stroke:#000,stroke-width:1px;
    classDef domain fill:#90EE90,stroke:#000,stroke-width:1px;
    classDef analysis fill:#98FB98,stroke:#000,stroke-width:1px;
    classDef report fill:#FFA500,stroke:#000,stroke-width:1px;
    classDef ui fill:#DDA0DD,stroke:#000,stroke-width:1px;
    classDef output fill:#D3D3D3,stroke:#000,stroke-width:1px;

    %% Click Events
    click main "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/main.py"
    click cfg "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/Config.py"
    click cfgjson "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/config.json"
    click ak "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/AnswerKey.py"
    click akc "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/AnswerKeyConverter.py"
    click akDir "https://github.com/sonmezahmet/zoom-poll-analyzer/tree/main/answerKeys"
    click ak_txt "https://github.com/sonmezahmet/zoom-poll-analyzer/tree/main/answerKeys_txt"
    click pr "https://github.com/sonmezahmet/zoom-poll-analyzer/tree/main/pollReports"
    click sl "https://github.com/sonmezahmet/zoom-poll-analyzer/tree/main/studentList"
    click student "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/Student.py"
    click question "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/Question.py"
    click poll "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/Poll.py"
    click analyzer "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/Analyzer.py"
    click pollan "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/PollAnalyzer.py"
    click polloutput "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/PollOutput.py"
    click pollreport "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/PollReport.py"
    click pollreportrow "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/PollReportRow.py"
    click gui "https://github.com/sonmezahmet/zoom-poll-analyzer/blob/main/GUI.py"
    click outputs "https://github.com/sonmezahmet/zoom-poll-analyzer/tree/main/outputs"
```
