# ainize-team/javascript-tetris architecture

> Architecture diagram of the GitHub repository ainize-team/javascript-tetris, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ainize-team/javascript-tetris
- Repository: https://github.com/ainize-team/javascript-tetris

## Overview

This repository packages a browser-based HTML5 Tetris game for deployment as a static site. The principal workflow is a player opening the deployed page and playing in a supported browser. The README documents serving the `www` directory with Nginx on port 80; `stats.js` is a separate browser performance-display utility. The HTML page and Nginx configuration are present in the tree but were not sampled, so their implementation details and wiring to the stats utility are not asserted.

Main entry points: [`www/index.html`](https://github.com/ainize-team/javascript-tetris/blob/master/www/index.html) (Tetris page), [`nginx.conf`](https://github.com/ainize-team/javascript-tetris/blob/master/nginx.conf) (Nginx server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Browser game"]
  node_game_page["Tetris page<br/>[index.html]"]
end

subgraph group_hosting["Static hosting"]
  node_nginx["Nginx server<br/>[nginx.conf]"]
end

subgraph group_monitoring["Performance display"]
  node_stats["Stats monitor<br/>[stats.js]"]
end

node_player(("Player"))

node_player -->|"plays"| node_game_page
node_nginx -->|"serves static files"| node_game_page

click node_game_page "https://github.com/ainize-team/javascript-tetris/blob/master/www/index.html"
click node_nginx "https://github.com/ainize-team/javascript-tetris/blob/master/nginx.conf"
click node_stats "https://github.com/ainize-team/javascript-tetris/blob/master/www/stats.js"

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_game_page toneBlue
class node_nginx toneAmber
class node_stats toneMint
class node_player toneIndigo
```

## Components

### Browser game

- [Tetris page](https://github.com/ainize-team/javascript-tetris/blob/master/www/index.html): `www/index.html`

### Static hosting

- [Nginx server](https://github.com/ainize-team/javascript-tetris/blob/master/nginx.conf): `nginx.conf`

### Performance display

- [Stats monitor](https://github.com/ainize-team/javascript-tetris/blob/master/www/stats.js): `www/stats.js`

### Other components

- **Player**

## Connections

- Player → Tetris page: plays (evidence: `README.md`)
- Nginx server → Tetris page: serves static files (evidence: `README.md`)
