Inspiration

Every student knows the struggle of staring at a massive PDF or lecture notes, wondering how to efficiently study for an upcoming exam. Traditional studying is passive (just reading), but cognitive science proves that active recall (testing yourself) is the fastest way to learn. We wanted to build an application that magically bridges this gap—taking any static course material and instantly turning it into an interactive, highly effective study session.

What it does

ScholarWand is a comprehensive AI-powered academic copilot. Its core features include:

  • Doc Engine: Upload any PDF, DOCX, or TXT file, and the AI instantly generates a structured, active-recall drill set (multiple choice and short answer) based strictly on that document.
  • Mock Exam Generator: Generates full-length, timed mock exams across various subjects (like UTME/WAEC prep) or custom university topics, complete with an intuitive exam interface and automatic grading.
  • Smart AI Document Editor: A rich-document editor (built on TipTap) that allows users to write notes, ask the AI to continue writing from their exact cursor position, or highlight text for smart AI editing and formatting.
  • Revision Planner: Automatically generates structured, day-by-day revision timetables based on a student's chosen subject and timeline.

How we built it

ScholarWand is a modern full-stack web application.

  • Frontend: Built with React (Vite), TypeScript, and styled with Tailwind CSS for a highly responsive, clean, and accessible user interface. We used TipTap for the rich-text editing experience and Recharts for data visualization on the student dashboard.
  • Backend: Powered by an Express.js server running in a Node environment.
  • Database & Auth: We integrated Firebase (Firestore) to securely store user profiles, generated drills, and exam histories, alongside Firebase Authentication for secure user sign-ups.
  • AI Integration: The core intelligence is powered by the Gemini API via the @google/genai SDK, utilizing models like gemini-3.1 for rapid text extraction, JSON structuring, and intelligent content generation. We also integrated pdf-parse and mammoth on the server to handle document extraction before feeding the text to the LLM.

Challenges we ran into

One major challenge was ensuring the AI consistently returned perfectly formatted JSON for our drills and mock exams, especially when dealing with very large PDF uploads. Sometimes the server would time out or the LLM would wrap the JSON in markdown blocks. We overcame this by implementing strict system prompts, building robust regex fallbacks to strip markdown, and adding explicit client-side size limits (25MB) and clear error handling for server timeouts.

Another challenge was getting the AI to seamlessly "continue writing" inside the rich document editor. We had to carefully calculate the TipTap cursor position and selection state to ensure the AI inserted text exactly where the user intended.

What we learned

We learned a tremendous amount about prompt engineering for structured data extraction. Forcing an LLM to act as a strict academic evaluator and return parsable data structures requires very deliberate instruction design. We also deepened our knowledge of full-stack deployment, specifically handling file streams and memory buffers in Express for document parsing.

Accomplishments that we're proud of

We are incredibly proud of the Doc Engine's accuracy and speed. Building a pipeline that can take a raw 20-page PDF, parse the text, feed it to Gemini, and return a perfectly structured, interactive quiz interface in just a few seconds feels like real magic.

We're also very proud of the Smart AI Editor. By integrating TipTap with Gemini, we didn't just build a standard chat bot; we built an inline writing assistant where the AI feels like a natural extension of the user's own keyboard—continuing sentences and reformatting highlighted text directly on the page. Finally, managing to ship a complete, polished, full-stack application with a beautiful dark-mode UI within the hackathon timeframe is a huge win for us!

What's next for ScholarWand

We plan to introduce social and community features, allowing students to share their generated drills and collaborate on study guides. We also want to implement spaced repetition algorithms (like Anki) directly into the drill interface, so the app not only tests you, but tells you exactly when you need to review a topic again to prevent forgetting. We also want to implement what is called Wand Tutor where you tell want you want to learn and AI will take you from beginner to expert level.

Built With

Share this project:

Updates