Inspiration

Every day in Pakistan, students sit down to study — and the lights go out. Load shedding cuts power for 8 to 12 hours daily across the country, affecting over 220 million people. For students preparing for board exams, university deadlines, or competitive tests, this isn't a minor inconvenience, it means dead laptops, no internet, and broken focus at the worst possible moments. We built StudyShift because no tool existed that treated load shedding as a first-class constraint in a student's schedule. Every study planner assumes you always have power. We built one that doesn't.

What it does

StudyShift is an AI-powered study planner built specifically for Pakistan's load shedding reality. You enter your city and load shedding group, and the app fetches your schedule using AI. It then automatically places your tasks, homework, online classes, video lectures, practice papers into time windows when power will actually be available.

Key features: • AI schedule fetch for 10 major cities (Lahore, Karachi, Islamabad, and more) • Smart auto-scheduler that avoids outage windows • Conflict detection that flags tasks placed in power cuts • One-click auto-fix that reschedules all conflicts instantly • Weekly view showing your best study windows across 7 days • AI chat assistant to ask anything about your schedule • Offline fallback so the app works even without internet • All data saved locally nothing is lost between sessions

How we built it

I kept the stack intentionally lean no framework, no build step, no npm install.

• Frontend: pure HTML, CSS, and vanilla JavaScript. Opens directly in a browser. • AI: Groq API (qwen3-32b) powers the schedule intelligence and the chat assistant • Backend: a single Netlify serverless function acts as a secure API proxy, keeping the API key off the client • Storage: LocalStorage for full offline persistence • Design: custom dark editorial theme with Bootstrap Icons and Google Fonts (Syne + DM Sans) The entire app is one HTML file, one CSS file, and one JS file intentionally accessible to students on low-end devices with slow connections.

Challenges we ran into

The biggest challenge was reliable real-time data. Load shedding schedules in Pakistan change frequently and no official API exists. Utility websites like LESCO and K-Electric publish schedules inconsistently, and scraping them is fragile. We solved this by using AI to interpret and structure the schedule data, with a carefully engineered prompt that returns a clean 24-hour JSON array and a robust static fallback when live data isn't available. We also ran into API key format issues during deployment. Gemini, Groq, and Anthropic keys all have different formats and the proxy validation was initially too strict, blocking valid keys. I rewrote the proxy to be more flexible while keeping security intact. Getting the auto-scheduler to feel smooth placing tasks intelligently, detecting conflicts in real time, and animating the fixes required significant iteration on the scheduling logic.

Accomplishments that we're proud of

I am proud that StudyShift actually works, as something a student in Lahore or Karachi could open on their phone today and use. The auto-scheduler feels genuinely smart. Watch it place a 2-hour task into the next available power window, flag a conflict when you override it, and fix everything with one click, it's a satisfying loop that solves a real problem. We're also proud of the no-framework approach. The entire app loads in under a second, works on a 3G connection, and doesn't require any setup. In a country where data is expensive and devices are often low-end, that matters. Finally covering 10 cities with different utility companies, group systems, and schedule patterns, and making all of that feel seamless, was a real engineering challenge we're happy we solved.

What we learned I learned that the hardest part of building for a real-world problem isn't the code. it's the data. Load shedding schedules are inconsistent, politically sensitive, and frequently wrong even on official websites. Building a product around unreliable data taught us to design for graceful degradation from day one, not as an afterthought. I also learned a lot about prompt engineering. Getting an AI to reliably return a structured 24-integer JSON array nothing more, nothing less — required much more iteration than expected. Small changes to the system prompt produced wildly different output formats. And I learned that constraints breed creativity. No framework, no database, no server, just files. Those constraints pushed me to write cleaner, leaner code than I would have otherwise.

What's next for StudyShift

The immediate next step is real-time integration with WAPDA, LESCO, K-Electric, and other utility APIs as they become available so the schedule is always accurate, not estimated. Beyond that: • Push notifications that alert students 15 minutes before an outage starts • A mobile app (React Native) with background sync • Community-sourced schedule corrections if 50 users in the same area report the schedule is wrong, the app learns • Integration with popular Pakistani study platforms (Sabaq Foundation, Maktab) • Expansion to other load-shedding-affected countries: Nigeria, Bangladesh, Nepal StudyShift started as a hackathon project. We want it to become the study tool that every Pakistani student actually uses.

Built With

Share this project:

Updates

Submission history