π€ AI-Powered Python Learning Companion
An intelligent desktop application that transforms how you learn Python programming through AI tutoring, voice interaction, and personalized practice sessions.
Project-R is a comprehensive learning ecosystem that combines cutting-edge AI technology with an intuitive desktop experience. Unlike traditional code editors, Project-R provides:
- AI Tutor: Conversational learning with a local LLM that understands your code and provides personalized guidance
- Voice Interface: Complete hands-free learning through speech-to-text and text-to-speech
- Smart Practice: Auto-generated quizzes that adapt to your learning progress
- Memory System: Tracks your journey and builds on previous sessions
- Interactive Python: Real-time code execution with full interactive support
- Local LLM Integration: Uses Ollama with Gemma models for privacy-focused AI tutoring
- Contextual Help: AI understands your current code and provides relevant assistance
- Conversational Learning: Natural dialogue-based teaching approach
- Session Continuity: AI remembers your progress across sessions
- Speech Recognition: Local Whisper model for accurate voice-to-text
- Natural Speech: High-quality text-to-speech for AI responses
- Hands-Free Coding: Complete voice interaction without typing
- Multi-Platform Audio: Optimized for macOS, Linux, and Windows
- Real-Time Execution: Run Python code instantly with full interactive support
- Input Handling: Supports
input()functions and interactive programs - Error Analysis: Comprehensive error reporting with AI-powered explanations
- Cross-Platform: Works seamlessly across all operating systems
- Auto-Generated Quizzes: Creates practice questions from your learning sessions
- Personalized Review: Generates targeted questions for areas needing improvement
- Progress Tracking: Monitors your performance and learning milestones
- Intelligent Scoring: Detailed feedback and explanations for all answers
- Session Summaries: AI-generated overviews of each learning session
- Learning Progress: Tracks concepts covered and mastery levels
- Persistent Data: Local SQLite database keeps all your data private
- Session Browser: Review past conversations and learning history
- Bun - Install Bun
- Rust - Install Rust
- Python 3 - Available as
python3command - Ollama - Install Ollama and pull
gemma:2bmodel
-
Clone the repository:
git clone <your-repo-url> cd project-r-3
-
Install dependencies:
bun install cd apps/desktop bun install -
Setup AI Models:
# Install and start Ollama ollama pull gemma:2b ollama serve
Start the application:
cd apps/desktop
bun run dev # Start Vite dev server
# In another terminal:
bun run tauri dev # Launch desktop appBuild for production:
cd apps/desktop
bun run tauri build- Launch the app and click "New Session" to begin
- The AI tutor will introduce itself and ask about your learning goals
- Voice Mode: Click the microphone to speak with the AI tutor
- Text Mode: Type your questions in the chat interface
- Code Mode: Write Python code in the editor and get real-time feedback
- Ask questions about Python concepts, syntax, or debugging
- Request explanations, examples, or coding challenges
- Get personalized guidance based on your current skill level
- Take auto-generated quizzes on topics you've learned
- Review session summaries to reinforce key concepts
- Access your learning history anytime
- React 18 with TypeScript for modern UI
- Tailwind CSS for responsive styling
- Monaco Editor for syntax-highlighted coding
- Vite for fast development and building
- Tauri 2.0 for native desktop experience
- Rust backend for performance and security
- Cross-platform support (macOS, Linux, Windows)
- Ollama + Gemma for local AI inference
- Whisper.cpp for speech recognition
- Native TTS for text-to-speech
- CPAL for cross-platform audio handling
- SQLite for local data persistence
- Session management for organized learning
- Practice tracking for progress monitoring
project-r-3/
βββ apps/desktop/ # Main Tauri application
β βββ src/ # React frontend
β β βββ components/ # UI components
β β βββ App.tsx # Main app component
β β βββ Home.tsx # Home page
β β βββ Session.tsx # Learning session interface
β β βββ Practice.tsx # Practice quiz interface
β βββ src-tauri/ # Rust backend
β β βββ src/ # Rust source code
β β β βββ main.rs # Main application entry
β β β βββ llm.rs # AI/LLM integration
β β β βββ audio.rs # Audio recording
β β β βββ whisper.rs # Speech recognition
β β β βββ tts.rs # Text-to-speech
β β β βββ database.rs # Data persistence
β β βββ resources/ # Whisper model files
β βββ public/ # Static assets
βββ package.json # Project configuration
- Local-First: All AI processing happens on your machine
- No Cloud Dependencies: Works completely offline
- Private Data: Your code and conversations never leave your device
- Open Source: Full transparency in how your data is handled
# User asks: "How do I work with lists in Python?"
# AI explains list basics and provides examples
# Create and manipulate lists
fruits = ["apple", "banana", "cherry"]
print(f"I have {len(fruits)} fruits")
# Add items
fruits.append("orange")
fruits.insert(1, "grape")
# Access and modify
print(f"First fruit: {fruits[0]}")
fruits[0] = "green apple"
# List comprehension example
numbers = [1, 2, 3, 4, 5]
squares = [x**2 for x in numbers]
print(f"Squares: {squares}")The AI provides real-time feedback, suggests improvements, and generates practice questions based on the concepts covered.
We welcome contributions! Please feel free to:
- Report bugs or suggest features via GitHub Issues
- Submit pull requests for improvements
- Share your learning experiences and feedback
This project is open source. Check the LICENSE file for details.
Built with β€οΈ for Python learners everywhere