# rahul-projects/sequence-puzzle architecture

> Architecture diagram of the GitHub repository rahul-projects/sequence-puzzle, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rahul-projects/sequence-puzzle
- Repository: https://github.com/rahul-projects/sequence-puzzle

## Overview

Sequence Puzzle is a browser-based pattern game: a player selects a level, solves its sequence puzzles, receives feedback, and progresses. The sampled JavaScript shows level data, screen updates, answer checking, and Web Audio feedback. A service worker caches the app’s assets for offline use. The HTML, CSS, and manifest are present in the tree, but their contents were not sampled, so their wiring is not asserted.

Main entry points: [`pattern-puzzle-game/script.js`](https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/script.js) (Game controller), [`pattern-puzzle-game/sw.js`](https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/sw.js) (Offline worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Puzzle gameplay"]
  node_controller["Game controller<br/>[script.js]"]
  node_puzzles["Level puzzles<br/>[script.js]"]
  node_audio["Web Audio"]
end

subgraph group_webapp["Web app"]
  node_shell["Game shell<br/>[index.html]"]
  node_styles["Game styling<br/>[style.css]"]
  node_manifest["App manifest<br/>[manifest.json]"]
  node_worker["Offline worker<br/>[sw.js]"]
end

node_player(("Player"))
node_cache[("Browser cache")]

node_player -->|"plays"| node_controller
node_controller -->|"reads puzzles"| node_puzzles
node_controller -->|"plays feedback"| node_audio
node_worker -->|"caches assets"| node_cache

click node_shell "https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/index.html"
click node_styles "https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/style.css"
click node_manifest "https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/manifest.json"
click node_controller "https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/script.js"
click node_puzzles "https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/script.js"
click node_worker "https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/sw.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_controller,node_puzzles,node_audio toneBlue
class node_shell,node_styles,node_manifest,node_worker,node_cache toneAmber
class node_player toneIndigo
```

## Components

### Puzzle gameplay

- [Game controller](https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/script.js): `pattern-puzzle-game/script.js`
- [Level puzzles](https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/script.js): `pattern-puzzle-game/script.js`
- **Web Audio**

### Web app

- [Game shell](https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/index.html): `pattern-puzzle-game/index.html`
- [Game styling](https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/style.css): `pattern-puzzle-game/style.css`
- [App manifest](https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/manifest.json): `pattern-puzzle-game/manifest.json`
- [Offline worker](https://github.com/rahul-projects/sequence-puzzle/blob/main/pattern-puzzle-game/sw.js): `pattern-puzzle-game/sw.js`

### Other components

- **Player**
- **Browser cache**

## Connections

- Player → Game controller: plays (evidence: `pattern-puzzle-game/script.js`)
- Game controller → Level puzzles: reads puzzles (evidence: `pattern-puzzle-game/script.js`)
- Game controller → Web Audio: plays feedback (evidence: `pattern-puzzle-game/script.js`)
- Offline worker → Browser cache: caches assets (evidence: `pattern-puzzle-game/sw.js`)
