Inspiration

The inspiration for ConsilAI came from recognizing the overwhelming challenge teachers face in managing diverse classrooms where every student has unique needs, learning styles, and behavioral patterns. We've seen teachers struggle to provide individualized attention when they're responsible for 25+ students, each requiring different approaches. Furthermore, special education teachers and those working with neurodiverse students face even greater challenges in developing personalized intervention strategies quickly enough to make a real difference fast.

We realized that while teachers have incredible expertise and dedication, they often lack the time to research and implement evidence-based strategies for each student's specific situation. ConsilAI was born from the vision of giving teachers an AI-powered research assistant that knows each student's unique profile and can instantly provide actionable, research-backed learning plans by pulling from real educational research across the web.

In summary, we wanted to save teachers hours of Googling and reading while giving them better, more targeted support plans.

What It Does

ConsilAI is an intelligent classroom management platform that combines student profiling, automated educational research, and AI-powered plan generation to help teachers create personalized learning strategies for every student.

Core Features:

  • Comprehensive Student Profiles: Teachers create detailed profiles for each student including their issues (behavioral or academic challenges), strengths, goals, and contextual notes
  • Interactive Drag-and-Drop Seating Chart: Visual classroom layout simulator where teachers can arrange students and reason about optimal seating arrangements
  • Automated Research Scraping: The system automatically searches and scrapes real educational research from across the web using Playwright and BeautifulSoup
  • AI-Powered Learning Plans: Azure Phi generates structured, week-by-week action plans combining student profiles with scraped research snippets
  • Deterministic Keyword Extraction: Intelligently expands student issues and goals into targeted search keywords for more relevant research
  • Student Discovery & Filtering: Browse, search, and filter through student profiles to quickly find and manage individual cases
  • Structured Plan Format: Generated plans include overall goals, weekly segments with specific actions, and notes for teachers
  • Monorepo Architecture: Tightly integrated frontend, AI, and scraper packages that all evolve and work together

How We Built It

Frontend Architecture:

  • Built with Next.js 14 using the modern App Router for optimal performance and routing
  • React 18 for component-based UI with server and client components
  • Tailwind CSS for rapid, responsive styling with utility-first approach
  • Implemented drag-and-drop seating chart for intuitive classroom layout management
  • Created clean, accessible interfaces for student profile creation and viewing
  • Designed the Plans page UI ready for AI integration
  • Developed a light and dark mode for the user's personal choice

Backend & Database:

  • Supabase for authentication, database, and real-time capabilities
  • Structured data models for students, profiles, and generated plans
  • Secure environment variable management for API keys

AI Pipeline (packages/ai):

  • TypeScript for type-safe AI integration code
  • Azure OpenAI Phi (Phi-4-mini-instruct) via REST API for plan generation
  • Deterministic keyword extraction using extractStudentKeywords function that expands student issues into targeted search terms
  • Custom prompt builder that assembles student profiles + research snippets + duration into structured prompts
  • Strong typing with ShortTermPlan interfaces for JSON parsing
  • Two-mode operation: with scraper (generateShortTermPlanWithScraper) or pre-computed research (generateShortTermPlan)

Web Scraping Pipeline (packages/scraper):

  • Python 3 with Playwright for browser automation and dynamic content loading
  • Chromium browser for reliable page rendering
  • BeautifulSoup4 for HTML parsing and text extraction
  • Requests library for efficient HTTP operations
  • Bing search used to find top educational resources
  • Intelligent stripping to extract clean, relevant research content
  • Converts raw web content into structured research snippets for AI consumption

Monorepo Structure:

  • Organized as apps/ (frontend, backend stub) and packages/ (ai, scraper, db stub)
  • Allows frontend, AI, and scraper to evolve together during rapid hackathon development
  • Clear separation with well-defined interfaces between components

Complete Data Flow:

  1. Teacher creates student profile (name, grade, issues, strengths, goals, context)
  2. System extracts keywords from profile using deterministic expansion
  3. Python scraper searches web and retrieves research from educational sources
  4. Playwright loads pages, BeautifulSoup extracts clean text
  5. Research snippets + student profile formatted into Azure Phi prompt
  6. Phi generates structured JSON learning plan (2-4 weeks, segmented by week)
  7. TypeScript parser validates and returns strongly-typed ShortTermPlan
  8. Frontend displays actionable plan for teacher

Challenges We Ran Into

Integrating Azure Phi: The AI doesn't always return perfectly formatted JSON. We spent a lot of time tweaking prompts and adding error handling (type validation, fallback mechanisms) to parse responses reliably.

Web Scraping Development: Every educational website is structured differently. We had to make our scraper smart enough to extract actual content while filtering out menus, ads, and irrelevant content. Timing was tricky too since some pages load content dynamically, meaning we needed Playwright to wait for the right elements.

