Inspiration
It's 11:04 PM. Three things are due. None of them are started.
For the three of us, that's a normal Tuesday. We each have a signature move:
- Raphael opens the assignment, reorganizes the desktop, color-codes a brand new to-do list, and closes the assignment.
- Jayden "just checks one thing" and resurfaces 47 group-chat messages later.
- Koby is sure it'll only take an hour, starts at 11 PM, and is still going when the sun comes up.
We've all tried study planners, and they all assume the same thing: that you'll follow the plan. We don't. The hard part was never knowing what to do. It was starting.
Psychologist Piers Steel's procrastination equation (Temporal Motivation Theory) explains exactly why our work happens at 11 PM:
$$ \text{Motivation} = \frac{\text{Expectancy} \times \text{Value}}{\text{Impulsiveness} \times \text{Delay}} $$
When a deadline is days away, Delay is huge and motivation is close to zero. It only spikes when Delay hits zero: the night before. So we built CrunchAI to attack every term in that equation:
- Raise Expectancy: your first task is always a 5 to 10 minute starter, small enough that you can't fail it.
- Shrink Delay: every task shows a live countdown to its real deadline, so "later" feels like now.
- Cut Impulsiveness: you write down your goal before the timer will start, with an optional focus lock.
- Raise Value: a quick "Prove it" quiz and a comeback streak show that the time actually counted.
Other planners assume you'll follow the plan. CrunchAI assumes you won't.
What it does
- Dump it. Type everything you're avoiding, the way it's in your head: deadlines, half-finished work, how tired you are.
- Start tiny. Gemini turns it into an ordered plan for the time you actually have. The first task always takes 5 to 10 minutes.
- Focus for real. Write your goal to unlock the timer. Study with an AI helper that knows your task and renders math. Turn on focus lock if you want only time on the page to count.
- Prove it. When the block ends, answer 3 quick questions. CrunchAI grades them and suggests how the block really went.
- Replan. Your check-in goes back to the AI, which rebuilds the rest of the plan around what actually happened. Skipped a task? The next one becomes a starter again.
No account is needed to start. Sign up later and your plan, chat history, and streak come with you.
How we built it
We split the work three ways and built in parallel:
- Koby built deadlines: tasks carry real due dates, and the server works out how much time is left for each one.
- Jayden built the database layer: users, sign up and log in, and saved chat history.
- Raphael built the frontend and the accountability features, then merged all three branches and finished the account flow.
Backend. FastAPI with Pydantic, SQLite, and Google Gemini through the google-genai SDK. Gemini has to answer in strict JSON, which we validate against Pydantic schemas before anything touches the database. Every plan has to fit the student's real time budget:
$$ \sum_{i=1}^{n} t_i \le T_{\text{available}}, \qquad 5 \le t_1 \le 10 \text{ minutes} $$
Honest time. With focus lock on, the timer uses the Page Visibility API and only counts time spent on the page:
$$ t_{\text{counted}} = t_{\text{block}} - t_{\text{away}} $$
Replanning. Each check-in sends the outcome, focused minutes, minutes away, and the quiz score $\frac{\text{correct}}{\text{total}}$ back to Gemini, which rebuilds the remaining tasks.
Frontend. Vanilla HTML, CSS, and JavaScript. GSAP, ScrollTrigger, and Lenis drive the scroll-based landing page, and the study room is a set of full-screen scenes with dark and light themes. Chat answers render Markdown and LaTeX with marked, DOMPurify, and KaTeX.
Accounts. Guest first. Passwords are hashed with PBKDF2, sessions live in an HttpOnly cookie, and signing up claims the plan you already made as a guest.
Tooling. Docker Compose with live reload, pytest tests that call the real Gemini API, and Playwright scripts that click through the whole journey in Chrome. Those same scripts captured the footage for our demo video.
Challenges we ran into
- Three branches that had never met. Deadlines and accounts were built side by side and merged late. The merge turned up a
create_taskcall with 7 arguments but only 5 SQL placeholders, aused_idtypo, missing tables, a duplicate route, and a.gitignoretypo (chrunchai.db) that got our database committed to Git. - Gemini at hackathon rush hour. The model returned 503 "high demand" errors and sometimes dropped connections mid-request. We added retries with backoff, a lighter fallback model, and friendly error messages, so the demo never shows a stack trace.
- Time zones. The server runs in UTC inside Docker, so "due tomorrow at 10 AM" countdowns were off by hours. Now the browser sends the student's local time with every request.
- Browsers throttle background tabs. A normal
setIntervaltimer drifts when you switch tabs. Ours measures real timestamps and ticks from a Web Worker. - Focus lock vs. real studying. Our first idea punished leaving the tab, until we remembered that we study from online textbooks. Focus lock became optional.
- Markdown ate our math. The Markdown parser turned LaTeX underscores into italics. Now we shield math before parsing and hand it to KaTeX afterwards.
- Our first design looked AI-generated. Purple gradients, glass cards, sparkles. We scrapped it for one blue accent, solid surfaces, and copy written for people who are already behind.
What we learned
- Starting is the product. A 5-minute first task gets people moving in a way a perfect 3-hour plan never does.
- Accountability beats planning. A written goal, honest time, and a 3-question quiz do more than a prettier schedule.
- Treat AI output like user input. Schemas, validation, retries, and fallbacks turned a flaky demo into a reliable one.
- Merge early and test the whole journey. Every endpoint worked on its own. The bugs lived in the seams between them.
And yes, we started this writeup later than we'd like to admit.
What's next
- Pull deadlines straight from Blackboard, Canvas, and Google Calendar
- Phone reminders when a starter task is waiting for you
- Turn missed quiz questions into spaced-repetition reviews

Log in or sign up for Devpost to join the conversation.