Skip to content

sherozshaikh/pytorch-interactive-learning-platform

Repository files navigation

PyTorch Interactive Learning Platform 🧠

Python FastAPI License PyTorch

Interactive quiz-based learning platform to master PyTorch from zero to hero! Features comprehensive modules, progress tracking, and admin analytics dashboard.

🚀 Quick Start

Prerequisites

  • Python 3.8 or higher
  • pip package manager

Installation & Setup

# Clone the repository
git clone https://github.com/sherozshaikh/pytorch-interactive-learning-platform.git
cd pytorch-interactive-learning-platform

# Install dependencies
pip install -r requirements.txt

# Run the application
python run.py

Access the Application

📸 Screenshots

Learning Interface

Main Dashboard

Main learning dashboard with module selection

Quiz Interface

Interactive quiz with multiple choice questions

Learning Feedback

Immediate feedback and explanations

Admin Dashboard

Admin Overview

System overview and user statistics

Admin Users

User management and progress tracking

Admin Analytics

Detailed analytics and learning patterns

✨ Features

🎓 Learning Experience

  • Interactive Quizzes: Multiple choice questions with immediate feedback and explanations
  • Progressive Learning: 8 comprehensive modules covering PyTorch fundamentals to advanced topics
  • Advanced Navigation: Previous/Next question buttons for seamless learning flow
  • Progress Tracking: Auto-save your progress and resume exactly where you left off
  • User Journey Tracking: Complete history of all answers, attempts, and learning patterns
  • Review & Retake Modes: Review previous attempts or retake modules to improve your score
  • Personalized Experience: Username-based learning with streak tracking and detailed analytics
  • Session Management: Secure logout with full data persistence
  • Beautiful UI: Modern glass-morphism design with collapsible explanations

🎯 Advanced Learning Features

  • Smart Resume: Return to any module and continue exactly where you left off
  • Module Status Tracking: Visual indicators (Available → In Progress → Completed)
  • Scoring System: +10 points for correct answers, -10 for incorrect (minimum 0%)
  • Time Tracking: Monitor time spent per question and per module
  • Attempt History: All attempts are saved with scores, timestamps, and answers
  • Learning Insights: Comprehensive dashboard showing performance patterns and statistics
  • Collapsible Explanations: Auto-expand for wrong answers, minimize for correct ones
  • Backend-First Architecture: Zero client-side caching ensures data consistency

🔧 Technical Features

  • FastAPI Backend: High-performance web framework with automatic API documentation
  • Pydantic Models: Type-safe data validation and serialization
  • Persistent Storage: Backend JSON storage with automatic file creation
  • Data Validation: Comprehensive validation for questions and modules
  • Admin Dashboard: Complete user analytics and management system
  • Loguru Logging: Detailed file-based logging for debugging and monitoring

📊 Admin Capabilities

  • User Management: View all users and their learning progress
  • Analytics Dashboard: Track learning patterns and completion rates
  • Module Statistics: See which modules are most/least completed
  • Data Management: Clean up old user data and manage retention
  • Real-time Monitoring: Live statistics and user activity tracking

📚 Learning Modules

Module Topic Difficulty Questions
1 What is PyTorch? Beginner 9
2 Tensors: The Building Blocks Beginner 10
3 Tensor Manipulation & Calculations Intermediate 10
4 Tensor Operations Intermediate 5
5 Building Neural Networks Intermediate 5
6 Training Neural Networks Intermediate 5
7 Advanced Neural Network Architectures Advanced 5
8 Optimization & Training Techniques Advanced 5

Total: 54 comprehensive questions covering PyTorch from basics to advanced concepts!

🛠️ Technology Stack

  • Backend: FastAPI, Pydantic, Uvicorn
  • Frontend: HTML5, CSS3, JavaScript (Vanilla)
  • Data Storage: JSON files (local storage)
  • Styling: Modern CSS with glass-morphism effects
  • Validation: Comprehensive data validation scripts

📁 Project Structure

