# 033-gagan/sketch_it architecture

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

- Interactive diagram: https://gitdiagram.com/033-gagan/sketch_it
- Repository: https://github.com/033-gagan/sketch_it

## Overview

#### Purpose and entry points
Sketch_IT is a browser-based sketching/game experience, inferred from its game, result, drawing-script, and word-data assets. The server entry point is `server.js`; browser entry documents include `public/index.html`, `public/game.html`, and `public/result.html`.

#### Server and delivery boundary
`server.js` is the backend/runtime boundary and likely serves the browser application and coordinates any game-session behavior. Client-consumable assets are grouped under `public/`, establishing a static delivery boundary between Node.js server logic and browser code.

#### Browser page flow
The application is split into distinct HTML stages:
- Landing/start stage: `public/index.html`
- Active game stage: `public/game.html`
- Completion/results stage: `public/result.html`

This page separation suggests navigation-driven control flow rather than a single-page application.

#### Game client controller
`public/script.js` is the primary browser-side behavior layer and likely owns interaction handling, game progression, drawing input, timers, scoring, and transitions between the page stages. `public/style.css` provides the shared presentation layer for those views.

A root-level `script.js` also exists and may be an alternate, legacy, or server-adjacent client script; integration work should determine whether it duplicates or supersedes `public/script.js`.

#### Word/content source
`words.js` is the repository’s dedicated content/data boundary for words or prompts used by the game. The game controller should consume this source rather than embed prompt data directly in page markup, keeping game content separate from interaction logic.

#### Runtime and infrastructure
The repository is JavaScript/Node.js-based, with dependency/runtime metadata in `package.json` and lock resolution in `package-lock.json`. Browser execution depends on standard HTML, CSS, and JavaScript assets served from `public/`; no database, cloud platform, API, or external service is evidenced by the supplied tree.

#### Duplicate top-level pages
`game.html` exists alongside `public/game.html`, while `public/` also contains the canonical-looking page set. This is an important deployment boundary to verify: `server.js` may serve `public/`, making root-level HTML files unused or legacy. Any changes to page flow should first establish which copies are active.

