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

Skip to content

editorbymood/Ai-tutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI-Powered Personal Tutor (EdTech Platform)

A comprehensive AI-powered learning platform that personalizes education using Machine Learning and Large Language Models.

πŸš€ Features

For Students

  • Personalized Learning: AI analyzes your learning style and adapts content accordingly
  • AI Tutor Chat: Real-time conversation with AI for explanations and help
  • Custom Quizzes: Auto-generated quizzes based on your performance
  • Progress Analytics: Visual dashboards showing your learning journey
  • Adaptive Content: Lessons that adjust to your pace and understanding

For Teachers

  • Student Analytics: Comprehensive insights into student performance
  • Content Management: Create and manage courses, lessons, and assessments
  • AI-Assisted Content: Generate lesson plans and quizzes with AI
  • Class Management: Monitor multiple students and classes
  • Performance Reports: Detailed reports on student progress

AI & ML Features

  • Learning Style Detection: K-means clustering to identify learning patterns
  • Performance Prediction: ML models predict student outcomes
  • Sentiment Analysis: Analyze student feedback and engagement
  • Content Generation: Gemini AI generates personalized lessons and explanations
  • Adaptive Difficulty: Automatically adjusts content difficulty

πŸ› οΈ Tech Stack

Backend

  • Framework: Django 4.2 + Django REST Framework
  • Database: MongoDB (via djongo)
  • AI/ML: Google Gemini API, scikit-learn, NLTK
  • Authentication: JWT (Simple JWT)
  • Task Queue: Celery + Redis
  • Testing: pytest

Frontend

  • Framework: React 18
  • State Management: Redux Toolkit
  • UI Library: Material-UI (MUI)
  • Charts: Recharts
  • HTTP Client: Axios
  • Routing: React Router v6

ML Models

  • Clustering: K-means for learning style detection
  • Classification: Random Forest for performance prediction
  • NLP: TextBlob for sentiment analysis
  • LLM: Google Gemini for content generation

πŸ“‹ Prerequisites

  • Python 3.10+
  • Node.js 18+
  • MongoDB 6.0+
  • Redis 7.0+
  • Google Gemini API Key

πŸ”§ Installation

1. Clone the repository

git clone <repository-url>
cd "ai powered tutor"

2. Backend Setup

# Create virtual environment
python -m venv venv

# Activate virtual environment
# Windows:
venv\Scripts\activate
# Linux/Mac:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Copy environment file
copy .env.example .env
# Edit .env with your configuration

# Run migrations
python manage.py migrate

# Create superuser
python manage.py createsuperuser

# Load initial data (optional)
python manage.py loaddata initial_data.json

# Start development server
python manage.py runserver

3. Frontend Setup

cd frontend

# Install dependencies
npm install

# Copy environment file
copy .env.example .env.local
# Edit .env.local with your configuration

# Start development server
npm start

4. Start Redis (for Celery)

# Windows (if Redis is installed)
redis-server

# Or use Docker
docker run -d -p 6379:6379 redis:alpine

5. Start Celery Worker

# In a new terminal, activate venv and run:
celery -A backend worker -l info

πŸš€ Usage

  1. Access the application:

  2. Create accounts:

    • Register as a student or teacher
    • Or use the admin panel to create users
  3. For Students:

    • Complete the learning style assessment
    • Browse available courses
    • Chat with AI tutor
    • Take quizzes and track progress
  4. For Teachers:

    • Create courses and lessons
    • Use AI to generate content
    • Monitor student progress
    • Generate reports

πŸ“ Project Structure

ai-powered-tutor/
β”œβ”€β”€ backend/                    # Django project
β”‚   β”œβ”€β”€ settings.py
β”‚   β”œβ”€β”€ urls.py
β”‚   └── wsgi.py
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ users/                 # User management & authentication
β”‚   β”œβ”€β”€ courses/               # Course & lesson management
β”‚   β”œβ”€β”€ assessments/           # Quizzes & tests
β”‚   β”œβ”€β”€ ai_tutor/              # AI chat & content generation
β”‚   β”œβ”€β”€ analytics/             # Progress tracking & analytics
β”‚   └── ml_models/             # ML model training & inference
β”œβ”€β”€ frontend/                  # React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/       # Reusable components
β”‚   β”‚   β”œβ”€β”€ pages/            # Page components
β”‚   β”‚   β”œβ”€β”€ redux/            # State management
β”‚   β”‚   β”œβ”€β”€ services/         # API services
β”‚   β”‚   └── utils/            # Utility functions
β”‚   └── public/
β”œβ”€β”€ ml_models/                # Trained ML models
β”œβ”€β”€ tests/                    # Test files
β”œβ”€β”€ requirements.txt
└── README.md

πŸ§ͺ Testing

Backend Tests

pytest
pytest --cov=apps  # With coverage

Frontend Tests

cd frontend
npm test
npm run test:coverage

πŸ”’ Security Features

  • JWT-based authentication
  • Role-based access control (RBAC)
  • CORS protection
  • SQL injection prevention (via ORM)
  • XSS protection
  • CSRF protection
  • Rate limiting on API endpoints
  • Secure password hashing

πŸ“Š ML Models

Learning Style Clustering

  • Uses K-means to identify 4 learning styles: Visual, Auditory, Reading/Writing, Kinesthetic
  • Features: interaction patterns, content preferences, performance metrics

Performance Prediction

  • Random Forest classifier predicts student success
  • Features: quiz scores, time spent, engagement metrics, learning style

Sentiment Analysis

  • Analyzes student feedback and chat messages
  • Helps identify struggling students early

πŸ€– AI Integration

Google Gemini API

  • Generates personalized lesson content
  • Creates custom quizzes and questions
  • Provides explanations in student's learning style
  • Powers the AI tutor chat interface

🚒 Deployment

Using Docker

docker-compose up -d

Manual Deployment

See DEPLOYMENT.md for detailed instructions.

πŸ“ API Documentation

API documentation is available at:

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

πŸ“„ License

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

πŸ‘₯ Authors

  • Your Name

πŸ™ Acknowledgments

  • Google Gemini API for AI capabilities
  • scikit-learn for ML models
  • Django & React communities

πŸ“§ Support

For support, email [email protected] or open an issue in the repository.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published