Inspiration

Studying is already hard but doing it when you're exhausted, stressed, or just not in the right headspace makes it feel impossible. Most study tools assume you're always ready to grind. We wanted to build something that meets students where they actually are. That's what inspired Clarify: an AI study assistant that adapts not just to what you're studying, but to how you're feeling when you study it.

What it does

Clarify is an AI-powered study assistant that turns PDFs and any topic into personalized flashcard decks and summaries. Core features include:

  • PDF-to-flashcards: Upload a PDF and instantly generate a flashcard deck powered by Claude
  • Chat-based generation: Describe any topic in conversation and get tailored flashcards, no PDF needed
  • Mood-aware content: Choose your current mood (Tired, Stressed, Annoyed, Curious) and get content calibrated to your energy level: fewer, shorter cards when you're tired; deeper, detailed ones when you're curious
  • Cramming sessions: Study decks with keyboard shortcuts, real-time progress tracking, accuracy scoring, and a letter-grade performance summary
  • Weak topic analysis: After each session, Claude identifies which topics you struggled with most based on the cards you got wrong
  • Mood-tailored summaries: Get AI-generated summaries of your uploaded materials, written in a tone that matches your mood

How we built it

Clarify is built on Next.js (App Router) with TypeScript and Tailwind CSS. The frontend handles deck management, study sessions, and PDF uploads entirely client-side, with flashcard data persisted in localStorage.

All AI functionality runs through server-side API routes to keep the Anthropic API key secure. We use Claude Opus 4.6 for flashcard generation, chat-based deck creation, and summarization, and Claude Haiku 4.5 for the post-session weak topic analysis. PDF text extraction uses unpdf, and summaries can be exported to PDF client-side with jsPDF.

Mood-based personalization is implemented through system prompts, each mood maps to a different instruction set controlling tone, card count, and content depth.

Challenges we ran into

  • Reliable JSON extraction from AI responses: Claude's output occasionally includes explanation text around the JSON array. We added a regex fallback (/[[\s\S]*]/) to extract flashcard arrays even when the model adds surrounding prose.
  • Hitting the rate limit on these API's (Originally used Google Gemini but decided to use Claude)
  • Coming up with the UI was slightly challenging. We had to make sure we implemented all of our important functionalities in way it was easy to understand and navigate around.

Accomplishments that we're proud of

  • A mood system that changes the study experience, not just the aesthetics
  • A clean, keyboard-driven cramming session that feels fast and focused
  • Post-session weak topic analysis that closes the feedback loop after studying

What we learned

  • Prompt engineering for structured output (especially JSON) requires defensive parsing; models are helpful but not perfectly consistent
  • Choosing the right AI model for this project was important.
  • Working under a time crunch with new people and with different skillsets was difficult.

What's next for Clarify

  • Cloud sync: Move flashcard storage from localStorage to a proper backend so decks persist across devices
  • Spaced repetition: Implement an SRS algorithm so Clarify schedules review sessions based on your performance history
  • Image support: Extract and reference diagrams/figures from PDFs in flashcard generation
  • Shared decks: Let users export and share decks with classmates
  • More moods and personas: Expand the mood system with more states and user-defined tones

Built With

Share this project:

Updates