# sertanozcnn/eo-creativeapp architecture

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

- Interactive diagram: https://gitdiagram.com/sertanozcnn/eo-creativeapp
- Repository: https://github.com/sertanozcnn/eo-creativeapp

## Overview

##### Project type and purpose
- From the file tree and README, we see a React single-page application (SPA) bootstrapped with Vite.
- It is a static front-end that uses Redux (RTK Query) to fetch content from remote APIs/CMS endpoints and organizes its UI into reusable components and pages.

##### File structure
- Top-level config and metadata:
- .env, package.json / package-lock.json, vite.config.js, tailwind.config.js, eslint.config.js
- Public/static assets:
- public/, src/assets/ (fonts, images)
- Application source code under src/:
- src/main.jsx + index.html – entry points
- src/router/router.jsx – SPA routing layer (likely React Router)
- src/redux/ – state management:
– features/ (slice definitions)
– services/ (RTK Query endpoints per content type)
– store/store.js (configureStore)
- src/components/ – atomic and composite UI components (AboutWes, Brands, Header, Footer, etc.)
- src/pages/ – route-level page components (Home, About, Contact, Pricing, Policy, Error404, etc.)
- src/App.jsx + App.css – root application shell

##### README for additional insights
- The README confirms React + Vite tooling, plus HMR and ESLint setup.
- No explicit backend is delivered in this repo; all dynamic data comes from external HTTP APIs (configured in Redux services).

a. Main components
- Browser / Client (React SPA)
- Static asset server or CDN (serves index.html, JS/CSS bundles, images/fonts)
- Routing layer (React Router in router.jsx)
- UI component hierarchy (App → Pages → Composite Components → Atoms)
- State management layer (Redux store + RTK Query services)
- External APIs / CMS endpoints (REST or GraphQL services hosting content)
b. Relationships and interactions
- User → Browser (UI interactions and route changes)
- Browser (React Router) serves the correct Page component
- Page components dispatch Redux actions or RTK Query hooks to fetch data
- RTK Query services make HTTP calls to external API endpoints
- Responses flow back to the Redux store, triggering re-renders of connected components
- Static assets (images, fonts) are requested from the public folder or CDN
c. Architectural patterns and design principles
- SPA pattern with client-side routing
- Component-based UI (atomic design within src/components)
- Unidirectional data flow via Redux
- RTK Query for data fetching and cache management
- Code separation: router, store, services, components, pages
d. Key technologies
- React + JSX for UI
- Vite as development/build tool
- Tailwind CSS for styling (tailwind.config.js)
- Redux Toolkit with RTK Query for state & data fetching
- ESLint for linting, PostCSS for CSS processing

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Browser & Entry
    User["User"]:::external
    Browser["Browser / Client<br/>src/main.jsx<br/>index.html"]:::ui
    User -->|"interacts with"| Browser

    %% Routing & App Shell
    Router["Router<br/>src/router/router.jsx"]:::ui
    App["App Shell<br/>src/App.jsx<br/>src/App.css"]:::ui
    Browser --> Router
    Router --> App

    %% UI Components and Pages
    subgraph "UI Layer" 
        direction TB
        Components["UI Component Library<br/>src/components/"]:::ui
        Pages["Page-Level Components<br/>src/pages/"]:::ui
    end
    App --> Components
    App --> Pages

    %% State Management
    subgraph "State Layer" 
        direction TB
        Store["Redux Store Configuration<br/>src/redux/store/store.js"]:::state
        Slices["Feature Slices<br/>src/redux/features/"]:::state
        Services["RTK Query Services<br/>src/redux/services/"]:::state
    end
    Pages -->|"dispatch queries"| Services
    Services -->|"updates cache"| Store
    Store -->|"provides state"| Pages
    Store --> Slices
    Slices --> Store

    %% Data Layer
    subgraph "External Data" 
        direction TB
        APIs["External APIs / CMS Endpoints"]:::api
    end
    Services -->|"HTTP requests"| APIs
    APIs -->|"HTTP responses"| Services

    %% Static Assets
    subgraph "Static Asset Layer"
        direction TB
        Static["Static Assets<br/>public/, src/assets/fonts/, src/assets/images/"]:::static
    end
    Browser --> Static

    %% Configuration & Tooling
    subgraph "Configuration & Tooling"
        direction TB
        Config["Configs<br/>vite.config.js, tailwind.config.js, eslint.config.js, postcss.config.js, .env, package.json, package-lock.json, .gitignore"]:::config
    end

    %% Click Events
    click Browser "https://github.com/sertanozcnn/eo-creativeapp/blob/main/src/main.jsx"
    click Router "https://github.com/sertanozcnn/eo-creativeapp/blob/main/src/router/router.jsx"
    click App "https://github.com/sertanozcnn/eo-creativeapp/blob/main/src/App.jsx"
    click Store "https://github.com/sertanozcnn/eo-creativeapp/blob/main/src/redux/store/store.js"
    click Slices "https://github.com/sertanozcnn/eo-creativeapp/tree/main/src/redux/features/"
    click Services "https://github.com/sertanozcnn/eo-creativeapp/tree/main/src/redux/services/"
    click Components "https://github.com/sertanozcnn/eo-creativeapp/tree/main/src/components/"
    click Pages "https://github.com/sertanozcnn/eo-creativeapp/tree/main/src/pages/"
    click Static "https://github.com/sertanozcnn/eo-creativeapp/tree/main/public/"
    click Static "https://github.com/sertanozcnn/eo-creativeapp/tree/main/src/assets/fonts/"
    click Static "https://github.com/sertanozcnn/eo-creativeapp/tree/main/src/assets/images/"

    %% Styles
    classDef ui fill:#D0E8FF,stroke:#0366d6,color:#0366d6;
    classDef state fill:#D5F5E3,stroke:#27ae60,color:#27ae60;
    classDef api fill:#FDEBD0,stroke:#e67e22,color:#e67e22;
    classDef static fill:#E5E7E9,stroke:#7f8c8d,color:#7f8c8d;
    classDef config fill:#E8DAEF,stroke:#8e44ad,color:#8e44ad;
    classDef external fill:#ffffff,stroke:#000000,color:#000000;
```
