About the Project

Inspiration

Education today faces a critical challenge: complexity gap. Students struggle when STEM concepts become abstract, formulas seem random, and there's no way to practice at their own pace. Teachers lack tools to quickly adapt complex curricula to different learning levels.

We were inspired by the reality that every student learns differently—some need concepts broken down into simple steps, others learn best through practice problems, and many need both. What if AI could instantly transform any complex STEM content into personalized study materials?

NeuroStem was born from this vision: democratizing STEM education through intelligent AI that meets students where they are.


What it does

NeuroStem is an AI-powered STEM learning platform that transforms how students learn complex subjects through four core capabilities:

1. Intelligent Content Simplification

  • Paste any complex STEM content (formulas, theories, concepts)
  • AI instantly simplifies it to match your grade level (K-8, 9-12, Undergrad, PhD)
  • Get: clear explanations, step-by-step breakdowns, key terminology, practice quiz questions
  • Extract technical formulas with explanations and difficult jargon with definitions

2. Smart Flashcard Generation

  • Auto-generate flashcards from any content
  • Upload images as study material with custom annotations
  • Intelligent spaced repetition algorithm that prioritizes cards you struggle with
  • Track mastery strength, streaks, and bookmarks
  • Filter by topic, type, weak cards, or bookmarked items

3. Adaptive Quiz System

  • Generate unlimited quizzes at three difficulty levels (Easy, Medium, Hard)
  • AI provides hints without spoiling answers
  • Explanations for every question to deepen understanding
  • Difficulty recommendations based on your performance
  • Session analytics showing accuracy, streaks, and weak topics

4. Progress Analytics

  • Real-time visualization of mastery across topics
  • Track known vs unknown cards
  • Identify weak areas automatically
  • Performance trends and topic-specific statistics
  • Session history with detailed breakdowns

Accessibility Features

  • Text-to-speech for all content (input, explanations, quiz options)
  • Dark mode for comfortable studying
  • Fully responsive design (desktop, tablet, mobile)
  • Secure user authentication with session persistence
  • Image upload support for visual learning

How we built it

Tech Stack

Backend (Node.js + Express)

  • Built with Express.js for fast, scalable API
  • SQLite3 for lightweight, file-based persistence
  • JWT + bcryptjs for secure authentication
  • Groq API (llama-3.1-8b-instant) for AI-powered content processing
  • Multer for secure image file uploads

Frontend (Vanilla JavaScript)

  • Pure ES6+ JavaScript (no framework bloat)
  • Responsive CSS3 design system
  • localStorage for session persistence
  • Web Speech API for text-to-speech accessibility
  • Fetch API for seamless backend communication

Infrastructure

  • Backend deployed on Render
  • Frontend hosted on Netlify
  • SQLite database with automatic migrations

Key Development Decisions

  1. AI-First Architecture: Integrated Groq API from ground up for real-time content processing
  2. Database Schema: Optimized for multi-deck management, spaced repetition tracking, and analytics
  3. Session Management: JWT tokens for stateless authentication + refreshable user data
  4. Flashcard Algorithm: Weighted randomization prioritizing low-strength cards and bookmarks
  5. Error Handling: Graceful JSON parsing with fallbacks for AI responses
  6. Transaction Safety: Database transactions for multi-step operations (flashcard generation, quiz creation)

Core Features Implementation

Simplification Engine

User Input → Groq API → JSON Response → Parse & Extract → Display Tabs

Flashcard Generation Flow

Content + Metadata → AI Generation → Validate Cards → DB Transaction → User Dashboard

Quiz System Architecture

Session Creation → Question Generation → Answer Tracking → Analytics Computation

Challenges we ran into

1. AI Response Parsing

Problem: Groq API sometimes returned malformed JSON, extra text, or incomplete structures.

Solution:

  • Built robust JSON extraction with fallback parsing
  • Implemented striping code fences and normalizing quotes
  • Added error recovery with repair logic
  • Handle edge cases (empty responses, missing fields)

