đŁ HookED â Learning That Slaps
A gamified microlearning app for neurodivergent minds and curiosity-driven learnersâpowered by the Perplexity Sonar API.
đ Inspiration
After navigating burnout, anxiety, and information overload during my academic journeyâand watching how traditional education fails to meet diverse learning needsâI realized that the lessons that truly stuck with me werenât from textbooks. They came from stories, analogies, and real-life connections.
I also saw how peopleâespecially those with ADHD, short attention spans, or academic pressureâstruggled to stay engaged with text-heavy formats. They needed microlearning thatâs rewarding, visual, and low-pressure. Thatâs when it hit me:
What if learning felt like scrolling TikTokâbut actually made you smarter? That spark led to HookEDâan app that delivers real-time, story-driven microlearning powered by the Perplexity Sonar API.
đ What It Does
HookED turns any topic into a learning adventure. Type in a topicâlike âAI in musicâ or âNapoleonâs fallââand HookED fetches:
- A 60-word real-world âhookâ (powered by Perplexity Sonar API)
- Sources of information
- A quick quiz question to reinforce what you learned
- Optional: A deeper Hook Questâa 5 step journey into related topics
As users complete quests and quizzes, they earn XP, unlock badges, and build streaksâall while learning in short, dopamine-friendly bursts.
đïž How We Built It
| Component | Technology Used | Purpose |
|---|---|---|
| Mobile App | React Native | Custom UI for onboarding, search, quizzes, Hook Feed, and quests |
| Backend | Python + FastAPI | Handles routing, XP logic, profile management, and API requests |
| Database | MongoDB Atlas | Stores users, XP, history, quest states, and badge data |
| AI Integration | Perplexity Sonar API | Generates real-time 60-word hooks, analogies, and citations |
| Visual Engine | Langchain + Gemini 2.0 Flash | Generates fun visuals for quests and learning reinforcement |
| Hosting | AWS | Deployed backend and database using cloud infrastructure |
đ€ How is Perplexity Sonar API Used?
HookED integrates the Perplexity Sonar Pro API to generate real-time, engaging educational content for Gen Z users. Here's how it's used:
đ§© Purpose
- To generate bite-sized educational hooks, analogies, quizzes, and riddles based on current trends.
- To output structured JSON content ready for rendering in the app as feeds or quests.
âïž Integration Flow
Prompt Templating Langchain is used to format prompts with both system-level instructions and dynamic user inputs (e.g., âExplain inflation using Gen Z lingoâ).
Structured Output with Schema The Sonar Pro API is called with a defined output schema (hook, analogy, quiz, riddle), ensuring responses are developer-friendly JSON.
Fallback Parsing If the response isn't valid JSON, a custom parser (
extract_valid_json) intelligently strips markdown/code blocks and extracts the valid JSON portion.Real-Time Feed + Quest Creation The structured response is used to create:
- Feed Cards â Trending facts, analogies, and insights.
- HookQuests â Gamified learning modules with quizzes and riddles.
đ Why Sonar Pro?
- Trained on real-time web data for hyper-relevant results.
- Handles informal, meme-like prompts better than traditional models.
- Perfect for short attention span learners who prefer quick, fun learning formats.
đ§ Challenges We Ran Into
đ§ Turning Hooks into Hits Cleaning up AI outputs into crisp, 60-word insights wasnât easy. We spent hours refining language, trimming fluff, and making sure each hook wasnât just accurateâbut instantly engaging.
đŻ Quizzes Werenât Plug-and-Play We couldnât just drop in AI-generated questions. We had to build logic that could interpret loosely structured responses and transform them into meaningful, balanced multiple-choice quizzes.
đź Designing for Dopamine, Not Distraction Creating a scrollable UI that balances fun, focus, and feedbackâespecially for neurodiverse usersâmeant lots of iteration. Every tap and transition had to feel intentional.
đ§© HookQuests Needed Story, Not Just Structure Users donât learn in fragments. We built custom clustering logic to connect separate searches into a narrative arc, making each quest feel like a journeyânot a jumble.
đ Sonar â Chain-of-Thought... At First Sonar Pro wasnât built for deep reasoning, so we hacked around itâliterally. A GitHub-thread-inspired method let us simulate chain-of-thought logic, giving users smarter, more layered responses.
đïž Prompt Engineering = Full-Time Job We fine-tuned dozens of prompts to get the right tone, structure, and analogy depth. It took serious trial-and-error, but getting it âjust rightâ made all the difference.
đ§ź Algorithms Under Pressure From XP systems to badge logic and learning path generation, we built custom flows in real time. It pushed us technicallyâand made the end result that much more rewarding.
đ Accomplishments That We're Proud Of
- Designed a learning app for real cognitive needsâespecially for users with ADHD, anxiety, or short attention spans.
- Integrated real-time AI content into a gamified mobile app.
- Built Hook Questsâpersonalized, theme-based learning journeys using search history and analogical thinking.
- Crafted a smooth UI that feels like TikTok for knowledgeâlightweight, intuitive, and addictive (in a good way).
- Turned LLM outputs into structured, quizable knowledge with XP, streaks, and storylines.
đ§ What We Learned
LLMs are powerfulâbut unpredictable We learned to prompt, debug, and adapt to a constantly evolving API.
Designing for neurodivergent users is all about empathy From visuals to feedback, everything needed to reduce overwhelm and increase emotional safety.
Gamification needs to feel earned XP and badges only motivate when they align with meaningful progress.
React Native + FastAPI are a great match Fast iteration with smooth mobile/backend integration.
AI text â structured logic takes creativity Whether itâs extracting APA citations or building a quiz, LLM output always needs smart post-processing.
đź Whatâs Next for HookED
- Hook History & Recommendations â Let users revisit topics and get personalized suggestions based on past learning.
- Social Learning â Enable study squads, shared Hook Quests, and community leaderboards.
- Advanced Quiz Engine â Use GPT-style models to generate context-aware, multi-step quizzes dynamically.
- Mood-Based Hooking â Let users input their mood and receive emotionally resonant learning hooks.
- Offline Mode + Multilingual Hooks â Expand accessibility and global reach.
đ„ Demo Video
đș Watch Demo (3 mins)
đ Repository
Shared With:
đ· Submission Info
- Category: Health
- Bonus Category: Deep Research
- Team: Aishwarya Jakka, Rahul Rao, and Siddarth Karmokar
- Main Tool Used: Perplexity Sonar API
đŹ Contact
Created by Aishwarya Jakka, Rahul Rao, and Siddharth Karmokar
aishwaryajakka@gmail.com siddkarmokar@gmail.com rahulyup@gmail.com
đ License
MIT License â Open for educational, non-commercial, and community use.
Built With
- amazon-web-services
- android
- fastapi
- ios
- langchain
- mongodb
- perplexity-sonar-api
- react-native

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