# l4risza/gameatlas architecture

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

- Interactive diagram: https://gitdiagram.com/l4risza/gameatlas
- Repository: https://github.com/l4risza/gameatlas

## Overview

GameAtlas is a React game-discovery and player-community application backed by an Express API, IGDB, and Supabase. Its main user journey is browsing or searching games, opening a game page, and optionally saving or reviewing it; separate community flows support lists, profiles, and review likes. The graph includes the documented authentication and account features. Backend service wiring is based on the SOURCE INDEX; unsampled routes and UI internals are not expanded beyond documented behavior.

Main entry points: [`src/App.jsx`](https://github.com/l4risza/gameatlas/blob/main/src/App.jsx) (Route dispatch), [`src/services/account.js`](https://github.com/l4risza/gameatlas/blob/main/src/services/account.js) (Account operations), [`backend/server.js`](https://github.com/l4risza/gameatlas/blob/main/backend/server.js) (API server), [`src/hooks/useGames.js`](https://github.com/l4risza/gameatlas/blob/main/src/hooks/useGames.js) (Game loading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React application"]
  node_entry["React entry<br/>[main.jsx]"]
  node_routes["Route dispatch<br/>[App.jsx]"]
  node_authui["Auth screens<br/>[Login.jsx]"]
end

subgraph group_game["Game discovery"]
  node_explore["Browse and search<br/>[Explorar.jsx]"]
  node_home["Home feed<br/>[Home.jsx]"]
  node_gamepage["Game details<br/>[Jogo.jsx]"]
  node_gamehooks["Game loading<br/>[useGames.js]"]
  node_browserapi["Game API client<br/>[api.js]"]
end

subgraph group_community["Player community"]
  node_accountgame["Saved games and ratings<br/>[GameAccount.jsx]"]
  node_reviews["Review feed<br/>[Reviews.jsx]"]
  node_reviewdetail["Review details<br/>[ReviewDetalhes.jsx]"]
  node_reviewlike["Review likes<br/>[ReviewLike.jsx]"]
  node_lists["Lists<br/>[Listas.jsx]"]
  node_listdetail["List details<br/>[ListaDetalhes.jsx]"]
  node_profile["Profiles and settings<br/>[Perfil.jsx]"]
  node_accountsvc["Account operations<br/>[account.js]"]
end

subgraph group_backend["API and integrations"]
  node_express["Express routes<br/>[app.js]"]
  node_server["API server<br/>[server.js]"]
  node_igdbservice["IGDB game service<br/>[igdb-service.js]"]
  node_igdbclient["IGDB client<br/>[igdb-client.js]"]
  node_translation["Description translation"]
end

subgraph group_identity["Identity and storage"]
  node_authprovider["Session provider<br/>[AuthProvider.jsx]"]
  node_supabaseclient["Supabase client<br/>[supabase.js]"]
  node_supabasebackend["Backend account service"]
  node_accountbackend["Account API logic<br/>[account-service.js]"]
end

node_player(("Player"))
node_igdb{{"IGDB"}}
node_supabase[("Supabase platform")]

node_player -->|"uses"| node_entry
node_entry -->|"mounts"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_explore
node_routes -->|"routes to"| node_gamepage
node_routes -->|"routes to"| node_reviews
node_routes -->|"routes to"| node_reviewdetail
node_routes -->|"routes to"| node_lists
node_routes -->|"routes to"| node_listdetail
node_routes -->|"routes to"| node_profile
node_routes -->|"routes to"| node_authui
node_explore -->|"loads games"| node_gamehooks
node_home -.->|"loads games"| node_gamehooks
node_gamepage -->|"loads game data"| node_gamehooks
node_gamehooks -->|"requests data"| node_browserapi
node_browserapi -->|"calls API"| node_express
node_server -->|"starts"| node_express
node_server -->|"configures"| node_igdbservice
node_server -->|"configures"| node_translation
node_igdbservice -->|"uses"| node_igdbclient
node_igdbclient -->|"queries"| node_igdb
node_server -->|"configures"| node_supabasebackend
node_server -->|"configures"| node_accountbackend
node_accountbackend -.->|"uses"| node_supabasebackend
node_express -.->|"dispatches"| node_accountbackend
node_gamepage -->|"shows account actions"| node_accountgame
node_accountgame -->|"loads and updates"| node_accountsvc
node_reviews -->|"loads reviews"| node_accountsvc
node_reviewdetail -->|"loads and deletes"| node_accountsvc
node_reviewdetail -->|"renders"| node_reviewlike
node_reviewlike -->|"sets likes"| node_accountsvc
node_lists -.->|"loads lists"| node_accountsvc
node_listdetail -->|"manages list games"| node_accountsvc
node_profile -->|"uses account data"| node_accountsvc
node_accountsvc -->|"queries account data"| node_supabaseclient
node_accountsvc -->|"requests game records"| node_browserapi
node_entry -->|"wraps app"| node_authprovider
node_authprovider -->|"initializes session"| node_supabaseclient
node_supabaseclient -->|"connects"| node_supabase
node_supabasebackend -.->|"accesses data"| node_supabase

click node_entry "https://github.com/l4risza/gameatlas/blob/main/src/main.jsx"
click node_routes "https://github.com/l4risza/gameatlas/blob/main/src/App.jsx"
click node_authui "https://github.com/l4risza/gameatlas/blob/main/src/pages/Login.jsx"
click node_explore "https://github.com/l4risza/gameatlas/blob/main/src/pages/Explorar.jsx"
click node_home "https://github.com/l4risza/gameatlas/blob/main/src/pages/Home.jsx"
click node_gamepage "https://github.com/l4risza/gameatlas/blob/main/src/pages/Jogo.jsx"
click node_gamehooks "https://github.com/l4risza/gameatlas/blob/main/src/hooks/useGames.js"
click node_browserapi "https://github.com/l4risza/gameatlas/blob/main/src/services/api.js"
click node_accountgame "https://github.com/l4risza/gameatlas/blob/main/src/components/GameAccount.jsx"
click node_reviews "https://github.com/l4risza/gameatlas/blob/main/src/pages/Reviews.jsx"
click node_reviewdetail "https://github.com/l4risza/gameatlas/blob/main/src/pages/ReviewDetalhes.jsx"
click node_reviewlike "https://github.com/l4risza/gameatlas/blob/main/src/components/ReviewLike.jsx"
click node_lists "https://github.com/l4risza/gameatlas/blob/main/src/pages/Listas.jsx"
click node_listdetail "https://github.com/l4risza/gameatlas/blob/main/src/pages/ListaDetalhes.jsx"
click node_profile "https://github.com/l4risza/gameatlas/blob/main/src/pages/Perfil.jsx"
click node_accountsvc "https://github.com/l4risza/gameatlas/blob/main/src/services/account.js"
click node_authprovider "https://github.com/l4risza/gameatlas/blob/main/src/context/AuthProvider.jsx"
click node_supabaseclient "https://github.com/l4risza/gameatlas/blob/main/src/services/supabase.js"
click node_supabasebackend "https://github.com/l4risza/gameatlas/blob/main/backend/supabase-service.js"
click node_accountbackend "https://github.com/l4risza/gameatlas/blob/main/backend/account-service.js"
click node_express "https://github.com/l4risza/gameatlas/blob/main/backend/app.js"
click node_server "https://github.com/l4risza/gameatlas/blob/main/backend/server.js"
click node_igdbservice "https://github.com/l4risza/gameatlas/blob/main/backend/igdb-service.js"
click node_igdbclient "https://github.com/l4risza/gameatlas/blob/main/backend/igdb-client.js"
click node_translation "https://github.com/l4risza/gameatlas/blob/main/backend/translation-service.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_entry,node_routes,node_authui toneBlue
class node_explore,node_home,node_gamepage,node_gamehooks,node_browserapi,node_supabase toneAmber
class node_accountgame,node_reviews,node_reviewdetail,node_reviewlike,node_lists,node_listdetail,node_profile,node_accountsvc toneMint
class node_express,node_server,node_igdbservice,node_igdbclient,node_translation toneRose
class node_authprovider,node_supabaseclient,node_supabasebackend,node_accountbackend,node_player,node_igdb toneIndigo
```

## Components

### React application

- [React entry](https://github.com/l4risza/gameatlas/blob/main/src/main.jsx): `src/main.jsx`
- [Route dispatch](https://github.com/l4risza/gameatlas/blob/main/src/App.jsx): `src/App.jsx`
- [Auth screens](https://github.com/l4risza/gameatlas/blob/main/src/pages/Login.jsx): `src/pages/Login.jsx`

### Game discovery

- [Browse and search](https://github.com/l4risza/gameatlas/blob/main/src/pages/Explorar.jsx): `src/pages/Explorar.jsx`
- [Home feed](https://github.com/l4risza/gameatlas/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Game details](https://github.com/l4risza/gameatlas/blob/main/src/pages/Jogo.jsx): `src/pages/Jogo.jsx`
- [Game loading](https://github.com/l4risza/gameatlas/blob/main/src/hooks/useGames.js): `src/hooks/useGames.js`
- [Game API client](https://github.com/l4risza/gameatlas/blob/main/src/services/api.js): `src/services/api.js`

### Player community

- [Saved games and ratings](https://github.com/l4risza/gameatlas/blob/main/src/components/GameAccount.jsx): `src/components/GameAccount.jsx`
- [Review feed](https://github.com/l4risza/gameatlas/blob/main/src/pages/Reviews.jsx): `src/pages/Reviews.jsx`
- [Review details](https://github.com/l4risza/gameatlas/blob/main/src/pages/ReviewDetalhes.jsx): `src/pages/ReviewDetalhes.jsx`
- [Review likes](https://github.com/l4risza/gameatlas/blob/main/src/components/ReviewLike.jsx): `src/components/ReviewLike.jsx`
- [Lists](https://github.com/l4risza/gameatlas/blob/main/src/pages/Listas.jsx): `src/pages/Listas.jsx`
- [List details](https://github.com/l4risza/gameatlas/blob/main/src/pages/ListaDetalhes.jsx): `src/pages/ListaDetalhes.jsx`
- [Profiles and settings](https://github.com/l4risza/gameatlas/blob/main/src/pages/Perfil.jsx): `src/pages/Perfil.jsx`
- [Account operations](https://github.com/l4risza/gameatlas/blob/main/src/services/account.js): `src/services/account.js`

### API and integrations

- [Express routes](https://github.com/l4risza/gameatlas/blob/main/backend/app.js): `backend/app.js`
- [API server](https://github.com/l4risza/gameatlas/blob/main/backend/server.js): `backend/server.js`
- [IGDB game service](https://github.com/l4risza/gameatlas/blob/main/backend/igdb-service.js): `backend/igdb-service.js`
- [IGDB client](https://github.com/l4risza/gameatlas/blob/main/backend/igdb-client.js): `backend/igdb-client.js`
- [Description translation](https://github.com/l4risza/gameatlas/blob/main/backend/translation-service.js): `backend/translation-service.js`

### Identity and storage

- [Session provider](https://github.com/l4risza/gameatlas/blob/main/src/context/AuthProvider.jsx): `src/context/AuthProvider.jsx`
- [Supabase client](https://github.com/l4risza/gameatlas/blob/main/src/services/supabase.js): `src/services/supabase.js`
- [Backend account service](https://github.com/l4risza/gameatlas/blob/main/backend/supabase-service.js): `backend/supabase-service.js`
- [Account API logic](https://github.com/l4risza/gameatlas/blob/main/backend/account-service.js): `backend/account-service.js`

### Other components

- **Player**
- **IGDB**
- **Supabase platform**

## Connections

- Player → React entry: uses
- React entry → Route dispatch: mounts (evidence: `src/main.jsx`)
- Route dispatch → Home feed: routes to (evidence: `src/App.jsx`)
- Route dispatch → Browse and search: routes to (evidence: `src/App.jsx`)
- Route dispatch → Game details: routes to (evidence: `src/App.jsx`)
- Route dispatch → Review feed: routes to (evidence: `src/App.jsx`)
- Route dispatch → Review details: routes to (evidence: `src/App.jsx`)
- Route dispatch → Lists: routes to (evidence: `src/App.jsx`)
- Route dispatch → List details: routes to (evidence: `src/App.jsx`)
- Route dispatch → Profiles and settings: routes to (evidence: `src/App.jsx`)
- Route dispatch → Auth screens: routes to (evidence: `src/App.jsx`)
- Browse and search → Game loading: loads games (evidence: `src/hooks/useGames.js`)
- Home feed → Game loading: loads games
- Game details → Game loading: loads game data (evidence: `src/pages/Jogo.jsx`)
- Game loading → Game API client: requests data (evidence: `src/hooks/useGames.js`)
- Game API client → Express routes: calls API
- API server → Express routes: starts (evidence: `backend/server.js`)
- API server → IGDB game service: configures (evidence: `backend/server.js`)
- API server → Description translation: configures (evidence: `backend/server.js`)
- IGDB game service → IGDB client: uses (evidence: `backend/igdb-service.js`)
- IGDB client → IGDB: queries
- API server → Backend account service: configures (evidence: `backend/server.js`)
- API server → Account API logic: configures (evidence: `backend/server.js`)
- Account API logic → Backend account service: uses
- Express routes → Account API logic: dispatches
- Game details → Saved games and ratings: shows account actions (evidence: `src/pages/Jogo.jsx`)
- Saved games and ratings → Account operations: loads and updates (evidence: `src/components/GameAccount.jsx`)
- Review feed → Account operations: loads reviews (evidence: `src/pages/Reviews.jsx`)
- Review details → Account operations: loads and deletes (evidence: `src/pages/ReviewDetalhes.jsx`)
- Review details → Review likes: renders (evidence: `src/pages/ReviewDetalhes.jsx`)
- Review likes → Account operations: sets likes (evidence: `src/components/ReviewLike.jsx`)
- Lists → Account operations: loads lists
- List details → Account operations: manages list games (evidence: `src/pages/ListaDetalhes.jsx`)
- Profiles and settings → Account operations: uses account data (evidence: `src/pages/Perfil.jsx`)
- Account operations → Supabase client: queries account data (evidence: `src/services/account.js`)
- Account operations → Game API client: requests game records (evidence: `src/services/account.js`)
- React entry → Session provider: wraps app (evidence: `src/main.jsx`)
- Session provider → Supabase client: initializes session (evidence: `src/context/AuthProvider.jsx`)
- Supabase client → Supabase platform: connects (evidence: `src/services/supabase.js`)
- Backend account service → Supabase platform: accesses data
