# desapp-2024c2-grupo-3/gestion-convocatorias-frontend architecture

> Architecture diagram of the GitHub repository desapp-2024c2-grupo-3/gestion-convocatorias-frontend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend
- Repository: https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend

## Overview

This project is a frontend template built with React and Vite, designed for educational purposes by the Universidad Nacional de Hurlingham. It comes with built‐in integrations for Material UI, Redux (demonstrated in one of the components), React Router, and Axios. The purpose of the project is to serve as a starting point for building React-based front-end applications, where developers can incrementally add functionality while gradually removing the example code.

##### Main Components

- Entry Point & Build System:
- index.html (serves as the HTML shell)
- main.jsx (bootstraps the React app using Vite as the builder)

- Core Application Components:
- App.jsx – The main container of the application.
- AppRouter.jsx – Handles navigation using React Router.

- Pages:
- ActorsPage.jsx, FilmsPage.jsx, FilmsPageReduxStyle.jsx – Represent different parts of the UI (screen components) with example functionalities.

- UI Components:
- TopMenu.jsx, AddFilmDialog.jsx, WeatherIndicator.jsx – Reusable UI components for navigation, dialogs, and additional indicators.

- Configuration:
- The configuration folder (config) containing config.js and customMuiTheme.js – These files help customize the application behavior and UI theme (Material UI).

- Services:
- Service files (ActorsService.js, FilmService.js, WeatherService.js) – Act as API-call helpers (using Axios) to fetch or interact with data.

- State Management:
- Redux store (store.js) and the film slice (filmSlice.js) – Provide global state management for the application.

##### Relationships and Interactions

- The index.html is the static entry point that loads the bundled JavaScript.
- main.jsx initializes and renders the App component.
- App.jsx integrates with AppRouter.jsx to manage route-based rendering using React Router.
- Each route in the AppRouter links to one of the pages (ActorsPage, FilmsPage, etc.).
- The pages use UI components (like TopMenu, AddFilmDialog and WeatherIndicator) to build the interactive interface.
- The configuration files set the theme for UI elements (via Material UI) and general configs.
- The service layer (ActorsService, FilmService, WeatherService) is used by pages/components to communicate with external API endpoints.
- Redux (with its filmSlice and store files) is integrated within the React components to manage and propagate state changes, especially highlighted in FilmsPageReduxStyle.jsx.

##### Architectural Patterns & Design Principles

- Component-Based Architecture: Separation of concerns through modular React components.
- Configuration Management: Dedicated folder for theming and application-level settings.
- Service Abstraction: Isolating API calls into separate service files facilitates easy modifications and testing.

##### Technologies and Libraries

- Vite for fast development and bundling.
- React for building UI components.
- Material UI for theming and styled components.
- Redux for global state management.
- React Router for handling route-based UI navigation.
- Axios (implied in the services) for HTTP requests.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Entry Point & Build System
    subgraph "Entry Point & Build System"
        EP1["index.html"]:::entry
        EP2["main.jsx"]:::entry
    end

    %% Core Application Components
    subgraph "Core Application Components"
        CORE1["App.jsx"]:::core
        CORE2["AppRouter.jsx"]:::core
    end

    %% Pages
    subgraph "Pages"
        P1["ActorsPage.jsx"]:::page
        P2["FilmsPage.jsx"]:::page
        P3["FilmsPageReduxStyle.jsx"]:::page
    end

    %% UI Components
    subgraph "UI Components"
        UI1["TopMenu.jsx"]:::ui
        UI2["AddFilmDialog.jsx"]:::ui
        UI3["WeatherIndicator.jsx"]:::ui
    end

    %% Configuration
    subgraph "Configuration"
        CFG1["config.js"]:::config
        CFG2["customMuiTheme.js"]:::config
    end

    %% Services
    subgraph "Services"
        SVC1["ActorsService.js"]:::service
        SVC2["FilmService.js"]:::service
        SVC3["WeatherService.js"]:::service
    end

    %% State Management
    subgraph "State Management"
        ST1["store.js"]:::state
        ST2["filmSlice.js"]:::state
    end

    %% Connections - Entry Flow
    EP1 -->|"loads"| EP2
    EP2 -->|"bootstraps"| CORE1
    CORE1 -->|"integrates with"| CORE2

    %% Routing to Pages
    CORE2 -->|"routes to"| P1
    CORE2 -->|"routes to"| P2
    CORE2 -->|"routes to"| P3

    %% Pages using UI Components
    P1 -->|"renders"| UI1
    P1 -->|"renders"| UI2
    P1 -->|"renders"| UI3

    P2 -->|"renders"| UI1
    P2 -->|"renders"| UI2
    P2 -->|"renders"| UI3

    P3 -->|"renders"| UI1
    P3 -->|"renders"| UI2
    P3 -->|"renders"| UI3

    %% Pages communicating with Services
    P1 -->|"calls"| SVC1
    P2 -->|"calls"| SVC2
    P3 -->|"calls"| SVC2
    P1 -->|"may call"| SVC3
    P2 -->|"may call"| SVC3
    P3 -->|"may call"| SVC3

    %% UI Components interacting with State Management
    UI1 -->|"updates"| ST1
    UI2 -->|"updates"| ST1
    UI3 -->|"updates"| ST1
    P3 -->|"integrates Redux via"| ST2

    %% Configuration influencing UI Components
    CFG1 -->|"configures"| UI1
    CFG2 -->|"themes"| UI1
    CFG1 -->|"configures"| UI2
    CFG2 -->|"themes"| UI2
    CFG1 -->|"configures"| UI3
    CFG2 -->|"themes"| UI3

    %% Click Events
    click EP1 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//index.html"
    click EP2 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/main.jsx"
    click CORE1 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/App.jsx"
    click CORE2 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/AppRouter.jsx"
    click P1 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/pages/ActorsPage.jsx"
    click P2 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/pages/FilmsPage.jsx"
    click P3 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/pages/FilmsPageReduxStyle.jsx"
    click UI1 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/components/TopMenu.jsx"
    click UI2 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/components/AddFilmDialog.jsx"
    click UI3 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/components/WeatherIndicator.jsx"
    click CFG1 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/config/config.js"
    click CFG2 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/config/customMuiTheme.js"
    click SVC1 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/services/ActorsService.js"
    click SVC2 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/services/FilmService.js"
    click SVC3 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/services/WeatherService.js"
    click ST1 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/store/store.js"
    click ST2 "https://github.com/desapp-2024c2-grupo-3/gestion-convocatorias-frontend/blob/main//src/store/filmSlice.js"

    %% Style Classes
    classDef entry fill:#FFE0E0,stroke:#CC0000,stroke-width:2px;
    classDef core fill:#E0FFE0,stroke:#008800,stroke-width:2px;
    classDef page fill:#E0E0FF,stroke:#0000CC,stroke-width:2px;
    classDef ui fill:#FFF0B3,stroke:#D18B00,stroke-width:2px;
    classDef config fill:#F0E68C,stroke:#B8860B,stroke-width:2px;
    classDef service fill:#D0F0FD,stroke:#008B8B,stroke-width:2px;
    classDef state fill:#FDDDE6,stroke:#CC3366,stroke-width:2px;
```
