# xaviersanc/check_moi_ca architecture

> Architecture diagram of the GitHub repository xaviersanc/check_moi_ca, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xaviersanc/check_moi_ca
- Repository: https://github.com/xaviersanc/check_moi_ca

## Overview

Check moi ça is a React game-deal discovery and comparison app. Users browse Steam offers under a selected euro budget or search by title, then open a game detail page combining Steam Store product and price data with SteamSpy statistics. Users can also save favorites, inspect their prices, switch themes, and subscribe to a Discord newsletter. The graph follows the evidenced frontend calls and documented integrations; newsletter backend wiring and some serverless proxy details are not shown in the excerpts, so those links are marked unverified.

Main entry points: [`src/App.jsx`](https://github.com/xaviersanc/check_moi_ca/blob/main/src/App.jsx) (Browse and search), [`src/index.js`](https://github.com/xaviersanc/check_moi_ca/blob/main/src/index.js) (Route dispatcher), [`src/components/dealUtils.js`](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/dealUtils.js) (Deal mapping), [`src/components/useSteamDealsUnder.js`](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/useSteamDealsUnder.js) (Budget offers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Deal discovery"]
  node_home["Browse and search<br/>[App.jsx]"]
  node_budget["Budget offers"]
  node_title_search["Title search"]
  node_deal_favorites["Favorite offers"]
  node_deal_mapping["Deal mapping<br/>[dealUtils.js]"]
end

subgraph group_details["Game details"]
  node_game_page["Game details<br/>[GameDetails.jsx]"]
  node_store_client["Steam Store client<br/>[steamStore.js]"]
  node_spy_client["SteamSpy client<br/>[steamspy.js]"]
  node_network["Network resilience<br/>[net.js]"]
end

subgraph group_account["Preferences"]
  node_favorites_page["Favorites page<br/>[Favorites.jsx]"]
  node_favorite_list["Favorite lookup<br/>[useFavoriteList.js]"]
  node_favorite_state["Favorite state<br/>[useFavorites.js]"]
end

subgraph group_integrations["External services"]
  node_newsletter_api["Newsletter endpoint<br/>[newsletter.js]"]
  node_steamspy_api["SteamSpy proxy<br/>[steamspy.js]"]
  node_steamstore_api["Steam Store proxy<br/>[steamstore.js]"]
  node_cheapshark["CheapShark"]
  node_steam_store["Steam Store"]
  node_steamspy["SteamSpy"]
  node_discord["Discord service"]
  node_redis[("Upstash Redis")]
end

subgraph group_site["Site pages"]
  node_router["Route dispatcher<br/>[index.js]"]
  node_theme_nav["Header and theme<br/>[Header.jsx]"]
  node_footer["Footer navigation<br/>[Footer.jsx]"]
  node_legal["Legal information<br/>[Legal.jsx]"]
  node_newsletter_page["Newsletter page<br/>[Newsletter.jsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens app"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_game_page
node_router -->|"routes to"| node_favorites_page
node_router -->|"routes to"| node_legal
node_router -->|"routes to"| node_newsletter_page
node_home -->|"loads offers"| node_budget
node_home -->|"searches titles"| node_title_search
node_home -->|"toggles favorites"| node_favorite_state
node_home -->|"loads favorite deals"| node_deal_favorites
node_budget -->|"requests deals"| node_cheapshark
node_title_search -->|"searches deals"| node_cheapshark
node_deal_favorites -->|"requests prices"| node_cheapshark
node_budget -->|"maps results"| node_deal_mapping
node_title_search -->|"maps results"| node_deal_mapping
node_deal_favorites -->|"maps results"| node_deal_mapping
node_game_page -->|"fetches details"| node_store_client
node_game_page -->|"fetches statistics"| node_spy_client
node_store_client -->|"uses retries"| node_network
node_spy_client -->|"uses retries"| node_network
node_store_client -.->|"proxies requests"| node_steamstore_api
node_spy_client -.->|"proxies requests"| node_steamspy_api
node_steamstore_api -.->|"queries"| node_steam_store
node_steamspy_api -.->|"queries"| node_steamspy
node_favorites_page -->|"reads and toggles"| node_favorite_state
node_favorites_page -->|"loads favorite games"| node_favorite_list
node_favorite_list -->|"uses formatting"| node_deal_mapping
node_newsletter_page -.->|"submits subscription"| node_newsletter_api
node_newsletter_api -.->|"supports messaging"| node_discord
node_newsletter_api -.->|"stores subscriber IDs"| node_redis
node_home -->|"renders header"| node_theme_nav
node_home -->|"renders footer"| node_footer

click node_router "https://github.com/xaviersanc/check_moi_ca/blob/main/src/index.js"
click node_home "https://github.com/xaviersanc/check_moi_ca/blob/main/src/App.jsx"
click node_budget "https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/useSteamDealsUnder.js"
click node_title_search "https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/useSteamDealsByTitle.js"
click node_deal_favorites "https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/useFavoriteDeals.js"
click node_deal_mapping "https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/dealUtils.js"
click node_game_page "https://github.com/xaviersanc/check_moi_ca/blob/main/src/pages/GameDetails.jsx"
click node_store_client "https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/steamStore.js"
click node_spy_client "https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/steamspy.js"
click node_network "https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/net.js"
click node_favorites_page "https://github.com/xaviersanc/check_moi_ca/blob/main/src/pages/Favorites.jsx"
click node_favorite_list "https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/useFavoriteList.js"
click node_favorite_state "https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/useFavorites.js"
click node_theme_nav "https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/Header.jsx"
click node_footer "https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/Footer.jsx"
click node_legal "https://github.com/xaviersanc/check_moi_ca/blob/main/src/pages/Legal.jsx"
click node_newsletter_page "https://github.com/xaviersanc/check_moi_ca/blob/main/src/pages/Newsletter.jsx"
click node_newsletter_api "https://github.com/xaviersanc/check_moi_ca/blob/main/api/newsletter.js"
click node_steamspy_api "https://github.com/xaviersanc/check_moi_ca/blob/main/api/steamspy.js"
click node_steamstore_api "https://github.com/xaviersanc/check_moi_ca/blob/main/api/steamstore.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home,node_budget,node_title_search,node_deal_favorites,node_deal_mapping toneBlue
class node_game_page,node_store_client,node_spy_client,node_network toneAmber
class node_favorites_page,node_favorite_list,node_favorite_state toneMint
class node_newsletter_api,node_steamspy_api,node_steamstore_api,node_cheapshark,node_steam_store,node_steamspy,node_discord,node_redis toneRose
class node_router,node_theme_nav,node_footer,node_legal,node_newsletter_page,node_visitor toneIndigo
```

## Components

### Deal discovery

- [Browse and search](https://github.com/xaviersanc/check_moi_ca/blob/main/src/App.jsx): `src/App.jsx`
- [Budget offers](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/useSteamDealsUnder.js): `src/components/useSteamDealsUnder.js`
- [Title search](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/useSteamDealsByTitle.js): `src/components/useSteamDealsByTitle.js`
- [Favorite offers](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/useFavoriteDeals.js): `src/components/useFavoriteDeals.js`
- [Deal mapping](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/dealUtils.js): `src/components/dealUtils.js`

### Game details

- [Game details](https://github.com/xaviersanc/check_moi_ca/blob/main/src/pages/GameDetails.jsx): `src/pages/GameDetails.jsx`
- [Steam Store client](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/steamStore.js): `src/components/steamStore.js`
- [SteamSpy client](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/steamspy.js): `src/components/steamspy.js`
- [Network resilience](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/net.js): `src/components/net.js`

### Preferences

- [Favorites page](https://github.com/xaviersanc/check_moi_ca/blob/main/src/pages/Favorites.jsx): `src/pages/Favorites.jsx`
- [Favorite lookup](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/useFavoriteList.js): `src/components/useFavoriteList.js`
- [Favorite state](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/useFavorites.js): `src/components/useFavorites.js`

### External services

- [Newsletter endpoint](https://github.com/xaviersanc/check_moi_ca/blob/main/api/newsletter.js): `api/newsletter.js`
- [SteamSpy proxy](https://github.com/xaviersanc/check_moi_ca/blob/main/api/steamspy.js): `api/steamspy.js`
- [Steam Store proxy](https://github.com/xaviersanc/check_moi_ca/blob/main/api/steamstore.js): `api/steamstore.js`
- **CheapShark**
- **Steam Store**
- **SteamSpy**
- **Discord service**
- **Upstash Redis**

### Site pages

- [Route dispatcher](https://github.com/xaviersanc/check_moi_ca/blob/main/src/index.js): `src/index.js`
- [Header and theme](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/Header.jsx): `src/components/Header.jsx`
- [Footer navigation](https://github.com/xaviersanc/check_moi_ca/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`
- [Legal information](https://github.com/xaviersanc/check_moi_ca/blob/main/src/pages/Legal.jsx): `src/pages/Legal.jsx`
- [Newsletter page](https://github.com/xaviersanc/check_moi_ca/blob/main/src/pages/Newsletter.jsx): `src/pages/Newsletter.jsx`

### Other components

- **Visitor**

## Connections

- Visitor → Route dispatcher: opens app (evidence: `src/index.js`)
- Route dispatcher → Browse and search: routes to (evidence: `src/index.js`)
- Route dispatcher → Game details: routes to (evidence: `src/index.js`)
- Route dispatcher → Favorites page: routes to (evidence: `src/index.js`)
- Route dispatcher → Legal information: routes to (evidence: `src/index.js`)
- Route dispatcher → Newsletter page: routes to (evidence: `src/index.js`)
- Browse and search → Budget offers: loads offers (evidence: `src/App.jsx`)
- Browse and search → Title search: searches titles (evidence: `src/App.jsx`)
- Browse and search → Favorite state: toggles favorites (evidence: `src/App.jsx`)
- Browse and search → Favorite offers: loads favorite deals (evidence: `src/App.jsx`)
- Budget offers → CheapShark: requests deals (evidence: `src/components/useSteamDealsUnder.js`)
- Title search → CheapShark: searches deals (evidence: `src/components/useSteamDealsByTitle.js`)
- Favorite offers → CheapShark: requests prices (evidence: `src/components/useFavoriteDeals.js`)
- Budget offers → Deal mapping: maps results (evidence: `src/components/useSteamDealsUnder.js`)
- Title search → Deal mapping: maps results (evidence: `src/components/useSteamDealsByTitle.js`)
- Favorite offers → Deal mapping: maps results (evidence: `src/components/useFavoriteDeals.js`)
- Game details → Steam Store client: fetches details (evidence: `src/pages/GameDetails.jsx`)
- Game details → SteamSpy client: fetches statistics (evidence: `src/pages/GameDetails.jsx`)
- Steam Store client → Network resilience: uses retries (evidence: `src/components/steamStore.js`)
- SteamSpy client → Network resilience: uses retries (evidence: `src/components/steamspy.js`)
- Steam Store client → Steam Store proxy: proxies requests (evidence: `README.md`)
- SteamSpy client → SteamSpy proxy: proxies requests (evidence: `README.md`)
- Steam Store proxy → Steam Store: queries (evidence: `README.md`)
- SteamSpy proxy → SteamSpy: queries (evidence: `README.md`)
- Favorites page → Favorite state: reads and toggles (evidence: `src/pages/Favorites.jsx`)
- Favorites page → Favorite lookup: loads favorite games (evidence: `src/pages/Favorites.jsx`)
- Favorite lookup → Deal mapping: uses formatting (evidence: `src/components/useFavoriteList.js`)
- Newsletter page → Newsletter endpoint: submits subscription
- Newsletter endpoint → Discord service: supports messaging (evidence: `README.md`)
- Newsletter endpoint → Upstash Redis: stores subscriber IDs (evidence: `README.md`)
- Browse and search → Header and theme: renders header (evidence: `src/App.jsx`)
- Browse and search → Footer navigation: renders footer (evidence: `src/App.jsx`)
