VibeGame / src /lib /stores /context.md
dylanebert
improved prompting/UX
db9635c

Stores

State management using Svelte stores

Purpose

Single source of truth for application state with reactive updates

Layout

stores/
β”œβ”€β”€ context.md     # This file
β”œβ”€β”€ loading.ts     # Loading state and progress
β”œβ”€β”€ game.ts        # Game instance and running state
β”œβ”€β”€ console.ts     # Console messages with unique IDs
β”œβ”€β”€ editor.ts      # Editor content and settings
β”œβ”€β”€ chat-store.ts  # Chat messages and connection state
└── ui.ts          # UI state (view modes including about, errors)

Scope

  • In-scope: Application state, reactive data
  • Out-of-scope: Business logic, UI components

Entrypoints

  • Components subscribe for reactive updates
  • Controllers update state through store methods
  • Stores expose data and update methods

Dependencies

  • svelte/store for reactive state