# droxus/shooter architecture

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

- Interactive diagram: https://gitdiagram.com/droxus/shooter
- Repository: https://github.com/droxus/shooter

## Overview

##### Project type and purpose
- From the README (“Shooter – This is just a game…”) and the presence of scene.gltf/scene.bin assets, this is a browser-based 3D shooter game built with TypeScript and a bundler (Vite).

##### File structure
- Top-level:
– index.html & public/ : the static web entrypoint and static asset hosting (models, textures).
– src/ : client-side TypeScript code (main.ts) and CSS.
– vite.config.js, tsconfig.json, package.json : build & dependency configuration
– docs/ : generated documentation or demo site with the same assets duplicated for docs hosting.

##### README for additional insights
- Minimal description; no explicit architecture section. We infer the tech stack from config files:
– Vite as dev/build server
– TypeScript for game logic
– GLTF 3D scenes (likely loaded via three.js or similar)

##### Elements
– Labels: “Vite Dev & Build”, “Static Asset Server”, “Browser Runtime”, “Asset Loader”, “Game Engine Core”, “Renderer”, “Input Manager”, “UI Layer”
- Build → Bundle → Browser
- Browser → Asset Server → Loader → Engine/Renderer
- Input → Game Loop → Scene Manager → Renderer
- Runtime components in another
- Data stores (GLTF/texture files) in a third

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Build Pipeline"
        pkg["package.json"]:::config
        ts["tsconfig.json"]:::config
        vite["Vite Dev & Build"]:::buildTime
        bundle["Bundle (JS/CSS)"]:::buildTime
        pkg --> vite
        ts --> vite
        vite --> bundle
    end

    subgraph "Assets & Hosting"
        public["Static Asset Host"]:::dataStore
        docs["Docs / Demo Hosting"]:::dataStore
        bundle --> docs
    end

    subgraph "Browser Runtime"
        index["Browser Entrypoint (index.html)"]:::runtime
        srcCode["Client Code (src/)"]:::runtime
        loader["Asset Loader"]:::runtime
        engine["Game Engine Core"]:::runtime
        renderer["Renderer (WebGL)"]:::runtime
        input["Input Manager"]:::runtime
        ui["UI Layer"]:::runtime
        bundle --> index
        index --> srcCode
        index --> loader
        public --> loader
        loader --> engine
        input --> engine
        engine --> renderer
        engine --> ui
    end

    click vite "https://github.com/droxus/shooter/blob/main/vite.config.js"
    click pkg "https://github.com/droxus/shooter/blob/main/package.json"
    click ts "https://github.com/droxus/shooter/blob/main/tsconfig.json"
    click public "https://github.com/droxus/shooter/tree/main/public/assets/"
    click index "https://github.com/droxus/shooter/blob/main/index.html"
    click docs "https://github.com/droxus/shooter/tree/main/docs/"
    click srcCode "https://github.com/droxus/shooter/tree/main/src/"
    click loader "https://github.com/droxus/shooter/blob/main/src/main.ts"
    click engine "https://github.com/droxus/shooter/blob/main/src/main.ts"
    click renderer "https://github.com/droxus/shooter/blob/main/src/main.ts"
    click input "https://github.com/droxus/shooter/blob/main/src/main.ts"
    click ui "https://github.com/droxus/shooter/blob/main/src/style.css"

    classDef buildTime fill:#e0f7fa,stroke:#333,stroke-width:1px
    classDef dataStore fill:#fff9c4,stroke:#333,stroke-width:1px
    classDef runtime fill:#c8e6c9,stroke:#333,stroke-width:1px
    classDef config fill:#ffe0b2,stroke:#333,stroke-width:1px
```
