# soniikot/euthoricwear-clothing-store architecture

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

- Interactive diagram: https://gitdiagram.com/soniikot/euthoricwear-clothing-store
- Repository: https://github.com/soniikot/euthoricwear-clothing-store

## Overview

##### Project type and purpose
- From the top‐level structure and README this is a full-stack e-commerce web application (“Shopping Cart”) composed of:
- A React + Redux + TypeScript frontend (“client/…”)
- A headless CMS/API backend powered by Strapi (“api/…”)
- A relational database (configured in api/config/database.js)
- A payment integration (Stripe plugin under api/src/extensions/strapi-stripe)
- A Docker Compose orchestration (docker-compose.yml)

##### File structure
- Two main services at the root: “api” and “client”
- api/
– Strapi project scaffold: config/, database/, src/api/{category,product,order,subcategory}/…
– Plugins/extensions (Stripe), scripts, public/uploads
– Configuration files (server.js, database.js, middlewares.js, plugins.js, etc.)
- client/
– Vite‐based React application (vite.config.ts, index.html)
– State management (Redux slices in src/features)
– Component tree under src/components, pages under src/pages, router under src/router
– Static assets, styles, fonts
– E2E tests (Cypress), unit tests (Jest/React Testing Library)
- Root files: docker-compose.yml orchestrates “client”, “api” and likely a “db” service; package.json scripts; .env examples.

##### README for additional insights
- Confirms: browsing items, cart management, checkout with payment, user auth, search/filter, favorites
- Technology badges: React v18, Redux v4, TypeScript v4
- Live URL indicating a deployed multi-container setup

## Diagram (Mermaid)

```mermaid
flowchart TD
    Browser["Web Browser"]:::external

    subgraph "Frontend Container"
        FE["Frontend Service"]:::frontend
        App["App Shell"]:::frontend
        ViteConfig["Vite Configuration"]:::frontend
        Store["Redux Store"]:::frontend
        Hooks["Redux Hooks"]:::frontend
        Features["Redux Slices"]:::frontend
        Router["Router"]:::frontend
        Layout["Layout"]:::frontend
        Components["UI Components"]:::frontend
        Pages["Pages"]:::frontend
        Assets["Assets & Styles"]:::frontend
        Cypress["E2E Tests"]:::frontend
        Tests["Unit Tests"]:::frontend

        FE -->|Serves index.html + JS/CSS| App
        FE -->|Bundled by Vite| ViteConfig
        App --> Store
        App --> Hooks
        App --> Features
        App --> Router
        Router --> Layout
        App --> Components
        App --> Pages
        App --> Assets
        FE --> Cypress
        FE --> Tests
    end

    subgraph "API Container"
        API["API Service"]:::backend
        Index["Strapi Entry Point"]:::backend
        ServerConfig["Server Configuration"]:::backend
        APIConfig["API Configuration"]:::backend
        AdminConfig["Admin Configuration"]:::backend
        DBConfig["Database Configuration"]:::backend
        Middleware["Middleware Configuration"]:::backend
        Plugins["Plugins Configuration"]:::backend
        Content["Content Types"]:::backend
        Controllers["Controllers/Services/Routes"]:::backend
        Uploads["Public Uploads"]:::backend
        StripeExt["Stripe Integration"]:::backend
        Migrations["DB Migrations"]:::backend

        API --> Index
        API --> ServerConfig
        API --> APIConfig
        API --> AdminConfig
        API --> DBConfig
        API --> Middleware
        API --> Plugins
        API --> Content
        API --> Controllers
        API --> Uploads
        API --> StripeExt
        API --> Migrations
    end

    DB["Database"]:::db
    Docker["Docker Compose"]:::external
    Stripe["Stripe"]:::external

    Browser -->|Loads Frontend| FE
    FE -->|GET /products, POST /orders| API
    FE -->|Client Payment via Stripe.js| Stripe
    API -->|DB read/write| DB
    API -->|Stripe charge / webhooks| Stripe

    Docker --> FE
    Docker --> API
    Docker --> DB

    click FE "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/client/"
    click App "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/client/src/App.tsx"
    click ViteConfig "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/client/vite.config.ts"
    click Store "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/client/src/app/store.ts"
    click Hooks "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/client/src/app/hooks.ts"
    click Features "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/client/src/features/"
    click Router "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/client/src/router/router.tsx"
    click Layout "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/client/src/router/Layout.tsx"
    click Components "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/client/src/components/"
    click Pages "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/client/src/pages/"
    click Assets "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/client/src/assets/"
    click Assets "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/client/src/styles/"
    click Cypress "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/client/cypress/"
    click Tests "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/client/src/tests/"

    click API "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/api/"
    click Index "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/api/src/index.js"
    click ServerConfig "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/api/config/server.js"
    click APIConfig "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/api/config/api.js"
    click AdminConfig "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/api/config/admin.js"
    click DBConfig "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/api/config/database.js"
    click Middleware "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/api/config/middlewares.js"
    click Plugins "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/api/config/plugins.js"
    click Content "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/api/src/api/category/content-types/"
    click Content "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/api/src/api/product/content-types/"
    click Content "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/api/src/api/subcategory/content-types/"
    click Content "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/api/src/api/order/content-types/"
    click Controllers "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/api/src/api/category/"
    click Controllers "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/api/src/api/product/"
    click Controllers "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/api/src/api/subcategory/"
    click Controllers "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/api/src/api/order/"
    click Uploads "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/api/public/uploads/"
    click StripeExt "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/api/src/extensions/strapi-stripe/public/stripe.js"
    click Migrations "https://github.com/soniikot/euthoricwear-clothing-store/tree/develop/api/database/migrations/"

    click Docker "https://github.com/soniikot/euthoricwear-clothing-store/blob/develop/docker-compose.yml"

    classDef frontend fill:#D0E8F2,stroke:#0366D6,color:#0366D6;
    classDef backend fill:#E0F7E9,stroke:#228B22,color:#228B22;
    classDef db fill:#FFE8CC,stroke:#FFA500,color:#FFA500;
    classDef external fill:#FDE2E4,stroke:#D32F2F,color:#D32F2F;
```
