# enestatli/react-gif-search architecture

> Architecture diagram of the GitHub repository enestatli/react-gif-search, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/enestatli/react-gif-search
- Repository: https://github.com/enestatli/react-gif-search

## Overview

##### Main Components Identification

a) Frontend Layer:
- React Components (Presentation Layer)
- Container Components (Smart Components)
- Redux Store
- Actions/Reducers

##### Relationships and Data Flow

- Unidirectional data flow from Redux Store to Components
- Action dispatches from Components to Store
- API calls to external services
- Component hierarchy relationships

##### Specific Implementation Details

**[User Interface Layer]**
- Header Container
- Home Container
- SearchBar Component
- GifList Component
- GifItem Component
- GifModal Component
- Favorites Container
- Login Container
- Signup Container

**[State Management Layer]**
- Redux Store
- Auth State
- Gifs State
- Modal State
- Action Creators
- Reducers

**[External Services]**
- Authentication API
- GIF API (implied)

##### Important Notes

- Redux state management pattern clearly
- Separation between container and presentational components
- Where authentication state is managed
- How the modal system integrates with the main application
- Demonstrate the relationship between actions and reducers

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User Interface Layer"
        App["App Component"]
        Header["Header Container"]
        Home["Home Container"]
        Login["Login Container"]
        Signup["Signup Container"]
        Favorites["Favorites Container"]
        
        subgraph "UI Components"
            SearchBar["SearchBar Component"]
            GifList["GifList Component"]
            GifItem["GifItem Component"]
            GifModal["GifModal Component"]
        end
        
        Home --> SearchBar
        Home --> GifList
        GifList --> GifItem
        Home --> GifModal
    end
    
    subgraph "State Management Layer"
        Store["Redux Store"]
        Actions["Action Creators"]
        
        subgraph "Reducers"
            RootReducer["Root Reducer"]
            AuthReducer["Auth Reducer"]
            GifsReducer["Gifs Reducer"]
            ModalReducer["Modal Reducer"]
        end
        
        RootReducer --> Store
        AuthReducer --> RootReducer
        GifsReducer --> RootReducer
        ModalReducer --> RootReducer
        Store --> Actions
    end
    
    subgraph "External Services Layer"
        AuthAPI["Authentication API"]
        GifAPI["GIF API"]
    end
    
    %% Relationships
    Store --> App
    Store --> Header
    Store --> Home
    Store --> Login
    Store --> Signup
    Store --> Favorites
    
    Actions --> AuthAPI
    Actions --> GifAPI
    
    %% Click Events
    click App "https://github.com/enestatli/react-gif-search/blob/master/src/components/App.js"
    click Header "https://github.com/enestatli/react-gif-search/blob/master/src/containers/Header.js"
    click Home "https://github.com/enestatli/react-gif-search/blob/master/src/containers/Home.js"
    click Login "https://github.com/enestatli/react-gif-search/blob/master/src/containers/Login.js"
    click Signup "https://github.com/enestatli/react-gif-search/blob/master/src/containers/Signup.js"
    click Favorites "https://github.com/enestatli/react-gif-search/blob/master/src/containers/Favorites.js"
    click SearchBar "https://github.com/enestatli/react-gif-search/blob/master/src/components/SearchBar.js"
    click GifList "https://github.com/enestatli/react-gif-search/blob/master/src/components/GifList.js"
    click GifItem "https://github.com/enestatli/react-gif-search/blob/master/src/components/GifItem.js"
    click GifModal "https://github.com/enestatli/react-gif-search/blob/master/src/components/GifModal.js"
    click Store "https://github.com/enestatli/react-gif-search/blob/master/src/store/configureStore.js"
    click Actions "https://github.com/enestatli/react-gif-search/blob/master/src/actions/index.js"
    click RootReducer "https://github.com/enestatli/react-gif-search/blob/master/src/reducers/index.js"
    click AuthReducer "https://github.com/enestatli/react-gif-search/blob/master/src/reducers/auth.js"
    click GifsReducer "https://github.com/enestatli/react-gif-search/blob/master/src/reducers/gifs.js"
    click ModalReducer "https://github.com/enestatli/react-gif-search/blob/master/src/reducers/modal.js"
    
    %% Styling
    classDef container fill:#e6e6fa
    classDef component fill:#add8e6
    classDef redux fill:#90ee90
    classDef external fill:#ffa500
    
    class Header,Home,Login,Signup,Favorites container
    class SearchBar,GifList,GifItem,GifModal,App component
    class Store,Actions,RootReducer,AuthReducer,GifsReducer,ModalReducer redux
    class AuthAPI,GifAPI external
```
