chicago-resident-days
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: v29View latest version
Val Town backend for scraping, storing, and serving Chicago free museum day data.
| File | Type | Description |
|---|---|---|
db.ts | Script | Database functions (SQLite) |
scrapeChooseChicago.ts | Script | Choose Chicago HTML scraper |
utils.ts | Script | Date normalization utilities |
scraper.cron.ts | Cron | Monthly scraper orchestrator |
bot.cron.ts | Cron | Weekly Bluesky poster (Mondays 8am CT) |
api.http.ts | HTTP | Public JSON API |
- Deploy to Val Town
- Set secrets:
BLUESKY_HANDLE,BLUESKY_PASSWORD - Run
scraper.cron.tsmanually to populate initial data - Schedule
scraper.cron.tsmonthly (first Monday) - Schedule
bot.cron.tsweekly (Mondays 8am CT →0 14 * * 1UTC in winter,0 13 * * 1in summer)
GET /- API documentationGET /free-days?start=YYYY-MM-DD&end=YYYY-MM-DD- Free days in date rangeGET /upcoming- Next 7 daysGET /today- Today's free daysGET /institutions- List all museumsGET /health- Health check
scraped_free_days- Auto-populated by scrapersfree_days_overrides- Manual corrections (win on conflicts)