pytorch-interactive-learning-platform/
├── app.py                    # Main FastAPI application
├── run.py                    # Simple run script
├── user_database.py          # User data management
├── requirements.txt          # Python dependencies
├── README.md                 # This file
├── setup.sh                  # Automated setup script
├── validate_data.py          # Data validation script
├── admin_credentials.py      # Admin credential management
├── ADMIN_CREDENTIALS.md      # Admin reference guide
├── data/                     # Data files
│   ├── modules.yaml         # Module metadata
│   ├── questions.jsonl      # All questions (easy to edit!)
│   ├── admin_config.yaml    # Admin configuration
│   └── screenshots/         # Application screenshots
├── static/                   # Static files
│   ├── css/style.css        # Main stylesheet
│   └── js/app.js            # Main JavaScript
└── templates/                # HTML templates
    ├── index.html           # Main learning interface
    └── admin.html           # Admin dashboard

🔐 Admin Dashboard

Access

Changing Admin Credentials

# Method 1: Edit config file
nano data/admin_config.yaml

# Method 2: Use management script
python admin_credentials.py change

Admin Features

  • User Analytics: Track learning patterns and completion rates
  • Module Statistics: See which modules are most/least completed
  • User Management: View individual user progress and streaks
  • Data Cleanup: Remove old user data and manage retention
  • Real-time Stats: Live monitoring of user activity

📖 Content Sources

This learning platform is based on:

🚀 Advanced Usage

Customizing Questions

# Edit questions (JSONL format - one question per line)
nano data/questions.jsonl

# Validate data integrity
python validate_data.py

# Restart application
python run.py

Adding New Modules

# Edit module metadata
nano data/modules.yaml

# Add questions for new module
nano data/questions.jsonl

# Validate and restart
python validate_data.py && python run.py

🔧 Development

Running in Development Mode

# Install development dependencies
pip install -r requirements.txt

# Run with auto-reload
uvicorn app:app --reload --host 0.0.0.0 --port 8000

Data Validation

# Validate all data files
python validate_data.py

# Expected output:
# ✅ Validated 54 questions
# ✅ Validated 8 modules
# ✅ Consistency check passed

🤝 Contributing

We welcome contributions! Here's how you can help:

Adding Questions

  1. Edit data/questions.jsonl
  2. Follow the existing format
  3. Run python validate_data.py to check
  4. Submit a pull request

Improving UI/UX

  1. Modify static/css/style.css or static/js/app.js
  2. Test across different browsers
  3. Ensure mobile responsiveness
  4. Submit your improvements

Adding Features

  1. Fork the repository
  2. Create a feature branch
  3. Implement your changes
  4. Add tests if applicable
  5. Submit a pull request

📊 Performance

  • Startup Time: < 2 seconds
  • Question Loading: < 100ms
  • Admin Dashboard: < 500ms
  • Memory Usage: < 50MB
  • Storage: < 1MB for all data

🐛 Troubleshooting

Common Issues

Port already in use:

# Kill process on port 8000
lsof -ti:8000 | xargs kill -9

# Or use different port
python run.py --port 8001

Data validation errors:

# Check data integrity
python validate_data.py

# Fix any reported issues
# Restart application
python run.py

Admin login issues:

# Check admin credentials
python admin_credentials.py show

# Reset admin password
python admin_credentials.py change

📄 License

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

🙏 Acknowledgments

Core Contributors

  • Sebastian Raschka for the comprehensive PyTorch tutorial
  • PyTorch Team for the amazing deep learning framework
  • FastAPI Team for the excellent web framework

Special Thanks

Special recognition to Prathamesh Pachpatil (prathameshpachpatil@gmail.com) for valuable UX enhancement suggestions that significantly improved the learning experience:

  1. Navigation Enhancement: Implemented Previous Question button (from question 2 onwards) for better navigation flow across all modules
  2. Session Management: Added logout functionality with comprehensive user journey tracking to preserve all learning data
  3. Smart Button Logic: Last question of each module shows "Complete Module" instead of "Next Question" for intuitive flow
  4. Review Functionality: Enabled viewing of previously selected answers and results when revisiting completed modules

These features greatly enhanced the platform's usability and user experience, making it more intuitive and learner-friendly.

📞 Support


🎓 Start Your PyTorch Learning Journey Today!

From zero to hero with interactive quizzes and comprehensive modules

Star Fork Watch

About

PyTorch Interactive Learning Platform - Interactive quiz-based learning platform to master PyTorch from zero to hero! Features comprehensive modules, progress tracking, and admin analytics dashboard.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors