Spaces:
Running
Running
# 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 | |