# csabaprem03/vue architecture

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

- Interactive diagram: https://gitdiagram.com/csabaprem03/vue
- Repository: https://github.com/csabaprem03/vue

## Overview

1. **Repository scope**
   - This repo is the **frontend** of a game / collectible browsing app.
   - It is a **Vue 3 SPA** that talks to an external **Laravel + MySQL** backend through API calls. The backend is not in this repo.

2. **Bootstrap and app shell**
   - `src/main.ts` is the client entry point.
   - `App.vue` is the top-level composition root.
   - The persistent UI shell is split into `Header.vue`, `Main.vue`, and `Footer.vue`, so route changes happen inside a stable layout.

3. **Routing boundary**
   - `src/router/index.ts` defines the navigation structure.
   - `src/views/*` contains the route-level screens: login/register/account plus game and collectible pages, with `NotFound.vue` as the fallback.
   - The router is the main boundary between “screen-level” concerns and reusable feature components.

4. **Two main feature areas**
   - The app is organized around two parallel domains:
     - **Games**
     - **Collectibles**
   - Each domain has its own detail pages, list/grid views, wrappers, cards, and post/filter screens under `src/components/pages` and `src/components/domains`.
   - This separation is important for the architecture diagram: both features share patterns, but their data and UI are split.

5. **Feature-specific UI composition**
   - `src/components/pages` holds mostly reusable view parts such as `GameGrid`, `GameCard`, `GameWrapper`, `GamesFiltered`, `CollectibleGrid`, `CollectibleWrapper`, `FilterPanel`, `FavoriteButton`, loaders, and publisher-related pieces.
   - `src/components/domains` contains more domain-specific elements like `GameDetails`, `CollectibleDetails`, `FavoriteGames`, and `CollectibleTypeCard`.
   - In practice, the route views assemble these pieces into full pages.

6. **State management**
   - `src/stores` contains Pinia stores for application state:
     - `authStore` for login/session state
     - `favoriteStore` for saved items
     - `gamesStore` for game data and loading state
     - `publisherStore` for publisher data
     - `platforms.ts` for platform-related state
     - `settingsStore` for UI/preferences such as theme-like settings
     - `slugfiy.ts` for slug/URL-related logic
   - These stores are the main shared state layer across routes and components.

7. **API/service layer**
   - `src/services/api.ts` is the central HTTP client boundary, likely wrapping Axios.
   - Feature service modules exist for:
     - `services/games`
     - `services/collectibles`
     - `services/Favorites`
     - `services/Authentications`
     - `services/Publishers`
   - `src/services/index.ts` and `src/services/types.ts` suggest a unified export/type layer.
   - The flow is: **view/component → store/service → backend API**.

8. **Filtering and search flow**
   - Filtering is handled by dedicated composables:
     - `useGamesFilterPanel.ts`
     - `useCollectiblesFilterPanel.ts`
   - These likely coordinate filter state, selected criteria, and query-building for the list pages.
   - Static option data in `src/datas/*.json` supports this flow:
     - genres
     - platforms
     - link/config data
   - This is a clear separation between UI filter state and the underlying data model.

9. **Forms and validation**
   - Form handling is centralized in `src/components/Forms` and `src/components/validators`.
   - The validator components (`FormField`, `SelectField`, `RadioField`, `CheckBoxField`, `UploadField`, `MapPicker`, `MessagePanel`) indicate a reusable form-field system.
   - The README’s stack implies **VeeValidate + Yup** are used for schema-based validation, especially for auth/account forms.

10. **Presentation and loading states**
   - The app includes skeleton loaders (`SkeletonLoading`, `SkeletonLoadingCollectible`) for async fetch states.
   - `Card`, `List`, and the grid/wrapper components support multiple presentation modes.
   - `FavoriteButton` and `CollectibleTypeCard` are small interaction-heavy components that plug into the larger page layouts.

11. **Cross-cutting concerns**
   - `src/components/Header.vue` and related layout pieces likely handle global navigation and user-facing state.
   - The app supports responsive behavior, dark/light mode, and animated transitions as noted in the README.
   - These concerns are mostly UI-level and sit above the feature modules.

12. **Architectural summary**
   - The repo is best viewed as a **layered frontend**:
     - **Routes/views** decide which screen is active.
     - **Stores + services** manage application and remote data.
     - **Composable filter logic** controls list/search behavior.
     - **Reusable components** render games/collectibles/forms.
     - **Backend API** provides auth, favorites, publishers, and catalog data.

