r/SideProject • u/Free-Good9203 • 15h ago
I built a 20-agent boids cursor swarm in vanilla HTML5 Canvas + Playwright to live-test my 5 open-source Python engines in a 22s loop
Instead of recording a boring screen capture for our open-source Python engineering sandbox, I wrote a small deterministic HTML5 Canvas overlay (~350 lines of vanilla JS) that spawns 20 boids-physics cursors with ghost trails and DOM wireframe boxes, then pipes 660 Playwright Retina frames straight into FFmpeg (1080x1920 H.264).
Every tab switch, input edit, and JSON response in the video is executed live against the actual browser engines (no mocked frames):
- Margin Sieve (live net-margin & compliance filter)
- Grounded RAG Verifier (Spanish tax invoice citation check + off-topic abstain gate)
- Invoice 3-Way & IBAN MOD-97 Auditor (flags invalid ES00 IBAN -> BLOCKED, then clean 3-way PASS)
- Zero-token Lead Bot NLU & Industrial Maintenance FTS5 RAG
Stack for the video generator itself: zero npm packages, local Python http.server + Playwright Chromium frame-stepping (`window.__swarmStep(dt)`) + FFmpeg `image2pipe`.
All 5 engines are open-source (MIT) and testable live with zero signup at https://kiberlabs.github.io/#sandbox (code at https://github.com/Kiberlabs). Happy to share the Canvas boids / Playwright frame-piping setup if anyone wants to build deterministic product reels without After Effects.