Main entry points: [`public/game.html`](https://github.com/033-gagan/sketch_it/blob/main/public/game.html) (Game page), [`public/script.js`](https://github.com/033-gagan/sketch_it/blob/main/public/script.js) (Game controller), [`public/index.html`](https://github.com/033-gagan/sketch_it/blob/main/public/index.html) (Landing page), [`public/result.html`](https://github.com/033-gagan/sketch_it/blob/main/public/result.html) (Results page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_server["Node runtime"]
  node_package["Package metadata<br/>Node manifest<br/>[package.json]"]
  node_lockfile["Dependency lock<br/>npm lockfile<br/>[package-lock.json]"]
  node_server_entry["Server entry<br/>Node.js server<br/>[server.js]"]
end

subgraph group_browser["Browser app"]
  node_public_assets["Static delivery boundary<br/>public assets"]
  node_landing["Landing page<br/>HTML page<br/>[index.html]"]
  node_game_page["Game page<br/>HTML page<br/>[game.html]"]
  node_result_page["Results page<br/>HTML page<br/>[result.html]"]
  node_game_controller["Game controller<br/>browser JavaScript<br/>[script.js]"]
  node_styles["Shared styles<br/>CSS<br/>[style.css]"]
end

subgraph group_content["Game content"]
  node_words["Word prompts<br/>game data<br/>[words.js]"]
end

node_root_script["Root script<br/>JavaScript<br/>[script.js]"]
node_root_game_page["Root game page<br/>HTML page<br/>[game.html]"]

node_package -->|"runs"| node_server_entry
node_lockfile -->|"locks dependencies"| node_package
node_server_entry -->|"serves"| node_public_assets
node_public_assets -->|"delivers"| node_landing
node_public_assets -->|"delivers"| node_game_page
node_public_assets -->|"delivers"| node_result_page
node_landing -->|"starts game"| node_game_page
node_game_page -->|"completes game"| node_result_page
node_game_controller -->|"drives"| node_game_page
node_game_controller -->|"handles transitions"| node_landing
node_game_controller -->|"renders outcome"| node_result_page
node_game_controller -->|"uses prompts"| node_words
node_styles -->|"styles"| node_landing
node_styles -->|"styles"| node_game_page
node_styles -->|"styles"| node_result_page
node_root_script -.->|"possible duplicate"| node_game_controller
node_root_game_page -.->|"possible duplicate"| node_game_page

click node_package "https://github.com/033-gagan/sketch_it/blob/main/package.json"
click node_lockfile "https://github.com/033-gagan/sketch_it/blob/main/package-lock.json"
click node_server_entry "https://github.com/033-gagan/sketch_it/blob/main/server.js"
click node_landing "https://github.com/033-gagan/sketch_it/blob/main/public/index.html"
click node_game_page "https://github.com/033-gagan/sketch_it/blob/main/public/game.html"
click node_result_page "https://github.com/033-gagan/sketch_it/blob/main/public/result.html"
click node_game_controller "https://github.com/033-gagan/sketch_it/blob/main/public/script.js"
click node_styles "https://github.com/033-gagan/sketch_it/blob/main/public/style.css"
click node_words "https://github.com/033-gagan/sketch_it/blob/main/words.js"
click node_root_script "https://github.com/033-gagan/sketch_it/blob/main/script.js"
click node_root_game_page "https://github.com/033-gagan/sketch_it/blob/main/game.html"

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_package,node_lockfile,node_server_entry toneBlue
class node_public_assets,node_landing,node_game_page,node_result_page,node_game_controller,node_styles toneAmber
class node_words toneMint
class node_root_script,node_root_game_page toneNeutral
```

## Components

### Node runtime

- [Package metadata](https://github.com/033-gagan/sketch_it/blob/main/package.json): Node manifest · Declares the JavaScript runtime and dependencies. · `package.json`
- [Dependency lock](https://github.com/033-gagan/sketch_it/blob/main/package-lock.json): npm lockfile · `package-lock.json`
- [Server entry](https://github.com/033-gagan/sketch_it/blob/main/server.js): Node.js server · Serves the browser application and may coordinate game sessions. · `server.js`

### Browser app

- **Static delivery boundary**: public assets · Browser-consumable pages, scripts, and styles.
- [Landing page](https://github.com/033-gagan/sketch_it/blob/main/public/index.html): HTML page · Start stage. · `public/index.html`
- [Game page](https://github.com/033-gagan/sketch_it/blob/main/public/game.html): HTML page · Active sketching stage. · `public/game.html`
- [Results page](https://github.com/033-gagan/sketch_it/blob/main/public/result.html): HTML page · Completion stage. · `public/result.html`
- [Game controller](https://github.com/033-gagan/sketch_it/blob/main/public/script.js): browser JavaScript · Handles drawing, progression, timers, scoring, and page transitions. · `public/script.js`
- [Shared styles](https://github.com/033-gagan/sketch_it/blob/main/public/style.css): CSS · `public/style.css`

### Game content

- [Word prompts](https://github.com/033-gagan/sketch_it/blob/main/words.js): game data · Prompt/content source consumed by game behavior. · `words.js`

### Other components

- [Root script](https://github.com/033-gagan/sketch_it/blob/main/script.js): JavaScript · Potential alternate or legacy client script; active usage needs verification. · `script.js`
- [Root game page](https://github.com/033-gagan/sketch_it/blob/main/game.html): HTML page · Potential legacy duplicate; active deployment usage needs verification. · `game.html`

## Connections

- Package metadata → Server entry: runs
- Dependency lock → Package metadata: locks dependencies
- Server entry → Static delivery boundary: serves
- Static delivery boundary → Landing page: delivers
- Static delivery boundary → Game page: delivers
- Static delivery boundary → Results page: delivers
- Landing page → Game page: starts game
- Game page → Results page: completes game
- Game controller → Game page: drives
- Game controller → Landing page: handles transitions
- Game controller → Results page: renders outcome
- Game controller → Word prompts: uses prompts
- Shared styles → Landing page: styles
- Shared styles → Game page: styles
- Shared styles → Results page: styles
- Root script → Game controller: possible duplicate
- Root game page → Game page: possible duplicate
