# s-k-hasan/mosquito-apocalypse_-bangladesh-edition architecture

> Architecture diagram of the GitHub repository s-k-hasan/mosquito-apocalypse_-bangladesh-edition, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition
- Repository: https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition

## Overview

This is a browser-based 3D survival game, Mosquito Apocalypse: Bangladesh Edition. Players choose a level, navigate and fight mosquito waves and bosses, complete objectives, and reach victory or game-over screens; progress and settings are saved locally. App coordinates the interface and game state, while GameCanvas runs the 3D gameplay. The graph includes the indexed rendering, level, audio, input, and persistence modules. Relationships are limited to those shown in the excerpts or SOURCE INDEX; unsampled implementations are represented by their indexed paths, not inferred behavior.

Main entry points: [`src/App.tsx`](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/App.tsx) (Game Coordinator), [`src/components/GameCanvas.tsx`](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/GameCanvas.tsx) (3D Game Canvas), [`src/components/MainMenu.tsx`](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/MainMenu.tsx) (Main Menu), [`src/levels/environmentBuilder.ts`](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/levels/environmentBuilder.ts) (Environment Builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Game Experience"]
  node_app["Game Coordinator<br/>[App.tsx]"]
  node_menu["Main Menu<br/>[MainMenu.tsx]"]
  node_canvas["3D Game Canvas<br/>[GameCanvas.tsx]"]
  node_hud["Game HUD<br/>[HUD.tsx]"]
  node_mobile["Touch Controls<br/>[MobileControls.tsx]"]
  node_modals["Game Screens<br/>[ModalScreens.tsx]"]
  node_fullscreen["Fullscreen Control"]
end

subgraph group_world["Levels and Rendering"]
  node_levels["Level Definitions<br/>[levelData.ts]"]
  node_environment["Environment Builder"]
  node_models["World Models<br/>[models.ts]"]
  node_props["Prop Models<br/>[propModels.ts]"]
  node_art["Art and Materials<br/>[artSystem.ts]"]
  node_bossmodels["Boss Models<br/>[bossModels.ts]"]
  node_lighting["Lighting Presets<br/>[lightingPresets.ts]"]
  node_atmosphere["Atmosphere<br/>[atmosphere.ts]"]
  node_optimizer["Scene Optimizer<br/>[sceneOptimizer.ts]"]
end

subgraph group_gameplay["Gameplay Systems"]
  node_weapons["Weapon System<br/>[weapons.ts]"]
  node_particles["Combat Effects<br/>[particles.ts]"]
end

subgraph group_support["State and Feedback"]
  node_save[("Save System<br/>[save.ts]")]
  node_audio["Sound System<br/>[audio.ts]"]
  node_voices["Voice Manager<br/>[voiceManager.ts]"]
  node_types["Game Data Types<br/>[game.ts]"]
  node_device["Device Detection<br/>[device.ts]"]
end

node_player(("Player"))

node_player -->|"chooses level"| node_menu
node_app -->|"renders"| node_menu
node_app -->|"renders"| node_canvas
node_app -->|"renders"| node_hud
node_app -->|"renders"| node_mobile
node_app -->|"renders"| node_modals
node_app -->|"loads progress"| node_save
node_app -->|"reads levels"| node_levels
node_app -->|"initializes audio"| node_audio
node_app -->|"uses voice lines"| node_voices
node_menu -->|"lists levels"| node_levels
node_menu -->|"renders"| node_fullscreen
node_canvas -->|"builds scene"| node_environment
node_canvas -->|"creates models"| node_models
node_canvas -->|"applies lighting"| node_lighting
node_canvas -->|"uses atmosphere"| node_atmosphere
node_canvas -->|"uses optimizer"| node_optimizer
node_canvas -->|"uses weapons"| node_weapons
node_canvas -->|"emits effects"| node_particles
node_canvas -->|"triggers events"| node_voices
node_environment -->|"creates scenery"| node_models
node_environment -->|"creates props"| node_props
node_environment -->|"uses materials"| node_art
node_models -->|"uses materials"| node_art
node_models -->|"uses boss models"| node_bossmodels
node_props -->|"uses materials"| node_art
node_voices -->|"plays audio"| node_audio
node_hud -->|"detects device"| node_device
node_mobile -->|"detects device"| node_device
node_fullscreen -->|"appears in"| node_menu
node_levels -->|"uses level types"| node_types
node_save -->|"uses game types"| node_types
node_weapons -->|"uses game types"| node_types

click node_app "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/App.tsx"
click node_menu "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/MainMenu.tsx"
click node_canvas "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/GameCanvas.tsx"
click node_hud "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/HUD.tsx"
click node_mobile "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/MobileControls.tsx"
click node_modals "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/ModalScreens.tsx"
click node_fullscreen "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/FullscreenButton.tsx"
click node_levels "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/levels/levelData.ts"
click node_environment "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/levels/environmentBuilder.ts"
click node_models "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/models.ts"
click node_props "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/propModels.ts"
click node_art "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/artSystem.ts"
click node_bossmodels "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/bossModels.ts"
click node_lighting "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/lightingPresets.ts"
click node_atmosphere "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/atmosphere.ts"
click node_optimizer "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/sceneOptimizer.ts"
click node_weapons "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/weapons.ts"
click node_particles "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/particles.ts"
click node_save "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/save.ts"
click node_audio "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/audio.ts"
click node_voices "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/voiceManager.ts"
click node_types "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/types/game.ts"
click node_device "https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/utils/device.ts"

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_app,node_menu,node_canvas,node_hud,node_mobile,node_modals,node_fullscreen toneBlue
class node_levels,node_environment,node_models,node_props,node_art,node_bossmodels,node_lighting,node_atmosphere,node_optimizer toneAmber
class node_weapons,node_particles toneMint
class node_save,node_audio,node_voices,node_types,node_device toneRose
class node_player toneIndigo
```

## Components

### Game Experience

- [Game Coordinator](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/App.tsx): `src/App.tsx`
- [Main Menu](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/MainMenu.tsx): `src/components/MainMenu.tsx`
- [3D Game Canvas](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/GameCanvas.tsx): `src/components/GameCanvas.tsx`
- [Game HUD](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/HUD.tsx): `src/components/HUD.tsx`
- [Touch Controls](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/MobileControls.tsx): `src/components/MobileControls.tsx`
- [Game Screens](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/ModalScreens.tsx): `src/components/ModalScreens.tsx`
- [Fullscreen Control](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/components/FullscreenButton.tsx): `src/components/FullscreenButton.tsx`

### Levels and Rendering

- [Level Definitions](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/levels/levelData.ts): `src/levels/levelData.ts`
- [Environment Builder](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/levels/environmentBuilder.ts): `src/levels/environmentBuilder.ts`
- [World Models](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/models.ts): `src/systems/models.ts`
- [Prop Models](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/propModels.ts): `src/systems/propModels.ts`
- [Art and Materials](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/artSystem.ts): `src/systems/artSystem.ts`
- [Boss Models](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/bossModels.ts): `src/systems/bossModels.ts`
- [Lighting Presets](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/lightingPresets.ts): `src/systems/lightingPresets.ts`
- [Atmosphere](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/atmosphere.ts): `src/systems/atmosphere.ts`
- [Scene Optimizer](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/sceneOptimizer.ts): `src/systems/sceneOptimizer.ts`

### Gameplay Systems

- [Weapon System](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/weapons.ts): `src/systems/weapons.ts`
- [Combat Effects](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/particles.ts): `src/systems/particles.ts`

### State and Feedback

- [Save System](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/save.ts): `src/systems/save.ts`
- [Sound System](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/audio.ts): `src/systems/audio.ts`
- [Voice Manager](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/systems/voiceManager.ts): `src/systems/voiceManager.ts`
- [Game Data Types](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/types/game.ts): `src/types/game.ts`
- [Device Detection](https://github.com/s-k-hasan/mosquito-apocalypse_-bangladesh-edition/blob/master/src/utils/device.ts): `src/utils/device.ts`

### Other components

- **Player**

## Connections

- Player → Main Menu: chooses level (evidence: `src/components/MainMenu.tsx`)
- Game Coordinator → Main Menu: renders (evidence: `src/App.tsx`)
- Game Coordinator → 3D Game Canvas: renders (evidence: `src/App.tsx`)
- Game Coordinator → Game HUD: renders (evidence: `src/App.tsx`)
- Game Coordinator → Touch Controls: renders (evidence: `src/App.tsx`)
- Game Coordinator → Game Screens: renders (evidence: `src/App.tsx`)
- Game Coordinator → Save System: loads progress (evidence: `src/App.tsx`)
- Game Coordinator → Level Definitions: reads levels (evidence: `src/App.tsx`)
- Game Coordinator → Sound System: initializes audio (evidence: `src/App.tsx`)
- Game Coordinator → Voice Manager: uses voice lines (evidence: `src/App.tsx`)
- Main Menu → Level Definitions: lists levels (evidence: `src/components/MainMenu.tsx`)
- Main Menu → Fullscreen Control: renders (evidence: `src/components/MainMenu.tsx`)
- 3D Game Canvas → Environment Builder: builds scene (evidence: `src/components/GameCanvas.tsx`)
- 3D Game Canvas → World Models: creates models (evidence: `src/components/GameCanvas.tsx`)
- 3D Game Canvas → Lighting Presets: applies lighting (evidence: `src/components/GameCanvas.tsx`)
- 3D Game Canvas → Atmosphere: uses atmosphere (evidence: `src/components/GameCanvas.tsx`)
- 3D Game Canvas → Scene Optimizer: uses optimizer (evidence: `src/components/GameCanvas.tsx`)
- 3D Game Canvas → Weapon System: uses weapons (evidence: `src/components/GameCanvas.tsx`)
- 3D Game Canvas → Combat Effects: emits effects (evidence: `src/components/GameCanvas.tsx`)
- 3D Game Canvas → Voice Manager: triggers events (evidence: `src/components/GameCanvas.tsx`)
- Environment Builder → World Models: creates scenery (evidence: `src/levels/environmentBuilder.ts`)
- Environment Builder → Prop Models: creates props (evidence: `src/levels/environmentBuilder.ts`)
- Environment Builder → Art and Materials: uses materials (evidence: `src/levels/environmentBuilder.ts`)
- World Models → Art and Materials: uses materials (evidence: `src/systems/models.ts`)
- World Models → Boss Models: uses boss models (evidence: `src/systems/models.ts`)
- Prop Models → Art and Materials: uses materials (evidence: `src/systems/propModels.ts`)
- Voice Manager → Sound System: plays audio (evidence: `src/systems/voiceManager.ts`)
- Game HUD → Device Detection: detects device (evidence: `src/components/HUD.tsx`)
- Touch Controls → Device Detection: detects device (evidence: `src/components/MobileControls.tsx`)
- Fullscreen Control → Main Menu: appears in (evidence: `src/components/FullscreenButton.tsx`)
- Level Definitions → Game Data Types: uses level types (evidence: `src/levels/levelData.ts`)
- Save System → Game Data Types: uses game types (evidence: `src/systems/save.ts`)
- Weapon System → Game Data Types: uses game types (evidence: `src/systems/weapons.ts`)
