How ivantrujillotech/fuggler-frenzy works
1. What this repo is
- Fuggler Frenzy is a client-side Vue 3 game SPA built with Vite.
- The app is organized around a central game loop: manage resources, buy units, place them on a board, and consult a compendium of units/items.
2. App bootstrap and shell
- index.html is the Vite entry page.
- src/main.js boots Vue, mounts the root app, and wires in the router and global state.
- src/App.vue is the top-level shell, likely hosting the route outlet and shared layout/styling.
3. Routing splits the product into three screens
- src/router/index.js separates the app into:
- LandingView.vue for the start/menu screen,
- GameView.vue for active gameplay,
- PediaView.vue for the encyclopedia/compendium.
- This is a single-page app with route-based screen switching rather than separate pages or services.
4. Central game state is the core boundary
- src/stores/gameStore.js is the main orchestrator.
- It likely owns the authoritative state for:
- gold and rerolls,
- shop inventory,
- player bench,
- board placement,
- round/combat progression.
- Most gameplay components should read from and write to this store rather than holding duplicated local state.
5. Gameplay view composition
- src/views/GameView.vue is the main arena and composes the battle/shop UI.
- The visible gameplay is split into two major panels:
- BoardArea.vue for placement/combat board interactions,
- ShopArea.vue for buying and refreshing available Fugglers.
- This view is the main consumer of the game store.
6. Board and unit subsystem
- src/components/BoardArea.vue appears to represent the tactical board and bench management area.
- src/components/FugglerUnit.vue is the unit card/token used on the board and/or bench.
- The README indicates drag-and-drop placement, so this subsystem is the interaction boundary between rendered unit state and board slots.
- The board enforces gameplay constraints such as maximum active units and valid placement.
7. Shop and economy subsystem
- src/components/ShopArea.vue is the purchasing interface.
- It likely displays generated shop units, purchase actions, and the reroll mechanic.
- The flow is: store exposes current shop state → ShopArea renders options → player action updates the store → board/bench state changes.
8. Compendium and metadata subsystem
- src/views/PediaView.vue provides a reference screen for game knowledge.
- src/data/fugglerPedia.js and src/data/items.js are the static content sources for Fugglers, items, and likely combo/upgrade descriptions.
- FugglerTooltip.vue and ItemTooltip.vue are used to surface detailed metadata without leaving the page.
9. Visual assets and UI chrome
- src/assets/units and src/assets/HUD/** contain game art, unit imagery, and interface decorations.
- src/style.css provides the global visual system: custom layout, HUD treatment, and the game’s distinctive presentation.
- The repo uses CSS rather than a component library for the core look and feel.
10. Interaction and UX technologies
- The README explicitly calls out VueDraggable Pro for drag-and-drop unit movement.
- It also uses @floating-ui/vue for tooltips/popovers, which matters because compendium and item details are shown in overlays rather than inline panels.
- These libraries define the main interaction boundaries: draggable battlefield objects and hover/click metadata overlays.
11. Data flow to diagram
- Static content lives in src/data/*.
- gameStore turns that content into mutable game state.
- Views consume store state and delegate interaction to child components.
- Components emit actions back into the store, which then updates the rendered board/shop/tooltip views.
12. System boundary
- There is no backend or external API in the tree.
- This is a self-contained front-end game client: all gameplay logic, UI state, and reference data appear to live inside the Vue app.
- temp_backup/GDD.md is documentation/reference only, not part of the runtime architecture.
Main entry points: gameStore.js Game store · main.js Main boot · PediaView.vue Pedia view · index.js Router
Components 19
Shell
Bootstrapping and route shell
- Entry page · Vite entry document
index.html - Main boot · Mounts Vue app and wires runtime
src/main.js - App shell · Top-level layout and router outlet
src/App.vue - Router · Routes between screens
src/router/index.js - Landing · Start and menu screen
src/views/LandingView.vue - Global style · App-wide visual system
src/style.css
Gameplay
Core play loop and board/shop interaction
- Game view · Main gameplay screen
src/views/GameView.vue - Board area · Placement, combat, and bench interactions
src/components/BoardArea.vue - Shop area · Buy and reroll interface
src/components/ShopArea.vue - Unit card · Rendered Fuggler token/card
src/components/FugglerUnit.vue
Pedia
Compendium and metadata screens
- Pedia view · Compendium and reference screen
src/views/PediaView.vue - Fuggler tip · Metadata overlay for units
src/components/FugglerTooltip.vue - Item tip · Metadata overlay for items
src/components/ItemTooltip.vue
State
Central mutable game state and static data
- Game store · Authoritative gameplay state and actions
src/stores/gameStore.js - Fuggler data · Static unit and synergy metadata
src/data/fugglerPedia.js - Item data · Static item metadata
src/data/items.js
Assets
Artwork and HUD resources
- Game assets · HUD art and unit imagery
src/assets - Unit art · Unit imagery and sprites
src/assets/units - HUD art · Interface decoration and HUD resources
src/assets/HUD
Connections 27
- Entry page → Main boot: loads · HTML entry loads the app bootstrap
- Main boot → App shell: mounts · Vue app is mounted into the shell
- Main boot → Router: installs · Router is registered during bootstrap
- Main boot → Game store: installs · Global game state is wired at startup
- Main boot → Global style: imports · Global styles are applied at bootstrap
- App shell → Router: hosts · Shell provides the route outlet
- Router → Landing: routes to · Start screen route
- Router → Game view: routes to · Active play route
- Router → Pedia view: routes to · Reference screen route
- Game view → Board area: composes · Gameplay screen includes board interactions
- Game view → Shop area: composes · Gameplay screen includes shop interactions
- Game view → Game store: consumes · Reads and mutates core game state
- Board area → Unit card: renders · Board uses unit cards/tokens
- Board area → Game store: updates · Placement and bench actions flow to store
- Shop area → Game store: updates · Purchase and reroll actions flow to store
- Shop area → Unit card: renders · Shop displays available units
- Pedia view → Fuggler data: reads · Compendium data source for Fugglers
- Pedia view → Item data: reads · Compendium data source for items
- Pedia view → Fuggler tip: shows · Unit details are presented in overlays
- Pedia view → Item tip: shows · Item details are presented in overlays
- Game store → Fuggler data: derives from · Game state is informed by unit metadata
- Game store → Item data: derives from · Game state is informed by item metadata
- Unit card → Fuggler tip: reveals · Unit UI can surface detailed metadata
- Unit card → HUD art: uses art · Unit presentation relies on HUD styling and assets
- Global style → Game assets: styles · Global theme coordinates the visual asset system
- Game assets → Unit art: contains · Unit imagery subfolder
- Game assets → HUD art: contains · HUD imagery subfolder