04.Chronosync
Active Session
01 . Project Overview

Chronosync

Autonomous Playwright web monitor and visual regression studio with 4-layer noise suppression

Visual Regression Studio • Noise Suppression • 29 Tests

chronosync.diff
BASELINE · T-1$149.00 · stableCONFIRMED · 2x HASH$119.00 (-20.1%)[clock noise ignored]Playwright · 2-check persistence · 29/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

View Source Code
02 . Core Rationale

Why I Built It

Understanding the core problems, proposed solutions, and realized product achievements.

The problem

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.

What actually happens
Add

User submits a URL; normalizer.py strips tracking params, fragments, and case differences to map 200 watches onto 1 pages row.

Fetch

Scheduler checks robots.txt and domain jitter gap, then launches a fresh Playwright context.

Gate

classifier.py tags 5xx/timeouts as error and 401/403/429/CAPTCHA as blocked — preventing fake outage diffs.

Confirm

differ.clean_text strips clocks & CSRF tokens; a new hash sits in pending_hash until confirmed on a second consecutive check.

Alert

UNIQUE(watch_id, snapshot_id, kind) dispatches one deduped alert (Discord/Telegram/Email/RSS) with a deep link into Diff Studio.

The fix, step by step
1
Separate shared pages from user watches via URL normalization
app/normalizer.py

Canonicalizes scheme, ports, query order, tracking params, and trailing slashes so fetch cost scales with distinct URLs rather than watcher count.

2
Classify HTTP & bot challenges before touching snapshots
app/classifier.py

Distinguishes ok vs error (5xx) vs blocked (403/429/CAPTCHA) — outages never pollute snapshots and blocked domains back off up to 24h without hammering.

3
Suppress dynamic noise + enforce 2-check persistence
app/differ.py

Strips timestamps, relative dates, counters, and random tokens, then holds pending_hash until a second consecutive check confirms the change isn't transient.

4
Ship an accessible visual Diff Studio with zero framework bloat
app/static/app.js

Built Overview, Monitors, Diff Studio (swipe slider, pixel heatmap, unified diff, SVG price chart), and sandboxed Element Picker in vanilla JS + semantic CSS tokens.

Result

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
03 . System Pipeline

Architecture Pipelines

Visual system flow diagrams representing data pipelines and structured checks.

Pipeline Data flow nodes (Glows on Hover)
01 // normalizer-db

URL Normalizer & SQLite

Maps multiple user watches onto single deduplicated pages rows with durable DB-backed queue scheduling.

02 // playwright-poller

Respectful Playwright Fetcher

Fresh browser contexts gated by robots.txt rules, per-domain gap + jitter, and bounded concurrency.

03 // classifier-noise

Classifier & 4-Layer Differ

Separates ok/error/blocked states, strips volatile clocks/tokens, and requires 2-check hash persistence.

04 // alerts-ai

Deduped Alerts & Groq Summaries

UNIQUE constraint alert dispatch across Discord, Telegram, Email, RSS feeds, and optional 1-line AI summaries.

05 // diff-studio

Visual Diff Studio UI

Draggable split swipe slider, pixel heatmap diff, unified text diff, SVG price chart, and sandboxed Element Picker.

04 . Core Capabilities

Features & Capabilities

Key features and built-in components implemented inside the codebase.

Feature Checklist
  • ✓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
03 . Technical Barriers

Solving Complex Bottlenecks

A deep dive into security rule architectures, race conditions, and verification solutions.

Problem

Modern pages change bytes on almost every reload due to relative timestamps ('2 mins ago'), CSRF nonces, A/B banners, and rotating ads.

Why it was difficult

Simple string/DOM hashing fires noisy alerts every 15 minutes, while overly aggressive stripping risks hiding genuine price or inventory drops.

The fix
1
Strip relative timestamps, CSRF tokens, and counters prior to hashing
app/differ.py
2
Store unconfirmed diffs in pending_hash rather than overwriting snapshots
app/scheduler.py
3
Verify against /flaky, /captcha, and /down test targets in CI
app/main.py
What I learned

"Confirmation across two consecutive scheduled runs gives most of the noise immunity of double-fetching at zero extra load on the target site."

06 . Build Log Timeline

Development Journey

A chronological day-by-day log detailing core milestones and features added.

Milestone timeline
Stage 1

Schema, Normalizer & Respectful Fetcher

Designed pages/watches/snapshots/alerts SQLite model, URL canonicalization, robots.txt parser, and per-domain jittered rate limits.

Stage 2

Classifier, Noise Scrubber & Persistence Check

Implemented ok/error/blocked gating, dynamic noise cleaning, pending_hash confirmation, and alert deduplication.

Stage 3

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.

07 . System Reliability

Operational Metrics

No public-facing site to audit — these are the safeguards that keep an unattended pipeline honest.

Automated test suite29 / 29

unit & end-to-end flow tests execute in ~1.5s without requiring live network or browser launches

Alert deduplicationUNIQUE key

UNIQUE(watch_id, snapshot_id, kind) guarantees exactly one alert per confirmed version change

Bot safety backoffUp to 24h

401/403/429 and CAPTCHA responses halt retries immediately and back off exponentially

Fetch deduplication1 / URL

normalized pages table ensures 200 subscribers on the same URL share one Playwright fetch

05 . Architecture Decisions

Trade-off Explanations

Concise rationales for technology selections and future roadmaps.

Design Choices

Deduplicate Polling by Canonical URL, Not Subscription

Pages vs. Watches Split

Splitting 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 Queue

Using 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 Studio

No 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.

If I built V2...

"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.

Opening.theChronosync.

> Initializing Session...

INITIALIZING_WORKSPACE·0%