E-Gurukul is a cutting-edge AI-powered educational platform designed specifically for India's diverse linguistic landscape. Our platform democratizes quality education by providing personalized learning experiences in multiple Indian languages, making education accessible to every corner of Bharat.
To bridge the educational divide in India by leveraging AI technology to create inclusive, multilingual learning experiences that adapt to individual learning styles and regional languages.
- Intelligent Course Generation: Automatically creates comprehensive courses from PDF uploads using advanced AI
- Lyzr AI Tutor: Personal AI assistant for each course with contextual understanding
- Smart Q&A System: Real-time doubt resolution with course-specific knowledge
- Personalized Learning Paths: Adaptive content delivery based on student progress and preferences
- Smart Content Translation: Real-time translation across 20+ Indian languages
- Context-Aware Responses: AI tutor understands course content, student progress, and learning context
- Multilingual Support: Responds in student's preferred language with cultural awareness
- Interactive Suggestions: Provides relevant follow-up questions and learning paths
- Course Integration: Deep integration with course materials, quizzes, and progress tracking
- Conversation History: Maintains learning conversation context across sessions
- 20+ Indian Languages: Hindi, Tamil, Telugu, Bengali, Marathi, Gujarati, Kannada, Malayalam, Punjabi, and more
- Cultural Context Awareness: Content adapted for regional cultural nuances
- Real-time Language Switching: Seamless language switching without losing progress
- Interactive Quizzes: AI-generated assessments with instant feedback
- Visual Diagrams: Mermaid.js integration for flowcharts and concept maps
- Progress Tracking: Comprehensive analytics and achievement system
- Video Integration: Multimedia content support for enhanced learning
- AI Chat History: Persistent conversation tracking for continuous learning
- Course Creation Wizard: Step-by-step course creation from PDF materials
- Lyzr Knowledge Export: Export course content to Lyzr knowledge base for AI tutoring
- Content Editor: Rich text editor with multimedia support
- Student Analytics: Detailed insights into student performance and AI interactions
- Private Courses: Password-protected courses for institutional use
- Personalized Dashboard: Customized learning environment
- AI Study Companion: 24/7 available Lyzr AI tutor for instant help
- Achievement System: Gamified learning with badges and points
- Progress Sharing: Social features to share learning milestones
- Offline Support: Download content for offline learning
frontend/
βββ src/
β βββ components/ # Reusable UI components
β β βββ landing/ # Landing page components
β β βββ teacher/ # Teacher dashboard components
β β βββ chat/ # AI chat interface components
β β βββ translatePart/ # Translation components
β βββ context/ # React Context providers
β βββ assets/ # Static assets
β βββ utils/ # Utility functions
backend/
βββ controllers/ # Route handlers
βββ models/ # MongoDB schemas
β βββ ChatHistory.js # AI conversation storage
βββ routes/ # API routes
β βββ chatRoutes.js # Lyzr AI chat endpoints
βββ services/ # Business logic
β βββ lyzrChatService.js # Lyzr AI integration
β βββ groqService.js # AI course generation
β βββ geminiService.js # Diagram generation
βββ middleware/ # Authentication & validation
βββ config/ # Database configuration
βββ exportForLyzr.js # Knowledge base export utility
- Node.js 18.x or higher
- MongoDB 6.x
- npm or yarn package manager
- Lyzr AI API access
-
Clone the repository
git clone https://github.com/yourusername/bharatai.git cd bharatai -
Backend Setup
cd backend npm install # Create .env file cp .env.example .env # Add your environment variables
-
Frontend Setup
cd ../frontend npm install # Create .env file cp .env.example .env # Add your environment variables
-
Environment Variables
Backend (.env)
MONGO_URI=mongodb://localhost:27017/bharatai JWT_SECRET=your_jwt_secret_key GROQ_API_KEY=your_groq_api_key GEMINI_API_KEY=your_gemini_api_key LYZR_API_KEY=your_lyzr_api_key LYZR_AGENT_ID=your_lyzr_agent_id PORT=5000
Frontend (.env)
VITE_NODE_BASE_API_URL=http://localhost:5000
-
Export Course Data to Lyzr Knowledge Base
cd backend node exportForLyzr.jsThis creates
bharatai_knowledge.txtthat you can upload to your Lyzr knowledge base. -
Start Development Servers
# Terminal 1 - Backend cd backend npm run dev # Terminal 2 - Frontend cd frontend npm run dev
-
Open your browser Navigate to
http://localhost:5173
- React 18.x - Modern UI library with hooks
- Vite - Lightning-fast build tool
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Smooth animations and transitions
- React Router - Client-side routing
- Axios - HTTP client for API calls
- Node.js - JavaScript runtime
- Express.js - Web application framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- JWT - JSON Web Token authentication
- Multer - File upload handling
- PDF-Parse - PDF text extraction
- Lyzr AI - Advanced conversational AI tutoring system
- Groq API - Large language model for content generation
- Google Gemini - Advanced AI for diagram generation
- Natural Language Processing - Text analysis and translation
- Vercel - Frontend deployment
- MongoDB Atlas - Cloud database
- GitHub Actions - CI/CD pipeline
The LyzrChatService provides intelligent tutoring through:
- Course Context Awareness: AI understands specific course content and structure
- Student Personalization: Adapts responses based on student preferences and progress
- Multilingual Responses: Supports conversations in multiple Indian languages
- Intelligent Fallbacks: Graceful degradation with mock responses when API is unavailable
// Real-time AI tutoring
POST /api/chat/message
{
"message": "Explain photosynthesis in Hindi",
"courseId": "course_id",
"conversationHistory": []
}
// Response includes:
{
"success": true,
"response": "AI tutor response in preferred language",
"suggestions": ["Follow-up questions"],
"relatedContent": ["Related course topics"]
}Use the export utility to sync course content with Lyzr:
node exportForLyzr.jsThis generates:
bharatai_courses.json- Structured course data for APIbharatai_knowledge.txt- Knowledge base content for Lyzr upload
POST /api/auth/register # User registration
POST /api/auth/login # User login
GET /api/auth/profile # Get user profileGET /api/courses # Get all courses
POST /api/courses/create # Create new course
GET /api/courses/:id # Get course details
PUT /api/courses/:id # Update course
DELETE /api/courses/:id # Delete coursePOST /api/chat/message # Send message to AI tutor
GET /api/chat/history/:courseId # Get chat history for courseGET /api/progress/:courseId # Get course progress
POST /api/progress/update # Update progress
POST /api/progress/quiz-result # Submit quiz resultGET /api/achievements # Get all achievements
GET /api/achievements/user # Get user achievements- Dark/Light Mode: Automatic theme switching with user preference
- Responsive Design: Mobile-first approach with seamless desktop experience
- Accessibility: WCAG 2.1 compliant with keyboard navigation support
- Micro-interactions: Smooth animations and feedback for user actions
- AI Chat Interface: Real-time conversational learning with Lyzr AI
- Interactive Course Viewer: Immersive learning experience with progress tracking
- Drag-and-Drop Course Editor: Intuitive content creation interface
- Real-time Language Switcher: Instant language changing without page reload
- Achievement Showcase: Gamified progress display with social sharing
- Learning time tracking
- Course completion rates
- Quiz performance metrics
- AI chat interaction patterns
- Language preference analysis
- Student engagement metrics
- Course performance analytics
- AI tutoring effectiveness
- Content effectiveness reports
- Regional adoption statistics
- Most asked questions per course
- Common learning difficulties
- Language preference trends
- AI response effectiveness metrics
- JWT Authentication: Secure token-based authentication
- Password Encryption: Bcrypt hashing for user passwords
- Input Validation: Comprehensive input sanitization
- Rate Limiting: API rate limiting to prevent abuse
- CORS Protection: Cross-origin resource sharing configuration
- AI Content Filtering: Lyzr AI ensures appropriate educational responses
| Language | Code | Lyzr AI Support | Status |
|---|---|---|---|
| English | en | β | β Complete |
| Hindi | hi | β | β Complete |
| Tamil | ta | β | β Complete |
| Telugu | te | β | β Complete |
| Bengali | bn | β | β Complete |
| Marathi | mr | β | β Complete |
| Gujarati | gu | β | β Complete |
| Kannada | kn | β | β Complete |
| Malayalam | ml | β | β Complete |
| Punjabi | pa | β | β Complete |
This project is licensed under the MIT License - see the LICENSE file for details.
- Lyzr AI: For providing the advanced conversational AI tutoring capabilities
- Indian Education System: For inspiring the need for inclusive education technology
- Open Source Community: For the amazing tools and libraries that made this possible
- Beta Testers: Early adopters who provided valuable feedback
- Contributors: All developers who have contributed to this project
Made with β€οΈ for Bharat Powered by π€ Lyzr AI
β Star this repo β’ π Report Bug β’ π‘ Request Feature