Chronosync
Autonomous Playwright web monitor and visual regression studio with 4-layer noise suppression
Visual Regression Studio • Noise Suppression • 29 Tests
Description
Full-stack change detection platform built on FastAPI, Playwright, and SQLite. Normalizes URLs across multi-user watches, filters dynamic clock/CSRF noise, requires two consecutive checks before alerting, and renders an interactive Diff Studio with a draggable split-screen slider, pixel heatmap, unified text diff, and SVG price tracking.
Timeline
~1.5s
Role
Solo Developer
Status
Production
Year
2026
Deployment
Docker + FastAPI
Core Stack
FastAPI / Playwright / SQLite
Why I Built It
Understanding the core problems, proposed solutions, and realized product achievements.
Naively polling websites for changes breaks on every real site: 200 watchers hammer the same URL 200 times, live clocks and CSRF tokens trigger fake alerts, and HTTP 500 outages overwrite valid price history.
User submits a URL; normalizer.py strips tracking params, fragments, and case differences to map 200 watches onto 1 pages row.
Scheduler checks robots.txt and domain jitter gap, then launches a fresh Playwright context.
classifier.py tags 5xx/timeouts as error and 401/403/429/CAPTCHA as blocked — preventing fake outage diffs.
differ.clean_text strips clocks & CSRF tokens; a new hash sits in pending_hash until confirmed on a second consecutive check.
UNIQUE(watch_id, snapshot_id, kind) dispatches one deduped alert (Discord/Telegram/Email/RSS) with a deep link into Diff Studio.
Separate shared pages from user watches via URL normalization
app/normalizer.pyCanonicalizes scheme, ports, query order, tracking params, and trailing slashes so fetch cost scales with distinct URLs rather than watcher count.
Classify HTTP & bot challenges before touching snapshots
app/classifier.pyDistinguishes ok vs error (5xx) vs blocked (403/429/CAPTCHA) — outages never pollute snapshots and blocked domains back off up to 24h without hammering.
Suppress dynamic noise + enforce 2-check persistence
app/differ.pyStrips timestamps, relative dates, counters, and random tokens, then holds pending_hash until a second consecutive check confirms the change isn't transient.
Ship an accessible visual Diff Studio with zero framework bloat
app/static/app.jsBuilt Overview, Monitors, Diff Studio (swipe slider, pixel heatmap, unified diff, SVG price chart), and sandboxed Element Picker in vanilla JS + semantic CSS tokens.
Zero false alerts on flaky/clock-heavy demo targets, verified across 29 fast unit & flow tests (~1.5s runtime) with Docker and CI ready.
- Unit & flow tests
- 29 / 29
- Noise filters
- 4 layers
- Test suite speed
- ~1.5s
- Diff Studio views
- 4 modes
Architecture Pipelines
Visual system flow diagrams representing data pipelines and structured checks.
URL Normalizer & SQLite
Maps multiple user watches onto single deduplicated pages rows with durable DB-backed queue scheduling.
Respectful Playwright Fetcher
Fresh browser contexts gated by robots.txt rules, per-domain gap + jitter, and bounded concurrency.
Classifier & 4-Layer Differ
Separates ok/error/blocked states, strips volatile clocks/tokens, and requires 2-check hash persistence.
Deduped Alerts & Groq Summaries
UNIQUE constraint alert dispatch across Discord, Telegram, Email, RSS feeds, and optional 1-line AI summaries.
Visual Diff Studio UI
Draggable split swipe slider, pixel heatmap diff, unified text diff, SVG price chart, and sandboxed Element Picker.
Features & Capabilities
Key features and built-in components implemented inside the codebase.
- ✓URL normalization & pages-vs-watches separation so N users monitoring 1 page only trigger 1 scheduled fetch
- ✓Outage & CAPTCHA classification (ok / error / blocked) preventing server errors from creating fake change diffs
- ✓4-layer noise suppression: regex clock/CSRF scrubber, pending_hash persistence check, sensitivity thresholds, and CSS selector watch/ignore rules
- ✓Visual Diff Studio: interactive swipe slider, pixel heatmap overlay, unified line diff, and SVG numerical price history chart
- ✓Sandboxed Visual Element Picker + Chrome browser extension + keyboard-navigable WCAG AA dashboard
- ✓Docker Compose deployment, GitHub Actions CI, and 29 deterministic unit & flow tests running in ~1.5s
Solving Complex Bottlenecks
A deep dive into security rule architectures, race conditions, and verification solutions.
Modern pages change bytes on almost every reload due to relative timestamps ('2 mins ago'), CSRF nonces, A/B banners, and rotating ads.
Simple string/DOM hashing fires noisy alerts every 15 minutes, while overly aggressive stripping risks hiding genuine price or inventory drops.
Strip relative timestamps, CSRF tokens, and counters prior to hashing
app/differ.pyStore unconfirmed diffs in pending_hash rather than overwriting snapshots
app/scheduler.pyVerify against /flaky, /captcha, and /down test targets in CI
app/main.py"Confirmation across two consecutive scheduled runs gives most of the noise immunity of double-fetching at zero extra load on the target site."
Development Journey
A chronological day-by-day log detailing core milestones and features added.
Schema, Normalizer & Respectful Fetcher
Designed pages/watches/snapshots/alerts SQLite model, URL canonicalization, robots.txt parser, and per-domain jittered rate limits.
Classifier, Noise Scrubber & Persistence Check
Implemented ok/error/blocked gating, dynamic noise cleaning, pending_hash confirmation, and alert deduplication.
Visual Diff Studio, Demo Target & 29 Tests
Built split swipe slider, pixel heatmap, SVG metric charts, /bump-/flaky-/captcha demo harness, Chrome extension, Docker, and CI.
Operational Metrics
No public-facing site to audit — these are the safeguards that keep an unattended pipeline honest.
unit & end-to-end flow tests execute in ~1.5s without requiring live network or browser launches
UNIQUE(watch_id, snapshot_id, kind) guarantees exactly one alert per confirmed version change
401/403/429 and CAPTCHA responses halt retries immediately and back off exponentially
normalized pages table ensures 200 subscribers on the same URL share one Playwright fetch
Trade-off Explanations
Concise rationales for technology selections and future roadmaps.
Deduplicate Polling by Canonical URL, Not Subscription
Pages vs. Watches SplitSplitting pages (one row per normalized URL) from watches (per-user selectors/thresholds) means fetch cost scales with distinct targets instead of active subscribers.
Inspectable Single-Process Queue Over Redis/Celery
SQLite Job QueueUsing next_check timestamps inside SQLite keeps deployment down to one Docker container with atomic job claiming and zero broker ops overhead.
Zero-Build Dashboard With Keyed DOM Reconciliation
Vanilla JS Diff StudioNo frontend build step is needed inside FastAPI—tabular numerals, native <dialog> modals, keyboard shortcuts, and keyed row updates deliver crisp UI speed without SPA bundle weight.
"Evaluating scaling adjustments and cache controls shows true engineering maturity."
- ✓Move Playwright workers to a dedicated worker pool queue if scaling beyond a single FastAPI container's concurrency ceiling.
- ✓Add visual region-masking directly on screenshots (bounding-box ignore zones) alongside DOM CSS ignore selectors for canvas/ad blocks.
- ✓Support webhook signature verification and Slack Block Kit payloads alongside Discord/Telegram/Email.
Finished exploring this session?
End the workspace session to release resources and return back to the primary portfolio index.