2. Spaced Repetition Algorithm

Problem: How do we make flashcard selection intelligent without complex ML?

Solution:

  • Implemented weighted randomization based on card strength
  • Prioritize low-strength cards, bookmarked cards, and weak-revision mode
  • Track streaks to encourage continued practice
  • Adjust weights dynamically based on performance

3. Flashcard Data Complexity

Problem: Cards can have multiple types (text, image, formulas, code). Managing all formats in one system was complex.

Solution:

  • Generic flashcard table with type field
  • Flexible image_path, formula_text, code_text nullable fields
  • Front/back text always present for universal support
  • Type-specific rendering on frontend

4. Session State Management

Problem: Tracking ongoing study sessions while user navigates between pages/tabs.

Solution:

  • Create session record on start, finish on explicit stop
  • Accumulate stats locally, batch send to backend
  • Auto-save timer state to localStorage
  • Clean session data on logout

5. Quiz Difficulty Balancing

Problem: Ensuring "Easy", "Medium", "Hard" actually represent difficulty levels consistently.

Solution:

  • Groq prompt engineering with explicit difficulty instructions
  • Collect performance data (accuracy, streaks) to inform recommendations
  • Generate new questions on-demand for retry mechanism
  • Track accuracy per difficulty level

6. CORS & Authentication

Problem: Frontend and backend deployed separately, JWT tokens need validation.

Solution:

  • Configured CORS to allow specific frontend domain
  • Implemented JWT verification middleware
  • Added Bearer token extraction from headers
  • Refresh token mechanism with localStorage persistence

7. Image Upload & Storage

Problem: Large file uploads, storage limits, filename conflicts.

Solution:

  • Multer with 5MB filesize limit
  • Random filename generation with timestamps
  • Serve from /uploads endpoint with security
  • Validate MIME types to only allow images

Accomplishments that we're proud of

Fully Functional AI-Powered Platform

  • End-to-end system from content input to analytics dashboard
  • Zero external dependencies for UI (pure vanilla JS)
  • Production-ready deployment on Render & Netlify

📊 Intelligent Spaced Repetition

  • Custom algorithm that adapts to user performance
  • Weighted randomization for optimal learning
  • Streak tracking and strength-based prioritization

🎯 Comprehensive Flashcard System

  • Support for 4+ card types (definition, image, formula, code)
  • Smart filtering by topic, type, strength, bookmarks
  • Session tracking with real-time statistics
  • Bookmark feature for personal revision

🧪 Robust Quiz Engine

  • Dynamic question generation at 3 difficulty levels
  • Intelligent hint generation without spoiling answers
  • Performance-based difficulty recommendations
  • Weak topic identification and analytics

🔐 Secure Authentication

  • Bcrypt password hashing with 10 salt rounds
  • JWT token-based sessions (7-day expiry)
  • Protected API endpoints with middleware
  • User-specific data isolation

Accessibility & UX

  • Text-to-speech for all content (learning + accessibility)
  • Dark mode for eye comfort during long study sessions
  • Fully responsive design (mobile-first approach)
  • Hamburger menu for small screens
  • Toast notifications for user feedback

📡 Scalable Architecture

  • REST API with 20+ endpoints
  • Database transactions for data integrity
  • Optimized SQL queries with proper indexing
  • Transaction rollback on errors

📈 Rich Analytics

  • Track mastery progress with visual progress bar
  • Topic-specific performance metrics
  • Session history and statistics
  • Recommendations for next steps

What we learned

Technical Learnings

  1. AI Integration Complexity: Parsing AI-generated content is harder than it seems. We learned the importance of prompt engineering, fallback parsing, and error recovery.

  2. Database Design: Designing a schema that supports multiple card types, multi-user systems, and analytics queries required careful planning and normalization.

  3. Authentication & Security: JWT tokens, password hashing, CORS, and session management are critical for user trust. Never store passwords in plain text.

  4. Vanilla JavaScript Power: Modern JS with Fetch API, localStorage, and Web APIs is powerful enough to build sophisticated UIs without frameworks.

  5. Responsive Design: Mobile-first CSS with flexbox and media queries makes adapting to all screen sizes manageable.

  6. Transaction Safety: Database transactions prevent partial state updates and ensure data integrity in complex multi-step operations.

