# sampoviii/pixel-planter architecture

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

- Interactive diagram: https://gitdiagram.com/sampoviii/pixel-planter
- Repository: https://github.com/sampoviii/pixel-planter

## Overview

Pixel Planter is a browser-based garden game. The player places pots, plants seeds, cares for plants as they grow, then harvests seeds; the README also highlights original pixel-art sprites. The runtime is concentrated in game.js, with HTML and CSS providing the browser interface and presentation. The excerpt shows initialization, tool and pot interactions, care progression, harvest, and effects, but omits several implementation details; edges reflect only visible calls or documented capabilities.

Main entry points: [`game.js`](https://github.com/sampoviii/pixel-planter/blob/main/game.js) (Planting and Care), [`index.html`](https://github.com/sampoviii/pixel-planter/blob/main/index.html) (Game Page), [`style.css`](https://github.com/sampoviii/pixel-planter/blob/main/style.css) (Game Styling), [`sprites`](https://github.com/sampoviii/pixel-planter/tree/main/sprites) (Pixel Sprites)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Browser Interface"]
  node_page["Game Page<br/>[index.html]"]
  node_styles["Game Styling<br/>[style.css]"]
end

subgraph group_garden["Garden Gameplay"]
  node_runtime["Game Runtime<br/>[game.js]"]
  node_potplacement["Pot Placement<br/>[game.js]"]
  node_plantcare["Planting and Care<br/>[game.js]"]
  node_growth["Growth Stages<br/>[game.js]"]
  node_harvest["Seed Harvest<br/>[game.js]"]
  node_feedback["Effects and Feedback<br/>[game.js]"]
end

subgraph group_presentation["Visual Assets"]
  node_sprites["Pixel Sprites"]
end

node_player(("Player"))

node_player -->|"plays"| node_page
node_page -.->|"hosts"| node_runtime
node_player -->|"positions pots"| node_potplacement
node_player -->|"tends plants"| node_plantcare
node_player -->|"harvests seeds"| node_harvest
node_runtime -->|"sets up tools"| node_potplacement
node_potplacement -->|"applies tools"| node_plantcare
node_plantcare -->|"advances growth"| node_growth
node_growth -->|"requests care"| node_plantcare
node_growth -->|"enables harvest"| node_harvest
node_plantcare -->|"spawns effects"| node_feedback
node_harvest -.->|"shows feedback"| node_feedback
node_runtime -->|"loads assets"| node_sprites
node_page -.->|"uses styles"| node_styles

click node_page "https://github.com/sampoviii/pixel-planter/blob/main/index.html"
click node_styles "https://github.com/sampoviii/pixel-planter/blob/main/style.css"
click node_runtime "https://github.com/sampoviii/pixel-planter/blob/main/game.js"
click node_potplacement "https://github.com/sampoviii/pixel-planter/blob/main/game.js"
click node_plantcare "https://github.com/sampoviii/pixel-planter/blob/main/game.js"
click node_growth "https://github.com/sampoviii/pixel-planter/blob/main/game.js"
click node_harvest "https://github.com/sampoviii/pixel-planter/blob/main/game.js"
click node_feedback "https://github.com/sampoviii/pixel-planter/blob/main/game.js"
click node_sprites "https://github.com/sampoviii/pixel-planter/tree/main/sprites"

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_page,node_styles toneBlue
class node_runtime,node_potplacement,node_plantcare,node_growth,node_harvest,node_feedback toneAmber
class node_sprites toneMint
class node_player toneIndigo
```

## Components

### Browser Interface

- [Game Page](https://github.com/sampoviii/pixel-planter/blob/main/index.html): `index.html`
- [Game Styling](https://github.com/sampoviii/pixel-planter/blob/main/style.css): `style.css`

### Garden Gameplay

- [Game Runtime](https://github.com/sampoviii/pixel-planter/blob/main/game.js): `game.js`
- [Pot Placement](https://github.com/sampoviii/pixel-planter/blob/main/game.js): `game.js`
- [Planting and Care](https://github.com/sampoviii/pixel-planter/blob/main/game.js): `game.js`
- [Growth Stages](https://github.com/sampoviii/pixel-planter/blob/main/game.js): `game.js`
- [Seed Harvest](https://github.com/sampoviii/pixel-planter/blob/main/game.js): `game.js`
- [Effects and Feedback](https://github.com/sampoviii/pixel-planter/blob/main/game.js): `game.js`

### Visual Assets

- [Pixel Sprites](https://github.com/sampoviii/pixel-planter/tree/main/sprites): `sprites`

### Other components

- **Player**

## Connections

- Player → Game Page: plays (evidence: `README.md`)
- Game Page → Game Runtime: hosts
- Player → Pot Placement: positions pots (evidence: `README.md`)
- Player → Planting and Care: tends plants (evidence: `README.md`)
- Player → Seed Harvest: harvests seeds (evidence: `README.md`)
- Game Runtime → Pot Placement: sets up tools (evidence: `game.js`)
- Pot Placement → Planting and Care: applies tools (evidence: `game.js`)
- Planting and Care → Growth Stages: advances growth (evidence: `game.js`)
- Growth Stages → Planting and Care: requests care (evidence: `game.js`)
- Growth Stages → Seed Harvest: enables harvest (evidence: `game.js`)
- Planting and Care → Effects and Feedback: spawns effects (evidence: `game.js`)
- Seed Harvest → Effects and Feedback: shows feedback (evidence: `game.js`)
- Game Runtime → Pixel Sprites: loads assets (evidence: `game.js`)
- Game Page → Game Styling: uses styles
