# goodboydigital/vibe-games architecture

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

- Interactive diagram: https://gitdiagram.com/goodboydigital/vibe-games
- Repository: https://github.com/goodboydigital/vibe-games

## Overview

Based on your provided file tree and README, it looks like the project (“vibe-games”) is a front-end collection of HTML5 browser-based games. There isn’t any indication of server-side components, so the entire architecture is based on client-side assets served via static HTML and JavaScript. One of the games (“play school walking sim”) is highlighted in the README alongside several other games (break-out, double-or-nothing, lama-run) that share a very similar structure.

##### Main Components
- Landing Page – There is a top-level index.html; this likely serves as a hub or entry point that may link to the individual games.
- Game Modules – Each subdirectory (break-out, double-or-nothing, lama-run, play-school) represents a separate game. Each game module contains its own index.html and an assets folder that holds the primary JavaScript file (with fingerprinted names indicating a build/bundle process).
- Shared Elements – Even though there isn’t a common “shared” folder or library, note that the consistent structure across modules suggests a standardized approach that might be leveraged or extended with shared design patterns in the future.

##### Out the Relationships and Interactions
- Although not explicitly shown, consider if there might be any shared dependencies or build processes (e.g., caching strategies using fingerprinted JS file names) and note these concepts in a brief annotation.

##### Architectural Patterns and Design Principles
- Modular Architecture – Each game is self-contained, making it easy to add, remove, or update games independently.
- Client-Side Rendering – The games are built using HTML and JavaScript, emphasizing a “static site” approach with assets likely precompiled for production (as evidenced by the hashed file names).
- Scalability and Maintainability – The uniform structure across modules makes it easy to scale the number of games, each acting as a separate “service” within the overall vibe-games ecosystem.

##### Elements
- Clear labels – Each major component such as “Landing Page”, “Break-Out Game”, “Double-Or-Nothing Game”, “Lama-Run Game”, and “Play School Walking Sim” should be clearly labeled.

## Diagram (Mermaid)

```mermaid
flowchart TD
    L["Landing Page"]:::landing

    subgraph "Break-Out Game Module"
        direction TB
        B["Break-Out Game Page"]:::game
        BA["Break-Out JS Bundle"]:::asset
        B -->|"loads"| BA
    end

    subgraph "Double-Or-Nothing Game Module"
        direction TB
        D1["Double-Or-Nothing Game Page"]:::game
        D2["Double-Or-Nothing JS Bundle"]:::asset
        D1 -->|"loads"| D2
    end

    subgraph "Lama-Run Game Module"
        direction TB
        LR1["Lama-Run Game Page"]:::game
        LR2["Lama-Run JS Bundle"]:::asset
        LR1 -->|"loads"| LR2
    end

    subgraph "Play School Walking Sim Module"
        direction TB
        PS1["Play School Walking Sim Game Page"]:::game
        PS2["Play School JS Bundle"]:::asset
        PS1 -->|"loads"| PS2
    end

    L -->|"navigates"| B
    L -->|"navigates"| D1
    L -->|"navigates"| LR1
    L -->|"navigates"| PS1

    classDef landing fill:#ffcc00,stroke:#333,stroke-width:2px;
    classDef game fill:#33ccff,stroke:#333,stroke-width:2px;
    classDef asset fill:#ccffcc,stroke:#333,stroke-width:2px;

    click L "https://github.com/goodboydigital/vibe-games/blob/main//index.html"
    click B "https://github.com/goodboydigital/vibe-games/blob/main//break-out/index.html"
    click BA "https://github.com/goodboydigital/vibe-games/blob/main//break-out/assets/index-7ce302c1.js"
    click D1 "https://github.com/goodboydigital/vibe-games/blob/main//double-or-nothing/index.html"
    click D2 "https://github.com/goodboydigital/vibe-games/blob/main//double-or-nothing/assets/index-ff2422e4.js"
    click LR1 "https://github.com/goodboydigital/vibe-games/blob/main//lama-run/index.html"
    click LR2 "https://github.com/goodboydigital/vibe-games/blob/main//lama-run/assets/index-c4f41a95.js"
    click PS1 "https://github.com/goodboydigital/vibe-games/blob/main//play-school/index.html"
    click PS2 "https://github.com/goodboydigital/vibe-games/blob/main//play-school/assets/index-Jw0COpCE.js"
```
