Spaces:
Running
Running
File size: 1,447 Bytes
794cf6c bc7e9cd 794cf6c bc7e9cd 794cf6c bc7e9cd db9635c bc7e9cd db9635c bc7e9cd db9635c bc7e9cd 794cf6c bc7e9cd 794cf6c bc7e9cd 794cf6c bc7e9cd 794cf6c bc7e9cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# Services
Core business logic with centralized content management for JSFiddle-style game development.
## Purpose
Single source of truth content management, game lifecycle, and virtual file operations
## Layout
```
services/
βββ context.md # This file
βββ content-manager.ts # Editor content with conflict detection
βββ auth.ts # Hugging Face OAuth
βββ websocket.ts # WebSocket connection
βββ message-handler.ts # Message routing with segment processing
βββ game-engine.ts # VibeGame lifecycle with reload events
βββ html-document-parser.ts # HTML parsing using DOMParser
βββ virtual-fs.ts # Virtual file system with version tracking
βββ console-sync.ts # Console interception
```
## Scope
- In-scope: Content synchronization, game lifecycle, HTML parsing, virtual file operations
- Out-of-scope: UI rendering, component state
## Entrypoints
- `contentManager` - Single reactive store for all editor content with bidirectional sync
- `gameEngine` - JSFiddle-style game lifecycle management
- `virtualFileSystem` - Virtual file operations for editor content
- `HTMLDocumentParser` - HTML parsing
- `messageHandler` - Message routing and segment processing
## Dependencies
- Svelte stores for reactive content management
- VibeGame for game engine
- DOMParser for HTML parsing
- @huggingface/hub for OAuth
|