An AI-enhanced interactive textbook for learning Physical AI, built with Docusaurus, FastAPI, and Google Gemini.
- 📚 Interactive Textbook: Comprehensive curriculum on ROS 2, Gazebo, NVIDIA Isaac, and VLA
- 🤖 AI-Powered RAG Chatbot: Ask questions about textbook content
- 👤 User Authentication: Better-auth integration with background collection
- 🎯 Content Personalization: Adapt chapters to your experience level
- 🌍 Urdu Translation: Translate chapters to Urdu with one click
- 💬 Selected Text Q&A: Highlight text and ask questions about it
- Node.js 18+
- Python 3.11+
- Google Gemini API Key
# Install dependencies
npm install
# Start development server
npm start
# Build for production
npm run buildThe site will open at http://localhost:3000
# Navigate to backend
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
# Edit backend/.env with your API keys
# Run migrations
alembic upgrade head
# Start server
uvicorn app.main:app --reloadThe API will be available at http://localhost:8000
REACT_APP_API_BASE_URL=http://localhost:8000/api/v1# Database
DATABASE_URL=sqlite:///./physical_ai_textbook.db
# Qdrant Vector Database
QDRANT_URL=http://localhost:6333
QDRANT_API_KEY=
# Google Gemini
GOOGLE_API_KEY=AIzaSyAV9ynWcw7Z3554ovVYMalpX_fEuhnY-lg
GEMINI_MODEL=gemini-2.0-flash-exp
# JWT
SECRET_KEY=your-super-secret-dev-key-change-in-production
# App Settings
ENVIRONMENT=development
FRONTEND_URL=http://localhost:3000- Chapter 1.1: ROS 2 Basics
- Chapter 1.2: Advanced Communication
- Chapter 1.3: Navigation & Transforms
- Chapter 2.1: Gazebo Fundamentals
- Chapter 2.2: Sim-to-Real Transfer
- Chapter 2.3: Multi-Robot Systems
- Chapter 3.1: Computer Vision
- Chapter 3.2: Isaac Sim
- Chapter 3.3: Reinforcement Learning
- Chapter 3.4: Perception-Action Pipelines
- Chapter 4.1: LLMs for Robotics
- Chapter 4.2: Vision-Language-Action Models
- Chapter 4.3: Capstone Project
- Framework: Docusaurus 3.0
- Auth: Better-auth
- Styling: Custom CSS with beautiful gradients
- State Management: React Context + TanStack Query
- API: FastAPI
- AI: OpenAI Agents SDK + Google Gemini
- Vector DB: Qdrant
- Database: SQLite (dev) / PostgreSQL (prod)
- Auth: Better-auth sessions
The textbook features:
- Modern indigo/purple AI-themed color palette
- Stunning dark mode
- Smooth animations and transitions
- Readable typography (Inter + JetBrains Mono)
- Gradient buttons and surfaces
- Shadow effects for depth
Click "Personalize for Me" at the start of any chapter to adapt the content based on your:
- Software experience (beginner/intermediate/advanced)
- Hardware experience (none/hobbyist/professional)
Click "Translate to Urdu" to get the chapter in Urdu with:
- Technical terms kept in English
- Proper right-to-left formatting
- Beautiful Urdu typography
- Ask questions about the textbook
- Get answers grounded in course content
- Highlight text and ask specific questions
- Conversation history maintained
# Update docusaurus.config.js with your GitHub info
# Build the site
npm run build
# Deploy
GIT_USER=<your-username> npm run deploy# Install Vercel CLI
npm i -g vercel
# Deploy
vercelMIT License - feel free to use for education!
Contributions welcome! Please read our contributing guidelines first.
Questions? Open an issue or reach out to the team!
Built with ❤️ using Docusaurus, FastAPI, and Google Gemini