Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Hike-12/BharatAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

162 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

E-Gurukul - Revolutionizing Education in India

E-Gurukul Logo

AI-Powered Multilingual Learning Platform for India

License: MIT Node.js React MongoDB Express.js Lyzr AI


🌟 Overview

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.

🎯 Mission

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.


✨ Key Features

πŸ€– AI-Powered Learning

  • 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

πŸŽ“ Lyzr AI Tutoring System

  • 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

🌏 Multilingual Support

  • 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

πŸ“š Advanced Learning Tools

  • 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

πŸ‘¨β€πŸ« Teacher Dashboard

  • 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

πŸŽ“ Student Experience

  • 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

πŸ—οΈ Architecture

Frontend (React.js)

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 (Node.js + Express)

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

πŸš€ Quick Start

Prerequisites

  • Node.js 18.x or higher
  • MongoDB 6.x
  • npm or yarn package manager
  • Lyzr AI API access

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/bharatai.git
    cd bharatai
  2. Backend Setup

    cd backend
    npm install
    
    # Create .env file
    cp .env.example .env
    # Add your environment variables
  3. Frontend Setup

    cd ../frontend
    npm install
    
    # Create .env file
    cp .env.example .env
    # Add your environment variables
  4. 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
  5. Export Course Data to Lyzr Knowledge Base

    cd backend
    node exportForLyzr.js

    This creates bharatai_knowledge.txt that you can upload to your Lyzr knowledge base.

  6. Start Development Servers

    # Terminal 1 - Backend
    cd backend
    npm run dev
    
    # Terminal 2 - Frontend
    cd frontend
    npm run dev
  7. Open your browser Navigate to http://localhost:5173


πŸ› οΈ Technology Stack

Frontend

  • 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

Backend

  • 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

AI & Machine Learning

  • 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

DevOps & Deployment

  • Vercel - Frontend deployment
  • MongoDB Atlas - Cloud database
  • GitHub Actions - CI/CD pipeline

πŸ€– Lyzr AI Integration

Chat Service Architecture

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

Key Features

// 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"]
}

Knowledge Base Export

Use the export utility to sync course content with Lyzr:

node exportForLyzr.js

This generates:

  • bharatai_courses.json - Structured course data for API
  • bharatai_knowledge.txt - Knowledge base content for Lyzr upload

πŸ“– API Documentation

Authentication Endpoints

POST /api/auth/register    # User registration
POST /api/auth/login       # User login
GET  /api/auth/profile     # Get user profile

Course Management

GET    /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 course

AI Chat Endpoints

POST /api/chat/message     # Send message to AI tutor
GET  /api/chat/history/:courseId  # Get chat history for course

Progress Tracking

GET  /api/progress/:courseId    # Get course progress
POST /api/progress/update       # Update progress
POST /api/progress/quiz-result  # Submit quiz result

Achievement System

GET /api/achievements           # Get all achievements
GET /api/achievements/user      # Get user achievements

🎨 UI/UX Features

Design System

  • 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

Key Components

  • 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

πŸ“Š Analytics & Insights

Student Analytics

  • Learning time tracking
  • Course completion rates
  • Quiz performance metrics
  • AI chat interaction patterns
  • Language preference analysis

Teacher Dashboard

  • Student engagement metrics
  • Course performance analytics
  • AI tutoring effectiveness
  • Content effectiveness reports
  • Regional adoption statistics

AI Insights

  • Most asked questions per course
  • Common learning difficulties
  • Language preference trends
  • AI response effectiveness metrics

πŸ”’ Security Features

  • 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

🌍 Localization

Supported Languages

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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • 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

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages