Public
Likehn-watcher
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v54View latest version
Real-time Hacker News user & item watcher with Firebase SSE streaming and Web Push notifications.
- Multi-user β sign in with Val Town, each user has their own watch list
- Watch HN users β get notified on new posts, comments, karma changes, profile edits
- Watch HN items β track score changes, new comments on stories
- Real-time via Firebase SSE β browser connects directly to Firebase for instant updates
- Web Push notifications β native browser notifications even when tab is closed
- Interval backup poller β catches everything every 5 minutes when no browser is open
Rendering mermaid diagram...
- Sign in with your Val Town account
- Add HN usernames or item IDs to your personal watch list
- The browser opens EventSource connections directly to Firebase for each watched entity
- When Firebase pushes changes, the client-side diff engine detects what changed
- Changes are reported to the backend, stored per-user in SQLite, and trigger Web Push notifications
- When the browser is closed, the interval val polls every 5 min and sends push to all affected users
- Go to
/setupto generate and save VAPID keys (needed for Web Push) - Open the dashboard at
/ - Sign in with Val Town
- Click "Enable Notifications" for Web Push
- Add HN usernames or item IDs to watch
VAPID_KEYSβ ECDSA P-256 keypair in JWK format (generate at/setup)VAPID_SUBJECTβmailto:contact email for VAPID