How csabaprem03/vue works
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: index.ts Router · App.vue App shell · Login.vue Auth views · Game.vue Catalog views
Components 21
App shell
Bootstrap and persistent layout.
- Entry · Vue app startup and plugin mounting.
src/main.ts - App shell · Top-level composition root.
src/App.vue - Header/Main/Footer · Persistent layout frame around routed content.
src/components/Header.vue
Routing
Route-level screens and navigation boundary.
- Router · Route definitions and screen boundary.
src/router/index.ts - Auth views · Login, register, and account screens.
src/views/Login.vue - Catalog views · Game and collectible route screens.
src/views/Game.vue - Detail views · Single-item route screens for games and collectibles.
src/views/GameView.vue - Not found · Router fallback screen.
src/components/pages/NotFound.vue
Feature UI
Reusable page and domain components for games and collectibles.
- Game UI · List, grid, wrapper, card, filter, and post components for games.
src/components/pages/GameGrid.vue - Collectible UI · List, grid, wrapper, filter, and post components for collectibles.
src/components/pages/CollectibleGrid.vue - Game details · Game-specific detail and favorite presentation.
src/components/domains/GameDetails.vue - Collectible details · Collectible-specific detail and type presentation.
src/components/domains/CollectibleDetails.vue - Filter panel · Filter state and query coordination for lists.
src/components/composables/useGamesFilterPanel.ts
State
Pinia stores and shared client state.
- Auth store · Session and login state.
src/stores/authStore.ts - Favorites store · Saved items state.
src/stores/favoriteStore.ts - Catalog stores · Games, publishers, platforms, settings, and slug state.
src/stores/gamesStore.ts
Services
HTTP client and backend-facing service modules.
- API client · Shared HTTP client wrapper.
src/services/api.ts - Catalog services · Game and collectible backend calls.
src/services/games/index.ts - Account services · Auth, favorites, and publisher backend calls.
src/services/Authentications/index.ts
Forms
Reusable form fields and validation UI.
- Form fields · Reusable validated input controls and messages.
src/components/validators/FormField.vue
Static data
JSON-backed option data for filters and links.
- Option data · Genres, platforms, and link/config data.
src/datas/genreOptions.json
Connections 25
- 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.