Main entry points: [`src/router/index.ts`](https://github.com/csabaprem03/vue/blob/main/src/router/index.ts) (Router), [`src/App.vue`](https://github.com/csabaprem03/vue/blob/main/src/App.vue) (App shell), [`src/views/Login.vue`](https://github.com/csabaprem03/vue/blob/main/src/views/Login.vue) (Auth views), [`src/views/Game.vue`](https://github.com/csabaprem03/vue/blob/main/src/views/Game.vue) (Catalog views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_app["App shell"]
  node_node_main["Entry<br/>bootstrap<br/>[main.ts]"]
  node_node_app["App shell<br/>layout<br/>[App.vue]"]
  node_node_layout["Header/Main/Footer<br/>shell<br/>[Header.vue]"]
end

subgraph group_group_routes["Routing"]
  node_node_router["Router<br/>navigation<br/>[index.ts]"]
  node_node_views_auth["Auth views<br/>screens<br/>[Login.vue]"]
  node_node_views_catalog["Catalog views<br/>screens<br/>[Game.vue]"]
  node_node_views_detail["Detail views<br/>screens<br/>[GameView.vue]"]
  node_node_view_notfound["Not found<br/>fallback view<br/>[NotFound.vue]"]
end

subgraph group_group_features["Feature UI"]
  node_node_game_ui["Game UI<br/>feature set<br/>[GameGrid.vue]"]
  node_node_collectible_ui["Collectible UI<br/>feature set"]
  node_node_domain_game["Game details<br/>domain components<br/>[GameDetails.vue]"]
  node_node_domain_collectible["Collectible details<br/>domain components"]
  node_node_filters["Filter panel<br/>filter composables"]
end

subgraph group_group_state["State"]
  node_node_stores_auth["Auth store<br/>pinia store<br/>[authStore.ts]"]
  node_node_stores_fav["Favorites store<br/>pinia store<br/>[favoriteStore.ts]"]
  node_node_stores_catalog["Catalog stores<br/>pinia stores<br/>[gamesStore.ts]"]
end

subgraph group_group_services["Services"]
  node_node_api["API client<br/>http boundary<br/>[api.ts]"]
  node_node_services_catalog["Catalog services<br/>service modules<br/>[index.ts]"]
  node_node_services_account["Account services<br/>service modules<br/>[index.ts]"]
end

subgraph group_group_forms["Forms"]
  node_node_forms["Form fields<br/>form kit<br/>[FormField.vue]"]
end

subgraph group_group_data["Static data"]
  node_node_options["Option data<br/>static json<br/>[genreOptions.json]"]
end

node_node_main -->|"boots"| node_node_app
node_node_app -->|"uses"| node_node_layout
node_node_app -->|"hosts"| node_node_router
node_node_router -->|"routes to"| node_node_views_auth
node_node_router -->|"routes to"| node_node_views_catalog
node_node_router -->|"routes to"| node_node_views_detail
node_node_router -->|"fallback"| node_node_view_notfound
node_node_views_auth -->|"renders"| node_node_forms
node_node_views_auth -->|"binds"| node_node_stores_auth
node_node_views_catalog -->|"assembles"| node_node_game_ui
node_node_views_catalog -->|"assembles"| node_node_collectible_ui
node_node_views_detail -->|"uses"| node_node_domain_game
node_node_views_detail -->|"uses"| node_node_domain_collectible
node_node_game_ui -->|"drives"| node_node_filters
node_node_collectible_ui -->|"drives"| node_node_filters
node_node_filters -->|"reads"| node_node_options
node_node_game_ui -->|"reads"| node_node_stores_catalog
node_node_collectible_ui -->|"reads"| node_node_stores_catalog
node_node_domain_game -->|"uses"| node_node_stores_fav
node_node_domain_collectible -->|"uses"| node_node_stores_fav
node_node_stores_auth -->|"calls"| node_node_services_account
node_node_stores_fav -->|"calls"| node_node_services_account
node_node_stores_catalog -->|"calls"| node_node_services_catalog
node_node_services_account -->|"uses"| node_node_api
node_node_services_catalog -->|"uses"| node_node_api

click node_node_main "https://github.com/csabaprem03/vue/blob/main/src/main.ts"
click node_node_app "https://github.com/csabaprem03/vue/blob/main/src/App.vue"
click node_node_layout "https://github.com/csabaprem03/vue/blob/main/src/components/Header.vue"
click node_node_router "https://github.com/csabaprem03/vue/blob/main/src/router/index.ts"
click node_node_views_auth "https://github.com/csabaprem03/vue/blob/main/src/views/Login.vue"
click node_node_views_catalog "https://github.com/csabaprem03/vue/blob/main/src/views/Game.vue"
click node_node_views_detail "https://github.com/csabaprem03/vue/blob/main/src/views/GameView.vue"
click node_node_view_notfound "https://github.com/csabaprem03/vue/blob/main/src/components/pages/NotFound.vue"
click node_node_game_ui "https://github.com/csabaprem03/vue/blob/main/src/components/pages/GameGrid.vue"
click node_node_collectible_ui "https://github.com/csabaprem03/vue/blob/main/src/components/pages/CollectibleGrid.vue"
click node_node_domain_game "https://github.com/csabaprem03/vue/blob/main/src/components/domains/GameDetails.vue"
click node_node_domain_collectible "https://github.com/csabaprem03/vue/blob/main/src/components/domains/CollectibleDetails.vue"
click node_node_filters "https://github.com/csabaprem03/vue/blob/main/src/components/composables/useGamesFilterPanel.ts"
click node_node_forms "https://github.com/csabaprem03/vue/blob/main/src/components/validators/FormField.vue"
click node_node_stores_auth "https://github.com/csabaprem03/vue/blob/main/src/stores/authStore.ts"
click node_node_stores_fav "https://github.com/csabaprem03/vue/blob/main/src/stores/favoriteStore.ts"
click node_node_stores_catalog "https://github.com/csabaprem03/vue/blob/main/src/stores/gamesStore.ts"
click node_node_api "https://github.com/csabaprem03/vue/blob/main/src/services/api.ts"
click node_node_services_catalog "https://github.com/csabaprem03/vue/blob/main/src/services/games/index.ts"
click node_node_services_account "https://github.com/csabaprem03/vue/blob/main/src/services/Authentications/index.ts"
click node_node_options "https://github.com/csabaprem03/vue/blob/main/src/datas/genreOptions.json"

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_node_main,node_node_app,node_node_layout,node_node_options toneBlue
class node_node_router,node_node_views_auth,node_node_views_catalog,node_node_views_detail,node_node_view_notfound toneAmber
class node_node_game_ui,node_node_collectible_ui,node_node_domain_game,node_node_domain_collectible,node_node_filters toneMint
class node_node_stores_auth,node_node_stores_fav,node_node_stores_catalog toneRose
class node_node_api,node_node_services_catalog,node_node_services_account toneIndigo
class node_node_forms toneTeal
```

## Components

### App shell

Bootstrap and persistent layout.

- [Entry](https://github.com/csabaprem03/vue/blob/main/src/main.ts): bootstrap · Vue app startup and plugin mounting. · `src/main.ts`
- [App shell](https://github.com/csabaprem03/vue/blob/main/src/App.vue): layout · Top-level composition root. · `src/App.vue`
- [Header/Main/Footer](https://github.com/csabaprem03/vue/blob/main/src/components/Header.vue): shell · Persistent layout frame around routed content. · `src/components/Header.vue`

### Routing

Route-level screens and navigation boundary.

- [Router](https://github.com/csabaprem03/vue/blob/main/src/router/index.ts): navigation · Route definitions and screen boundary. · `src/router/index.ts`
- [Auth views](https://github.com/csabaprem03/vue/blob/main/src/views/Login.vue): screens · Login, register, and account screens. · `src/views/Login.vue`
- [Catalog views](https://github.com/csabaprem03/vue/blob/main/src/views/Game.vue): screens · Game and collectible route screens. · `src/views/Game.vue`
- [Detail views](https://github.com/csabaprem03/vue/blob/main/src/views/GameView.vue): screens · Single-item route screens for games and collectibles. · `src/views/GameView.vue`
- [Not found](https://github.com/csabaprem03/vue/blob/main/src/components/pages/NotFound.vue): fallback view · Router fallback screen. · `src/components/pages/NotFound.vue`

### Feature UI

Reusable page and domain components for games and collectibles.

- [Game UI](https://github.com/csabaprem03/vue/blob/main/src/components/pages/GameGrid.vue): feature set · List, grid, wrapper, card, filter, and post components for games. · `src/components/pages/GameGrid.vue`
- [Collectible UI](https://github.com/csabaprem03/vue/blob/main/src/components/pages/CollectibleGrid.vue): feature set · List, grid, wrapper, filter, and post components for collectibles. · `src/components/pages/CollectibleGrid.vue`
- [Game details](https://github.com/csabaprem03/vue/blob/main/src/components/domains/GameDetails.vue): domain components · Game-specific detail and favorite presentation. · `src/components/domains/GameDetails.vue`
- [Collectible details](https://github.com/csabaprem03/vue/blob/main/src/components/domains/CollectibleDetails.vue): domain components · Collectible-specific detail and type presentation. · `src/components/domains/CollectibleDetails.vue`
- [Filter panel](https://github.com/csabaprem03/vue/blob/main/src/components/composables/useGamesFilterPanel.ts): filter composables · Filter state and query coordination for lists. · `src/components/composables/useGamesFilterPanel.ts`

### State

Pinia stores and shared client state.

- [Auth store](https://github.com/csabaprem03/vue/blob/main/src/stores/authStore.ts): pinia store · Session and login state. · `src/stores/authStore.ts`
- [Favorites store](https://github.com/csabaprem03/vue/blob/main/src/stores/favoriteStore.ts): pinia store · Saved items state. · `src/stores/favoriteStore.ts`
- [Catalog stores](https://github.com/csabaprem03/vue/blob/main/src/stores/gamesStore.ts): pinia stores · Games, publishers, platforms, settings, and slug state. · `src/stores/gamesStore.ts`

### Services

HTTP client and backend-facing service modules.

- [API client](https://github.com/csabaprem03/vue/blob/main/src/services/api.ts): http boundary · Shared HTTP client wrapper. · `src/services/api.ts`
- [Catalog services](https://github.com/csabaprem03/vue/blob/main/src/services/games/index.ts): service modules · Game and collectible backend calls. · `src/services/games/index.ts`
- [Account services](https://github.com/csabaprem03/vue/blob/main/src/services/Authentications/index.ts): service modules · Auth, favorites, and publisher backend calls. · `src/services/Authentications/index.ts`

### Forms

Reusable form fields and validation UI.

- [Form fields](https://github.com/csabaprem03/vue/blob/main/src/components/validators/FormField.vue): form kit · Reusable validated input controls and messages. · `src/components/validators/FormField.vue`

### Static data

JSON-backed option data for filters and links.

- [Option data](https://github.com/csabaprem03/vue/blob/main/src/datas/genreOptions.json): static json · Genres, platforms, and link/config data. · `src/datas/genreOptions.json`

## Connections

- Entry → App shell: boots · Client entry mounts the Vue application.
- App shell → Header/Main/Footer: uses · App composes the persistent shell.
- App shell → Router: hosts · Router swaps the active screen inside the shell.
- Router → Auth views: routes to · Authentication and account screens.
- Router → Catalog views: routes to · Catalog-level game and collectible screens.
- Router → Detail views: routes to · Single-item detail screens.
- Router → Not found: fallback · Unknown routes resolve here.
- Auth views → Form fields: renders · Auth screens use reusable validated fields.
- Auth views → Auth store: binds · Login and account state flow through auth store.
- Catalog views → Game UI: assembles · Game list pages compose shared game UI pieces.
- Catalog views → Collectible UI: assembles · Collectible list pages compose shared collectible UI pieces.
- Detail views → Game details: uses · Game detail route renders game-specific components.
- Detail views → Collectible details: uses · Collectible detail route renders collectible-specific components.
- Game UI → Filter panel: drives · Game lists coordinate filtering and search.
- Collectible UI → Filter panel: drives · Collectible lists coordinate filtering and search.
- Filter panel → Option data: reads · Filter choices come from static option data.
- Game UI → Catalog stores: reads · Game listing state comes from catalog stores.
- Collectible UI → Catalog stores: reads · Collectible listing state comes from catalog stores.
- Game details → Favorites store: uses · Favorite actions update saved-items state.
- Collectible details → Favorites store: uses · Favorite actions update saved-items state.
- Auth store → Account services: calls · Auth store delegates to account services.
- Favorites store → Account services: calls · Favorites store delegates to favorites service.
- Catalog stores → Catalog services: calls · Catalog stores delegate to game and collectible services.
- Account services → API client: uses · Backend modules share the HTTP client.
- Catalog services → API client: uses · Backend modules share the HTTP client.
