# lbzutp/ts6c3-2024-2 architecture

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

- Interactive diagram: https://gitdiagram.com/lbzutp/ts6c3-2024-2
- Repository: https://github.com/lbzutp/ts6c3-2024-2

## Overview

##### Main Components
- Practica1 Application: Since practica1 contains the core files (App.js, components directory, and other configuration files), mark this as the “Main Application.”
- UI Components: Under practica1/components, these components (such as Contador and ListaContador) form building blocks of the app. Also include the other exercises detailed in the README (e.g., Greeting, UserDetails, Task, ToggleText, DynamicForm, ClickCounter, RegistrationForm, ThemeSwitcher, AlertButton, ParentCounter, ChildCounter, ImageGallery, ImageList, Game and GuessForm) even if their implementation might be evolved in the project.
- Component Examples: The ejemplosComponentes folder should be treated as a library of sample components (for ActivityIndicator, Button, Modal, etc.) which can be used to illustrate different UI paradigms.
- Expo/React Native Framework: Given that the project is started using npx expo start, include the React Native environment with Expo as an underlying platform layer for development and deployment.
- Dependencies and Configurations: Including babel.config.js and package.json, these show integration with ES6 syntax, npm dependencies, and the bundler’s configuration.

##### Relationships and Interactions
- The Main Application (practica1/App.js) acts as an orchestrator that uses various UI components (from practica1/components and also possibly inspired by the examples).
- There is an implied execution flow during startup: Expo manages the application launch and establishes a rendering pipeline for React Native components.

##### Architectural Patterns and Design Principles
- Component Driven Design: The project’s architecture is based on breaking the UI into reusable components.
- Unidirectional Data Flow: Emphasize the hierarchical flow of data (via props) from parent to child, matching the React paradigm.
- Separation of Concerns: Display the delineation between the primary demo application (practica1), component libraries (ejemplosComponentes), and configuration/dependency files.
- Modular Structure: Each component handles its own state or accepts props, supporting a modular and extensible design.

##### Incorporate Relevant Technologies and Frameworks
- React Native: The primary framework for building the mobile application's UI.
- Expo: Highlight how expo manages the development lifecycle, testing, and deployment.
- JavaScript (ES6+): Underlie the language features and coding style used throughout the project.
- npm (and package-lock.json): Emphasize dependency management and project configuration.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Platform Layer
    subgraph "Platform Layer"
        EXPO["Expo/React Native Environment"]:::expo
        CONFIG["Configuration & Dependencies"]:::config
        APPJSON["app.json"]:::config
        BABEL["babel.config.js"]:::config
        PACKAGE["package.json"]:::config
        PACKAGELOCK["package-lock.json"]:::config
        EXPO -->|"provides"| CONFIG
        CONFIG -->|"contains"| APPJSON
        CONFIG -->|"contains"| BABEL
        CONFIG -->|"contains"| PACKAGE
        CONFIG -->|"contains"| PACKAGELOCK
    end

    %% Main Application Layer
    subgraph "Main Application Layer"
        APP["App.js – Main Entry"]:::main
        CODE["Counter Logic (codigoContador)"]:::main
        APP -->|"uses"| CODE
    end

    %% UI Components Layer
    subgraph "UI Components"
        CONTADOR["Contador Component"]:::ui
        LISTACONTADOR["ListaContador Component"]:::ui
        GREETING["Greeting Component"]:::ui
        USERDETAILS["UserDetails Component"]:::ui
        TASK["Task Component"]:::ui
        TOGGLETEXT["ToggleText Component"]:::ui
        DYNAMICFORM["DynamicForm Component"]:::ui
        CLICKCOUNTER["ClickCounter Component"]:::ui
        REGISTRATION["RegistrationForm Component"]:::ui
        THEMESWITCHER["ThemeSwitcher Component"]:::ui
        ALERTBUTTON["AlertButton Component"]:::ui
        PARENTCOUNTER["ParentCounter Component"]:::ui
        CHILDCOUNTER["ChildCounter Component"]:::ui
        IMAGEGALLERY["ImageGallery Component"]:::ui
        IMAGELIST["ImageList Component"]:::ui
        GAME["Game Component"]:::ui
        GUESSFORM["GuessForm Component"]:::ui

        APP -->|"renders"| CONTADOR
        APP -->|"renders"| LISTACONTADOR
        APP -->|"renders"| GREETING
        APP -->|"renders"| USERDETAILS
        APP -->|"renders"| TASK
        APP -->|"renders"| TOGGLETEXT
        APP -->|"renders"| DYNAMICFORM
        APP -->|"renders"| CLICKCOUNTER
        APP -->|"renders"| REGISTRATION
        APP -->|"renders"| THEMESWITCHER
        APP -->|"renders"| ALERTBUTTON
        APP -->|"renders"| PARENTCOUNTER
        PARENTCOUNTER -->|"passesState"| CHILDCOUNTER
        APP -->|"renders"| IMAGEGALLERY
        APP -->|"renders"| IMAGELIST
        APP -->|"renders"| GAME
        APP -->|"renders"| GUESSFORM
    end

    %% Component Library Layer
    subgraph "Component Library"
        LIB["Component Examples Library"]:::lib
    end

    %% Relationships
    EXPO ---|"initializes"| APP
    APP ---|"can use"| LIB

    %% Click Events
    click APP "https://github.com/lbzutp/ts6c3-2024-2/blob/main/practica1/App.js"
    click CONTADOR "https://github.com/lbzutp/ts6c3-2024-2/blob/main/practica1/components/Contador.js"
    click LISTACONTADOR "https://github.com/lbzutp/ts6c3-2024-2/blob/main/practica1/components/ListaContador.js"
    click CODE "https://github.com/lbzutp/ts6c3-2024-2/blob/main/practica1/codigoContador.js"
    click LIB "https://github.com/lbzutp/ts6c3-2024-2/tree/main/ejemplosComponentes"
    click APPJSON "https://github.com/lbzutp/ts6c3-2024-2/blob/main/practica1/app.json"
    click BABEL "https://github.com/lbzutp/ts6c3-2024-2/blob/main/practica1/babel.config.js"
    click PACKAGE "https://github.com/lbzutp/ts6c3-2024-2/blob/main/practica1/package.json"
    click PACKAGELOCK "https://github.com/lbzutp/ts6c3-2024-2/blob/main/practica1/package-lock.json"

    %% Styles
    classDef expo fill:#FFD700,stroke:#333,stroke-width:2px;
    classDef main fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef ui fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef lib fill:#FFB6C1,stroke:#333,stroke-width:2px;
    classDef config fill:#FFA07A,stroke:#333,stroke-width:2px;
```