Monorepo Coordination: We had TypeScript handling the frontend and AI calls, while Python did the scraping. Making sure they talked to each other smoothly took some planning, especially around passing data back and forth. Furthermore, there was the coordination among team members to make sure that Git conflicts don't happen (...as often...).

Keyword Extraction Logic: If a teacher says a student "struggles with focus," we need to expand that into useful search terms like "ADHD classroom strategies" or "attention span activities." Building logic to do this consistently was harder than expected since we needed to balance depth and breadth, avoid generating dupes or redundant keywords, and ensure extracted keywords actually matched the results.

Hackathon Time Management: With the limited time, we had to be smart about what to build. We used mock data in the frontend so we could work on the UI while the AI pipeline and database backend were still being developed and debugged. This parallel development saved us a ton of time.

Accomplishments That We're Proud Of!!

  • End-to-End AI Pipeline: Successfully built a complete pipeline from: student profile → keyword extraction → web scraping → AI generation → structured learning plan, all working together seamlessly and in real-time
  • Real Research Integration: Unlike generic chatbot AIs and their responses, our system pulls from actual educational research and search results on the web, making recommendations based on the best practices currently used
  • Monorepo Architecture: Our monorepo structure kept things organized even while rushing. The AI package, scraper, and frontend all have clear boundaries, making it way easier to debug and add features
  • Intelligent Web Scraping: We got web scraping working reliably across different educational sites, which is notoriously finicky. The fact that we can load pages, extract clean content, and pass it to the AI consistently is pretty cool!
  • Deterministic Keyword System: Created a reliable keyword extraction system that consistently generates relevant search terms from student profiles
  • Production-Ready Frontend: Built a polished Next.js interface with Tailwind that's both functional and user-friendly, ready for teacher use!

What We Learned

Technical Skills:

  • Prompt engineering is an art, since getting Azure Phi to consistently return usable JSON took way more tweaking than expected
  • Next.js 14's App Router is powerful but has a learning curve (less if coming from older React patterns, but still quite some)
  • Playwright is amazing for scraping modern websites that load content dynamically
  • Managing a project with TypeScript and Python packages requires clear interfaces and good documentation
  • Supabase makes auth and database stuff way easier than using your own

About the Problem Space:

  • Teachers deal with way more privacy regulations (like FERPA) than we initially thought
  • Actionable, specific advice matters more than research summaries
  • Teachers want to see where information came from since trust is huge (especially in this subject matter where a small change can make a world's difference)
  • Different students need wildly different intervention approaches

Product Decisions:

  • Building with mock data first let us work in parallel and demo early
  • A CLI test script was immensely helpful for debugging the AI pipeline without touching the frontend
  • Cutting scope is hard but necessary since it allowed us to focus on core functionality over bells and whistles
  • Good README files save everyone time, especially under deadline pressure!

Working as a Team:

  • Splitting into clear packages (frontend, backend, AI, scraper) prevented stepping on each other's toes
  • Regular check-ins kept us aligned even when working async
  • Environment variable management is annoying but critical when sharing API keys

What's Next for ConsilAI??

Make It More Useful:

  • Let teachers track which plans they've tried and how they're working
  • Let teachers edit the AI-generated plans before saving them
  • Make it work extremely well on tablets since teachers use those in class

Improve the AI:

  • Pull from more specialized education databases, not just general web searches
  • Add a feedback system so teachers can rate plan effectiveness and improve future suggestions
  • Build different strategies for different needs (ADHD, autism, gifted students, etc.)

Make It Faster:

  • Scrape multiple pages at once instead of one-by-one
  • Cache research we've already scraped so similar students don't trigger repeated searches
  • Show AI responses as they're being generated instead of waiting for the whole thing

Miscellaneous:

  • Add better error handling when scraping fails or APIs are down
  • Minor user-interface quality-of-life updates like little animations and loading placeholders

The Bigger Picture: We want ConsilAI to become a teacher's go-to research assistant. Instead of spending hours Googling and reading studies they might not have time to implement, teachers can get evidence-based strategies tailored to their actual students in minutes. AI won't replace teachers, but it will help; less burnout, better outcomes, and all while being backed by real, verifiable research.

But the thing is that this same system works way beyond classrooms. The core concept of "profile-based research automation" applies to any field where managers need personalized strategies for individuals: HR departments creating employee development plans, healthcare coordinators managing patient care, social workers handling caseloads, coaches training athletes---any situation where you're managing multiple people with unique needs and don't have time to research best practices for each one. That's the real scalability here; we built it for teachers, but the framework solves a universal problem.

Footnotes

Our Team:

  • Chris Chamberland: Frontend, Azure Phi integration
  • Vibby Janardhan: Backend, research and scraper integration
  • Shabeer Manalai: Frontend, Supabase integration
  • Tona Otoro: Frontend, Supabase integration

Thank you! Big thanks to the PatriotHacks organizers for putting this together and to all the judges for taking time to check out our project! We had a blast building ConsilAI these past few days and really appreciate the opportunity!!

Built With

Share this project:

Updates