Product & Design Learnings

  1. User-Centric Features: Bookmarks, filters, and customization matter more than perfection. Users want control.

  2. Algorithm Transparency: Spaced repetition works best when users understand why certain cards appear more often.

  3. Accessibility is Non-Negotiable: Text-to-speech and dark mode aren't "nice-to-have"—they unlock the platform for everyone.

  4. Session-Based UX: Users need clear feedback about what's happening (loading states, timers, progress) to trust the system.

  5. Error Messages Matter: Clear, actionable error messages reduce frustration and support requests.

Team & Process Learnings

  1. Divide & Conquer: Splitting backend (database, AI) and frontend (UI, interactions) allowed parallel development.

  2. API-First Thinking: Designing APIs before UI implementation created clear contracts and fewer integration issues.

  3. Progressive Feature Addition: Starting with content simplification, then flashcards, then quizzes kept the product focused.

  4. Testing in Production: Early deployment revealed real-world issues (CORS, API rate limits, timeout errors) we hadn't anticipated.


What's next for NeuroStem: AI-powered STEM for every mind

Phase 2: Classroom Integration 📚

  • Teacher Dashboard: Create classes, assign study decks, track student progress
  • Class Analytics: Identify struggling students, recommend interventions
  • Bulk Import: Upload curriculum documents to auto-generate study materials
  • Peer Collaboration: Study groups, shared decks, peer reviews

Phase 3: Personalized Learning Paths 🎯

  • Adaptive Curriculum: AI recommends optimal study sequence based on performance
  • Prerequisite Chains: "Master algebra before tackling calculus"
  • Learning Style Detection: Adapt content format (text, image, video) to preference
  • Time Optimization: Estimate study time needed to reach mastery

Phase 4: Multi-Modal Content 🎬

  • Video Integration: Embed YouTube tutorials linked to topics
  • Audio Lectures: Auto-generated summaries of study materials
  • Diagram Recognition: Parse and explain scientific diagrams
  • Handwritten Math: OCR for handwritten formulas and work

Phase 5: Gamification & Motivation 🏆

  • Achievement Badges: Milestones for consistency, mastery, streaks
  • Leaderboards: Friendly competition with classmates
  • Reward System: Points convertible to app features or real prizes
  • Daily Challenges: Topic-specific quests to maintain engagement

Phase 6: Enterprise & Partnerships 🤝

  • LMS Integration: Canvas, Blackboard, Google Classroom plugins
  • School Licensing: District-wide adoption with admin dashboard
  • Publisher Partnerships: Official textbook integration
  • Assessment Exports: Reports compatible with grading systems

Phase 7: Advanced Analytics 📊

  • Predictive Modeling: Predict which students will struggle before they do
  • Content Effectiveness: Measure which explanations work best
  • A/B Testing: Optimize AI prompts and UI flows
  • Research Collaboration: Anonymized data for education research

Immediate Next Steps (Next 2-4 Weeks)

  1. ✅ User feedback collection from hackathon judges
  2. ✅ Performance optimization (reduce AI latency)
  3. ✅ Add subject support (biology, chemistry, physics)
  4. ✅ Implement image recognition for formula extraction
  5. ✅ Build teacher dashboard prototype
  6. ✅ Deploy on more robust infrastructure

Vision

NeuroStem aims to democratize access to world-class STEM education.

Every student deserves:

  • Content explained at their level
  • Unlimited practice without judgment
  • Feedback that helps them improve
  • Tools that work on any device
  • An AI tutor available 24/7

We're building this future, one simplified concept at a time. 🚀

Built With

Share this project:

Updates