EduQueryBot - Smart Study Buddy
A modern Next.js application that serves as an intelligent educational chatbot. Built with React 19, TypeScript, and shadcn/ui components, this app provides an interactive learning experience with semantic search capabilities. Currently features a demo knowledge base with educational content, designed to integrate with MindsDB Knowledge Bases for advanced AI-powered learning assistance.
š Quick Start
Automated Setup (Recommended)
Manual Setup
Open http://localhost:3000 in your browser to start chatting!
š Features
Core Functionality
Semantic Search: Natural language queries using MindsDB Knowledge Base
Subject Filtering: Filter by Science, Math, History, English, Geography
Grade Level Filtering: Elementary, Middle School, High School, College
Metadata Enhancement: Subject, grade, topic, and confidence scoring
AI Summarization: Intelligent content summarization using AI Tables
Real-time Chat Interface: Interactive chat experience with typing indicators
MindsDB Integration
ā
CREATE KNOWLEDGE_BASE: EduContentKB with educational content
ā
INSERT INTO knowledge_base: Structured educational data with metadata
ā
Semantic Queries: `SELECT ... WHERE content LIKE` for natural language search
ā
CREATE INDEX: Optimized semantic search performance
ā
metadata_columns: subject, grade, topic for enhanced filtering
ā
Mixed Filtering: Combined content and metadata queries
ā
JOB Automation: Weekly curriculum updates via scheduled jobs
ā
AI Table Integration: Content summarization pipeline
š ļø Tech Stack
Framework: Next.js 15.2.4 with App Router
Frontend: React 19, TypeScript 5.8.3
UI Components: shadcn/ui, Radix UI primitives
Styling: Tailwind CSS 3.4.17 with custom gradients
Icons: Lucide React
Package Manager: pnpm (recommended)
Backend: Next.js API Routes
Database: MindsDB Knowledge Base (demo uses sample data)
Development: Hot reload, TypeScript support, ESLint
š¦ Installation & Setup
Prerequisites
Node.js: Version 18 or higher
Package Manager: pnpm (recommended) or npm
Git: For cloning the repository
1. Clone the Repository
2. Install Package Manager (if needed)
If you don't have pnpm installed:
3. Install Dependencies
4. Environment Variables (Optional)
Copy the environment template:
Edit
.env.local with your configuration:5. Start Development Server
The application will be available at:
Local: http://localhost:3000 (or 3001 if 3000 is busy)
Network: Available on your local network
6. VS Code Integration
If using VS Code, you can use the predefined tasks:
Ctrl+Shift+P ā "Tasks: Run Task"
Choose from:
Run Development ServerBuild ProductionLint CodeStart Production ServerInstall Dependenciesš ļø Available Scripts
Command Description
pnpm run dev Start development server with hot reload pnpm run build Build the application for production pnpm run start Start the production server pnpm run lint Run ESLint for code quality checksšļø Project Structure
š§ Development
Hot Reload
The development server supports hot reload. Changes to files will automatically update the browser.
Code Quality
TypeScript: Full type safety
ESLint: Code linting with Next.js rules
Prettier: Code formatting (configure in your editor)
Debugging
Browser DevTools: Standard React DevTools
VS Code: Built-in debugging support
Console Logs: Check browser console for errors
šØ Troubleshooting
Common Issues
Port Already in Use
If port 3000 is busy, Next.js will automatically try 3001, 3002, etc.
pnpm Not Found
Hydration Errors
The app includes hydration-safe components. If you see hydration warnings:
Check browser console for details
Ensure client-only code uses the
useMounted hookRestart the development server
Dependencies Issues
šÆ Demo vs Production
Current Demo Features
Sample Knowledge Base: Pre-loaded educational content
Simulated AI Responses: Mock chatbot interactions
Full UI/UX: Complete interface design
Filtering System: Subject and grade level filters
Analytics Dashboard: Usage statistics and metrics
Production Integration (MindsDB)
To connect with a real MindsDB Knowledge Base:
Update Environment Variables:
Modify API Routes: Update
/app/api/query/route.ts to use real MindsDB queries instead of sample dataDatabase Scripts: Use the SQL scripts in
/scripts/ to set up your MindsDB Knowledge BaseMindsDB Knowledge Base Setup
See
/scripts/create-knowledge-base.sql for the complete setup.š Usage Examples
Basic Queries
"What is photosynthesis?"
"Explain Newton's Laws of Motion"
"Tell me about renewable energy"
"How does the water cycle work?"
Filtered Queries
Filter by subject: Science, Math, History
Filter by grade: Elementary, Middle, High School, College
Combined filters for targeted learning
Advanced Features
Confidence scoring for answer reliability
Related topic suggestions
Multi-result summarization
Real-time response streaming
š Analytics Dashboard
Track usage patterns and knowledge base performance:
Total queries processed
Popular subjects and topics
Average confidence scores
Active user metrics
Knowledge base coverage
š§ API Endpoints
POST /api/query
Query the knowledge base with natural language.
Request: ```json { "query": "What is photosynthesis?", "subject": "science", "grade": "middle" } ```
Response: ```json { "response": "Detailed explanation...", "metadata": { "subject": "science", "grade": "middle", "topic": "photosynthesis", "confidence": 0.92 }, "searchResults": 3 } ```
šÆ MindsDB Features Implemented
Feature Implementation Points CREATE KNOWLEDGE_BASE ā
EduContentKB Base INSERT INTO knowledge_base ā
Educational content with metadata Base Semantic queries ā
Natural language search Base CREATE INDEX ā
Semantic indexing Base metadata_columns ā
subject, grade, topic +10 Mixed filtering ā
Content + metadata queries Base JOB automation ā
Weekly curriculum updates +10 AI Table integration ā
Content summarization +10
Total Development Points: 70/70 ā
š Documentation
README.md: Complete setup and usage guide
API Documentation: Endpoint specifications
Database Schema: Knowledge base structure
Deployment Guide: Production setup instructions
š Deployment
Production Build
Vercel (Recommended)
Push your code to GitHub
Connect to Vercel
Deploy automatically
Or use Vercel CLI:
Other Platforms
Netlify: Supports Next.js out of the box
Railway: Easy deployment with Git integration
Docker: Use the included configuration
Environment Variables for Production
Set these in your deployment platform:
š¤ Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
š License
MIT License - see LICENSE file for details.
š Support
For issues and questions:
Create an issue on GitHub
Check the documentation
Contact the development team
EduQueryBot - Making learning smarter, one query at a time! šāØ ```
0 likes Ā· 5 views Ā· Sep 13, 2025
Developed EduQueryBot, an educational chatbot with AI features.