How jstrieb/poker-chipper works
Main Components
a. Client-Side Components:
• Frontend UI (Svelte Application)
• Web Worker Thread
• Service Worker
• WebAssembly Module (SCIP Solver)
b. External Components:
• Static Web Server (GitHub Pages)
User Interface Layer
• App.svelte (main container)
• Child components (Button, Checkbox, Details, NumericInput, etc.)
• Use rounded rectangles for UI components
Processing Layer
a. Main Thread:
• Svelte runtime
• Helpers.js for utility functions
b. Web Worker Thread:
• Solve.js and solveWorker.js
• SCIP WASM module integration
• Use rectangles for processing units
Cache/Storage Layer
• Service Worker
• Browser Cache
Key Relationships to Highlight:
Data Flow
• User Input → Main Thread → Web Worker
• Web Worker → SCIP Solver → Optimization Results
• Results → Main Thread → UI Updates
Asset Management
• Service Worker ↔ Static Assets
• Service Worker ↔ Browser Cache
WASM Integration
• How the compiled SCIP solver (scip.wasm) integrates with the Web Worker
• Use a special connector to indicate WASM execution
Special Considerations:
Progressive Web App Features
• Manifest.json and serviceWorker.js connections
• Offline functionality flow
Optimization Pipeline
• Conversion of user inputs to MINLP model
• SCIP solver integration points
Static Asset Handling
• Caching strategy
• How assets are served from GitHub Pages
Use a clear hierarchy
• Top: User Interface
• Middle: Processing
• Bottom: Storage/Caching
Version/build information
• SCIP solver version
• WebAssembly module details
• The static nature of the application
• The separation of concerns between UI and processing
• The role of Web Workers in non-blocking optimization
• The integration of the WASM-compiled SCIP solver
• The PWA capabilities and offline functionality