# rafab6n/conjuninja architecture

> Architecture diagram of the GitHub repository rafab6n/conjuninja, 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/rafab6n/conjuninja
- Repository: https://github.com/rafab6n/conjuninja

## Overview

##### Main Components Identification

The system appears to be a mobile application with these key components:

a. User Interface Layer
- Various component files (NextVerbButton, SubmitButton, VerbConjugationRow, VerbInfinitiveCard, VerbPracticeCard)

b. Data Layer
- Data files (verbs_dict.json, id_dict.json, jehle_verb_database.csv, jehle_verb_lookup.json)
- Data preparation pipeline (DataPrep.ipynb)

##### Architecture Representation

**┌─────────────────────────────────────────────────┐**
- UI Layer                       │
- ┌─────────────┐  ┌─────────────┐  ┌────────┐  │
- Practice   │  │ Conjugation │  │  Verb  │  │
- Card     │  │    Row      │  │ Cards  │  │
- ┘  └─────────────┘  └────────┘  │
- ▲            ▲              ▲         │
- ┼────────────┼──────────────┼─────────┘

**┌───────────┼────────────┼──────────────┼─────────┐**

- ┌─────────────────────────────────────────┐   │
- State Management             │   │
- (React Native / TypeScript)       │   │
- ┘   │
- ▲                                    │
- ┼────────────────────────────────────┘

**┌───────────┼────────────────────────────────────┐**
- ┌─────────────────────┐ ┌──────────────────┐  │
- Verb Database    │ │   Lookup Tables  │  │
- (JSON/CSV Files)   │ │  (JSON Files)    │  │
- ┘ └──────────────────┘  │
- Data Layer                        │
- ┘

##### Important Elements

a. Components:
- UI components from the Components directory
- Their relationships and hierarchy

b. Data Flow:
- How verb data flows from JSON/CSV files to the UI
- Data transformation process (DataPrep.ipynb)

c. Configuration:
- Presence of TypeScript (tsconfig.json)
- Build configuration (babel.config.js)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph UI_Layer
        direction TB
        PC["Practice Card"]:::ui
        CR["Conjugation Row"]:::ui
        VC["Verb Cards"]:::ui
        NC["Navigation Controls"]:::ui
    end

    subgraph Core
        direction TB
        MA["Main Application"]:::core
        SM["State Management"]:::core
        UF["Utility Functions"]:::util
        CN["Constants"]:::util
    end

    subgraph Data_Layer
        direction TB
        VD["Verb Database"]:::data
        LT["Lookup Tables"]:::data
        DP["Data Preparation"]:::data
        DI["Data Interface"]:::data
    end

    subgraph Config
        direction TB
        TS["TypeScript Config"]:::config
        BC["Build Config"]:::config
        AC["App Config"]:::config
    end

    %% Relationships
    PC --> SM
    CR --> SM
    VC --> SM
    NC --> SM

    SM --> DI
    DI --> VD
    DI --> LT
    DP --> VD
    DP --> LT

    MA --> SM
    SM --> UF
    SM --> CN

    MA --> TS
    MA --> BC
    MA --> AC

    %% Click Events
    click PC "https://github.com/RafaB6n/ConjuNinja/blob/main/Components/VerbPracticeCard.tsx"
    click CR "https://github.com/RafaB6n/ConjuNinja/blob/main/Components/VerbConjugationRow.tsx"
    click VC "https://github.com/RafaB6n/ConjuNinja/blob/main/Components/VerbInfinitiveCard.tsx"
    click NC "https://github.com/RafaB6n/ConjuNinja/blob/main/Components/NextVerbButton.tsx"
    click MA "https://github.com/RafaB6n/ConjuNinja/blob/main/App.tsx"
    click UF "https://github.com/RafaB6n/ConjuNinja/blob/main/utils.tsx"
    click CN "https://github.com/RafaB6n/ConjuNinja/blob/main/consts.ts"
    click VD "https://github.com/RafaB6n/ConjuNinja/blob/main/assets/jehle_verb_database.csv"
    click LT "https://github.com/RafaB6n/ConjuNinja/blob/main/assets/jehle_verb_lookup.json"
    click DP "https://github.com/RafaB6n/ConjuNinja/blob/main/assets/DataPrep.ipynb"
    click DI "https://github.com/RafaB6n/ConjuNinja/blob/main/assets/VerbData.tsx"
    click TS "https://github.com/RafaB6n/ConjuNinja/blob/main/tsconfig.json"
    click BC "https://github.com/RafaB6n/ConjuNinja/blob/main/babel.config.js"
    click AC "https://github.com/RafaB6n/ConjuNinja/blob/main/app.json"

    %% Styling
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#2ecc71,stroke:#27ae60,color:white
    classDef data fill:#f1c40f,stroke:#f39c12,color:black
    classDef util fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef config fill:#e74c3c,stroke:#c0392b,color:white

    %% Legend
    subgraph Legend
        UI[UI Components]:::ui
        CORE[Core Components]:::core
        DATA[Data Components]:::data
        UTIL[Utility Components]:::util
        CONF[Configuration]:::config
    end
```
