Self-hosted, low-latency Cornell class availability sniper and multi-channel alert dashboard.
- Deduplicated High-Frequency Polling: Polls only active
(roster, subject)buckets using a warmhttpxHTTP/2 connection pool,uvloop, andorjson(~1–2 ms payload parsing) within Cornell's<= 1 req/sguideline. - Smart Watch Modes:
- Exact Section (
classNbr): Alerts when a specificLEC,DIS, orLABopens. - Linked Enrollment Group: Alerts only when both your discussion/lab and a companion lecture in the same
enrollGroupare simultaneously open. - Any Section: Alerts when any matching section of a course opens.
- Exact Section (
- Instant Local Search: Caches Cornell rosters and courses in SQLite FTS5 for sub-5ms searches by course code, title, or 5-digit
classNbr. - Zero-App-Store Mobile Push:
- PWA Web Push (VAPID): Native lockscreen notifications on iOS 16.4+ (via Safari Add to Home Screen), Android, and Desktop browsers.
- Shared Discord Channel Pings: Configure one
#class-alertswebhook URL; ClassSniper coalesces<@USER_ID>mentions in top-level message content (allowed_mentions.users) so invited friends simply set the channel to Only @mentions.
- Invite-Only Multi-User: Admin generates single/multi-use invite links while keeping admin watches priority-weighted.
-
Create
.envfrom the template:cp .env.example .env
Edit
.envto setDISCORD_SHARED_WEBHOOK_URL(and optionallyAPP_DOMAIN/APP_ORIGIN, defaulting tosniper.hodgman.net). VAPID keys andSESSION_SECRETauto-generate securely into./data/on first startup if left blank. -
Build and launch on
127.0.0.1:8000:docker compose up -d --build
-
Route through your existing
cloudflaredtunnel: Add an ingress entry in/etc/cloudflared/config.ymlabove your catch-allhttp_status:404rule:ingress: - hostname: sniper.hodgman.net service: http://127.0.0.1:8000 # ...existing rules...
Create a proxied CNAME record in Cloudflare DNS pointing
sniper.hodgman.netto<TUNNEL_ID>.cfargotunnel.com, then restartcloudflared:sudo systemctl restart cloudflared
-
First Visit Setup:
- Open
https://sniper.hodgman.netand create your admin account (unless pre-set viaADMIN_USERNAME/ADMIN_PASSWORDin.env). - On iPhone/iPad: open
https://sniper.hodgman.netin Safari → Share → Add to Home Screen, open ClassSniper from your Home Screen, go to Alerts & Push, and tap Enable Push on This Device. - For Discord pings: join your
#class-alertschannel, set channel notifications to Only @mentions, enable Discord Developer Mode → Copy User ID, paste it into Alerts & Push, and click Test Discord Ping.
- Open
Run the full backend test suite inside the Docker test target:
docker build --target test -t classsniper-test .
docker run --rm classsniper-test