# syntaxaman/fifa-league-app architecture

> Architecture diagram of the GitHub repository syntaxaman/fifa-league-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/syntaxaman/fifa-league-app
- Repository: https://github.com/syntaxaman/fifa-league-app

## Overview

##### Main Components Identification

The system should be represented with these primary components:

a) Frontend Layer (React Components)
- Presentation Layer (Pages)
- Component Layer (Reusable Components)
- State Management Layer (Redux)

b) Data Flow Layer
- Actions
- Reducers
- Store

##### Specific Elements

a) User Interface Flow:
- Pages -> Components -> Modals/Forms

b) Data Flow:
- Components -> Actions -> Reducer -> Store -> Components

##### Important Relationships to Highlight

- CRUD operations flow for Players, Teams, and Coaches
- Filter functionality flow
- Modal trigger relationships

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef page fill:#2196F3,stroke:#1565C0,color:white
    classDef component fill:#4CAF50,stroke:#388E3C,color:white
    classDef modal fill:#FF9800,stroke:#F57C00,color:white
    classDef form fill:#9C27B0,stroke:#7B1FA2,color:white
    classDef redux fill:#E91E63,stroke:#C2185B,color:white
    classDef filter fill:#00BCD4,stroke:#0097A7,color:white
    classDef control fill:#FF5722,stroke:#E64A19,color:white
    classDef auth fill:#607D8B,stroke:#455A64,color:white

    %% User Interface Layer
    subgraph UI
        Dashboard["Dashboard"]:::page
        Home["Home"]:::page
        Players["Players"]:::page
        Teams["Teams"]:::page
        Coaches["Coaches"]:::page
        NavBar["Navigation Bar"]:::component
        Login["Dashboard Login"]:::auth
    end

    %% Component Layer
    subgraph Components
        PlayersCard["Players Card"]:::component
        TeamsCard["Teams Card"]:::component
        CoachesCard["Coaches Card"]:::component
    end

    %% Modal Layer
    subgraph Modals
        PlayerModal["Player Modal"]:::modal
        TeamModal["Team Modal"]:::modal
        CoachModal["Coach Modal"]:::modal
    end

    %% Filter Layer
    subgraph Filters
        PlayerFilter["Player Filter"]:::filter
        TeamFilter["Team Filter"]:::filter
        CoachFilter["Coach Filter"]:::filter
    end

    %% Form Layer
    subgraph Forms
        AddPlayer["Add Player Form"]:::form
        AddTeam["Add Team Form"]:::form
        AddCoach["Add Coach Form"]:::form
        EditPlayer["Edit Player"]:::form
        EditTeam["Edit Team"]:::form
        EditCoach["Edit Coach"]:::form
    end

    %% Control Layer
    subgraph Controls
        PlayerControl["Player Control"]:::control
        TeamControl["Team Control"]:::control
        CoachControl["Coach Control"]:::control
    end

    %% Redux Layer
    subgraph Redux
        Store["Redux Store"]:::redux
        MainReducer["Main Reducer"]:::redux
        PlayerActions["Player Actions"]:::redux
        TeamActions["Team Actions"]:::redux
        CoachActions["Coach Actions"]:::redux
        PlayerSearchAction["Player Search Actions"]:::redux
        TeamSearchActions["Team Search Actions"]:::redux
        CoachSearchActions["Coach Search Actions"]:::redux
    end

    %% Relationships
    Dashboard --> Login
    Login --> Home
    NavBar --> Home
    NavBar --> Players
    NavBar --> Teams
    NavBar --> Coaches

    Players --> PlayersCard
    Teams --> TeamsCard
    Coaches --> CoachesCard

    PlayersCard --> PlayerModal
    TeamsCard --> TeamModal
    CoachesCard --> CoachModal

    Players --> PlayerFilter
    Teams --> TeamFilter
    Coaches --> CoachFilter

    PlayerControl --> AddPlayer
    PlayerControl --> EditPlayer
    TeamControl --> AddTeam
    TeamControl --> EditTeam
    CoachControl --> AddCoach
    CoachControl --> EditCoach

    PlayerControl --> Store
    TeamControl --> Store
    CoachControl --> Store

    Store --> MainReducer
    MainReducer --> PlayerActions
    MainReducer --> TeamActions
    MainReducer --> CoachActions
    MainReducer --> PlayerSearchAction
    MainReducer --> TeamSearchActions
    MainReducer --> CoachSearchActions

    %% Click Events
    click Dashboard "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/Dashboard.js"
    click Home "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/Home.js"
    click Players "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/Players.js"
    click Teams "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/Teams.js"
    click Coaches "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/Coaches.js"
    click PlayersCard "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Components/PlayersCard.js"
    click TeamsCard "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Components/TeamsCard.js"
    click CoachesCard "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Components/CoachesCard.js"
    click PlayerModal "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Components/PlayerModal.js"
    click TeamModal "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Components/TeamModal.js"
    click CoachModal "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Components/CoachModal.js"
    click PlayerFilter "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Components/PlayerFilterSideBar.js"
    click TeamFilter "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Components/TeamFilterSideBar.js"
    click CoachFilter "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Components/CoachFilterSideBar.js"
    click AddPlayer "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/AddPlayerForm.js"
    click AddTeam "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/AddTeamForm.js"
    click AddCoach "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/AddCoachForm.js"
    click EditPlayer "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/EditPlayer.js"
    click EditTeam "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/EditTeam.js"
    click EditCoach "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/EditCoach.js"
    click PlayerControl "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/PlayerControl.js"
    click TeamControl "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/TeamControl.js"
    click CoachControl "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/CoachControl.js"
    click MainReducer "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Redux/Reducer.js"
    click PlayerSearchAction "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Redux/PlayerSearchAction.js"
    click TeamSearchActions "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Redux/TeamSearchActions.js"
    click CoachSearchActions "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Redux/CoachSearchActions.js"
    click PlayerActions "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Redux/Players/PlayersActions.js"
    click TeamActions "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Redux/Teams/TeamsActions.js"
    click CoachActions "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Redux/Coaches/CoachesActions.js"
    click Login "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Pages/DashboardLogIn.js"
    click NavBar "https://github.com/Syntaxaman/fifa-league-app/blob/master/src/Components/NavBar.js"
```
