Inspiration
Karachi's summers are brutal, and the people who work outside in them (construction crews, delivery riders, municipal workers) usually decide when to work by habit. We kept asking a simple question: if a supervisor can only move a shift by a few hours, which hours are actually cooler? "Saaya" means shade in Urdu, and that is the idea: help crews find the shade in the day.
What it does
SaayaShift takes a real hourly forecast for Karachi, ranks the coolest complete work windows for each crew's operating hours, and shows the mean and peak apparent temperature for every option. A bilingual (English/Urdu) assistant answers planning questions using retrieved CDC/NIOSH guidance, and it refuses to answer medical or "is it safe?" questions. If the data ever goes stale, the app says so instead of guessing.
How we built it
- Data pipeline: hourly forecasts from Open-Meteo, with every raw download hashed (SHA-256) and checked against a manifest, plus schema and range checks before anything is published.
- Forecast model: a Ridge regression, frozen before evaluation. On our evaluation it reached an MAE of $0.342\,^\circ\mathrm{C}$ against $1.113\,^\circ\mathrm{C}$ for the "same hour 24 h ago" baseline, a reduction of $$1-\frac{0.34164}{1.11325}\approx 69\%$$
- Window ranking: for a window $W$ of $d$ hours, we compute the mean apparent temperature $$\bar{T}(W)=\frac{1}{d}\sum_{t\in W}T_t$$ and rank by $\bar{T}$, then peak temperature, then earliest start. We deliberately use no invented "safe/unsafe" thresholds.
- Guidance assistant: extractive retrieval over NIOSH passages, with exact citations and no generative model writing safety advice. It abstains on medical, safety-guarantee and unsupported questions.
- Freshness rule: a forecast of age $a$ hours is treated as stale unless $0 \le a \le 3$ (or its coverage has expired), and the interface shows it.
- Stack: FastAPI, React, pandas/scikit-learn, Neon (crew data), Render (hosting), Supabase (storage), with the pipeline on Hugging Face and GitHub Actions validating and publishing fresh data every hour.
Challenges we ran into
- Never inventing numbers. The hardest discipline was resisting plausible-looking placeholder data. Zones and crews in the demo are clearly labelled sample data; the city forecast is real.
- Keeping data fresh on free tiers. Free hosts sleep, disks are wiped, and scheduled jobs can be delayed. We built an atomic snapshot (rows and status always match), hash-verified syncing, a validator that refuses stale or gappy forecasts, and a backup schedule.
- Safe AI behaviour. Making the assistant useful while still abstaining on health and safety questions took many rounds of testing.
- Urdu support across the interface, alerts and answers without changing what the evidence supports.
What we learned
Trustworthy beats impressive: provenance hashes, honest staleness banners and refusing to answer are features, not limitations. We also learned how much of "AI deployment" is plumbing: scheduling, validation, caching and failure modes.
What's next
Real zone-level forecasts, crew feedback on whether recommended windows were practical, and SMS/WhatsApp alerts. SaayaShift is planning support, not medical advice or a safety guarantee.
Built With
- docker
- duckdb
- fastapi
- github-actions
- hugging-face
- neon
- numpy
- open-meteo
- openstreetmap
- pandas
- postgresql
- python
- react
- render
- scikit-learn
- supabase
- tailwindcss
- typescript
- vite
Log in or sign up for Devpost to join the conversation.