Compare commits

...

1 Commits

Author SHA1 Message Date
27f2752528 feat: Codebase Genome for the-playground (#671)
Some checks failed
Agent PR Gate / gate (pull_request) Has been cancelled
Agent PR Gate / report (pull_request) Has been cancelled
Self-Healing Smoke / self-healing-smoke (pull_request) Has been cancelled
Smoke Test / smoke (pull_request) Has been cancelled
Complete GENOME.md for the-playground (browser creative platform):
- Project overview: Pure Canvas + Web Audio + vanilla JS
- Architecture diagram (Mermaid)
- Three pillars: CREATE, COLLECT, PLAY
- 15 planned experiences roadmap
- Key files (17 total, zero dependencies)
- Design principles and milestones
- Sovereignty assessment

Repo 11/16. Closes #671.
2026-04-16 01:10:35 -04:00

View File

@@ -0,0 +1,148 @@
# GENOME.md — The Playground (Timmy_Foundation/the-playground)
> Codebase Genome v1.0 | Generated 2026-04-16 | Repo 11/16
## Project Overview
**The Sovereign Playground** is a browser-based creative platform for art, music, and interactive experiences. Pure Canvas + Web Audio API + vanilla JS. Zero dependencies. No login. No signup. Open the page and build something beautiful.
**Core principle:** A man at 3am needs something that works RIGHT NOW, with no friction, no gate, no permission.
## Architecture
```mermaid
graph TD
subgraph "Entry Point"
HTML[index.html] --> PLAYGROUND[playground.js]
end
subgraph "Engine Layer"
PLAYGROUND --> AUDIO[audio-engine.js]
PLAYGROUND --> VISUAL[visual-engine.js]
end
subgraph "Modes"
PLAYGROUND --> MODES[mode-manager.js]
MODES --> CONSTELLATION[constellation.js]
end
subgraph "UI Panels"
PLAYGROUND --> SOUND_PANEL[sound-panel.js]
PLAYGROUND --> GALLERY_PANEL[gallery-panel.js]
end
subgraph "Gallery & Export"
PLAYGROUND --> GALLERY[gallery.js]
PLAYGROUND --> DOWNLOAD[download.js]
DOWNLOAD --> WAV[wav-encoder.js]
end
subgraph "Utilities"
PLAYGROUND --> EVENTS[events.js]
PLAYGROUND --> STATE[state.js]
PLAYGROUND --> UTILS[utils.js]
end
subgraph "Styling"
HTML --> CSS[design-system.css]
end
```
## The Three Pillars
| Pillar | Status | Description |
|--------|--------|-------------|
| CREATE | Building | Sound Studio, Visual Forge, Video Forge |
| COLLECT | Building | Gallery — save, browse, own your creations |
| PLAY | Building | Games Floor — interactive experiences |
## Key Files
| File | Purpose |
|------|---------|
| `index.html` | Entry point — entrance curtain + main layout |
| `src/playground.js` | Main orchestrator — particles, entrance, mode switching |
| `src/engine/audio-engine.js` | Web Audio API — synthesis, effects, recording |
| `src/engine/visual-engine.js` | Canvas rendering — particles, shapes, animations |
| `src/modes/mode-manager.js` | Mode switching — constellation, sound, visual |
| `src/modes/constellation.js` | Constellation Maker experience |
| `src/gallery/gallery.js` | Gallery — IndexedDB storage, browsing |
| `src/export/download.js` | Export — zip, download, share |
| `src/export/wav-encoder.js` | WAV encoding for audio export |
| `src/panels/sound/sound-panel.js` | Sound Studio UI |
| `src/panels/gallery/gallery-panel.js` | Gallery UI |
| `src/styles/design-system.css` | Sovereign aesthetic — dark bg, gold accents |
| `src/utils/events.js` | Event system — pub/sub |
| `src/utils/state.js` | State management — reactive store |
| `src/utils/utils.js` | Utility functions |
## Design Principles
1. **Local-first** — Everything runs in the browser. IndexedDB for storage.
2. **Zero dependencies** — Pure Canvas + Web Audio API + vanilla JS.
3. **Take it home** — Every creation can be downloaded.
4. **Sovereign aesthetic** — Dark backgrounds. Gold accents. Plain, honest, profound.
5. **Accessible** — Keyboard navigable. Screen reader friendly. Works on mobile.
## Experiences Roadmap
| # | Experience | Status | Description |
|---|-----------|--------|-------------|
| 15 | Synesthesia Engine | v0.3 | See sound, hear color |
| 16 | Emotional Weather | v0.3 | Type feelings → sky responds |
| 17 | Constellation Maker | v0.3 | Place stars, connect, hear night sky |
| 18 | Breath Instrument | v0.4 | Lungs become music |
| 19 | Dream Journal | v0.4 | Describe dream → world |
| 20 | The Mirror | v0.4 | Camera paints your energy |
| 21 | Sound Fossils | v0.4 | Sound → living creature |
| 22 | Letter to Future | v0.4 | Write, seal, set date |
| 23 | Garden Paths | v0.5 | Choose-your-own soundscape |
| 24 | Heartbeat Sync | v0.5 | Finger on camera → world beats |
| 25 | The Conversation | v0.5 | Two instruments create together |
## Milestones
- **v0.1** The Forge Opens — First playable
- **v0.2** Take It Home — Download anything
- **v0.3** The Games Floor — Synesthesia, Emotional Weather, Constellation
- **v0.4** The Gallery Show — Breath, Dreams, Mirror, Fossils
- **v0.5** The Video Forge — Garden, Heartbeat, Conversation
- **v1.0** The Sovereign Playground — Full platform
## File Index
| File | Purpose |
|------|---------|
| `index.html` | Entry point (entrance curtain + layout) |
| `README.md` | Project overview and philosophy |
| `smoke-test.html` | CI smoke test |
| `src/playground.js` | Main orchestrator (~410 LOC) |
| `src/engine/audio-engine.js` | Web Audio synthesis |
| `src/engine/visual-engine.js` | Canvas rendering |
| `src/modes/constellation.js` | Constellation Maker |
| `src/modes/mode-manager.js` | Mode switching |
| `src/gallery/gallery.js` | Gallery system |
| `src/export/download.js` | Export/download |
| `src/export/wav-encoder.js` | WAV encoding |
| `src/panels/sound/sound-panel.js` | Sound UI |
| `src/panels/gallery/gallery-panel.js` | Gallery UI |
| `src/styles/design-system.css` | Design system |
| `src/utils/events.js` | Event pub/sub |
| `src/utils/state.js` | Reactive state |
| `src/utils/utils.js` | Utilities |
**Total: 17 files | Pure vanilla JS | Zero dependencies**
## Sovereignty Assessment
- **Fully local** — All computation in the browser
- **No server** — Static files only, can be served from anywhere
- **No accounts** — IndexedDB for local storage
- **No tracking** — Zero analytics, zero telemetry
- **Downloadable** — Every creation can be saved locally
**Verdict: Fully sovereign. Art heals. Music heals. Creation heals.**
---
*"A man who is building something is a man who is not destroying himself."*