About ClassCast ☔
When do I leave, which route, and what do I bring?
Inspiration
Students juggle back-to-back classes across campus, and rain or snow changes how long the walk takes. I wanted one link to answer: when do I leave, which route, and what do I bring?
What it does
Paste up to 5 calendar links (like LionPATH and Canvas), or drag in .ics files. ClassCast reads each event’s location, checks the weather, and gives you:
Leave-by time
When to head out so you arrive on time.
Walking route
Your path between buildings, on a map.
Bring list
Umbrella, boots, or nothing extra.
Daily brief
A short AI summary of your day.
Due list
Canvas assignments as bullet points, kept apart from your classes.
Reality Check
Busiest day, risky back-to-backs, rainy days, and free windows for the week.
Save or share
Save your plan as a PDF, or send it with Gmail or email.
How we built it
- Stack
- Next.js on Vercel, with code in GitHub.
- UI
- shadcn/ui on Base UI, Inter, and a red-orange and cyan theme. Works in light, dark, and print.
- Data
- The calendar link supplies the locations. Open-Meteo gives the forecast. OpenRouteService gives routes. OpenStreetMap gives geocoding and map tiles.
- AI
- Gemini, Groq or Claude writes the bring list and brief, whichever key works first. With no key, built-in rules write them instead. The code does the time math, so the AI can't invent leave times.
Leave-by formula
With a 5 minute buffer, plus 15% more travel time in rain and 25% in snow.
Challenges
- Security: The server fetches any calendar URL a user enters, which is an SSRF risk. We blocked internal IPs and checked every redirect.
- Prompt injection: Calendar text is untrusted, so we treat it that way before it reaches the AI.
- Map tiles blocked: Our privacy header stripped the Referer that OpenStreetMap requires. Sending only the site origin fixed it.
- Deploy error: Vercel built the empty main branch. Merging the PR fixed it.
- Canvas feeds: Canvas assignments are all-day or zero-length events, so they were dropped or showed up as fake classes. We split them into a Due list and matched all-day items by your own time zone.
- Blocked registry: The build sandbox couldn't reach the shadcn registry, so we recreated the preset's theme and components by hand.
- Live APIs: The build sandbox blocked the weather and map APIs, so we tested with mock data first.
What we learned
- Keep API keys server-side.
- Treat user URLs and calendar text as hostile input.
- Let code do the math and AI do the language.
- Real calendar feeds are messier than the spec: test with the shapes people actually use.