# tienclay/uniscore architecture

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

- Interactive diagram: https://gitdiagram.com/tienclay/uniscore
- Repository: https://github.com/tienclay/uniscore

## Overview

##### Project Type and Purpose
- The repository isn’t a full-stack or microservices application but rather a curated set of algorithmic or data transformation challenges.
- The name “UniScore” might imply a unified scoring system or an academic/competitive programming exercise, but the file structure mostly highlights modular, independent programming tasks.

##### File Structure
- The top-level directories represent three separate “questions.”
- Question 1:
– Contains palindrome.cpp: a C++ source presumably tasked with checking palindromic sequences.
- Question 2:
– Contains twosum.cpp: a C++ source likely implementing an algorithm to find two numbers that add up to a target.
- Question 3:
– Contains several files: data.json, data_compressed.bin, data_decompressed.json, and two Python scripts (encode-json.py and decode-json.py), which together suggest a data encoding/decoding or compression task.
- There’s a single README file mentioning “UniScore” without additional context, so design decisions will rely on the file tree’s structure.

##### README for Additional Insights
- The README is minimal, only providing the project’s name. Therefore, the primary insights into purpose and structure come from the file tree.
- You need to deduce that each “Question” is self-contained with its own implementation language and workflow.

a. Main Components:
– Module for Question 1: Shows the palindrome.cpp implementation.
– Module for Question 2: Represents the two-sum algorithm in twosum.cpp.
– Module for Question 3: Has several subcomponents:
- Data Sources: data.json (original data input)
- Data Transformation Tools: encode-json.py to convert/encode JSON to a binary format (data_compressed.bin) and decode-json.py to revert the process, resulting in data_decompressed.json.
– (Optionally) a container that groups all these modules as part of the “UniScore” evaluation suite if that fits the intended higher-level overview.

b. Relationships and Interactions:
– The three question modules are independent; they do not interact with one another.
– For Question 3, illustrate a clear pipeline:
1. Input of raw JSON data (data.json)
2. Processing via encode-json.py produces a compressed binary file (data_compressed.bin)
3. Processing via decode-json.py on the compressed file results in a decompressed JSON file (data_decompressed.json)

c. Architectural Patterns and Design Principles:
– Even though the modules are standalone, the design follows a modular, task-specific approach.
– Question 3 exhibits a simple pipeline architecture: transformation stages from one format to another.
– Emphasize technology choices: C++ for computational/algo challenges (Questions 1 & 2) and Python for file/data manipulation (Question 3).

d. Relevant Technologies:
– Languages: C++ and Python.
– Data formats: JSON and binary.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "UniScore"
        subgraph "Question 1: Palindrome Checker (C++)"
            Q1["palindrome.cpp"]:::cpp
        end

        subgraph "Question 2: Two Sum Solver (C++)"
            Q2["twosum.cpp"]:::cpp
        end

        subgraph "Question 3: JSON Data Transformer (Python)"
            Q3_Input["data.json"]:::data
            Q3_Encode["encode-json.py"]:::python
            Q3_Compressed["data_compressed.bin"]:::data
            Q3_Decode["decode-json.py"]:::python
            Q3_Decompressed["data_decompressed.json"]:::data
        end
    end

    Q3_Input -->|"process"| Q3_Encode
    Q3_Encode -->|"produce"| Q3_Compressed
    Q3_Compressed -->|"read"| Q3_Decode
    Q3_Decode -->|"output"| Q3_Decompressed

    click Q1 "https://github.com/tienclay/uniscore/blob/main/Question 1/palindrome.cpp"
    click Q2 "https://github.com/tienclay/uniscore/blob/main/Question 2/twosum.cpp"
    click Q3_Input "https://github.com/tienclay/uniscore/blob/main/Question 3/data.json"
    click Q3_Encode "https://github.com/tienclay/uniscore/blob/main/Question 3/encode-json.py"
    click Q3_Compressed "https://github.com/tienclay/uniscore/blob/main/Question 3/data_compressed.bin"
    click Q3_Decode "https://github.com/tienclay/uniscore/blob/main/Question 3/decode-json.py"
    click Q3_Decompressed "https://github.com/tienclay/uniscore/blob/main/Question 3/data_decompressed.json"

    classDef cpp fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef python fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef data fill:#FFF68F,stroke:#333,stroke-width:2px;
```
