This repository contains the XRP Web application source code using React + TypeScript + Vite with a Python FastAPI backend. The XRP is an open-robotics platform designed to help you take your first steps into engineering, robotics, and software development.
The XRP software platform is an integrated development environment where you can develop your robotics software program using either the visual block programming paradigm or the Python language.
- Node.js (v16 or higher)
- Python (v3.8 or higher)
- npm or yarn
-
Clone the repository
git clone <repository-url> cd XRPWeb
-
Install dependencies
npm install
-
Start the development server
npm run dev
The frontend will be available at
http://localhost:3000
The backend provides the XRPCode Buddy AI assistant functionality through a secure FastAPI proxy.
-
Navigate to backend directory
cd backend -
Create Python virtual environment
python -m venv venv # Activate virtual environment # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate
-
Install Python dependencies
pip install -r requirements.txt
-
Set up environment variables
Create a
.envfile in thebackend/directory:# backend/.env GEMINI_API_KEY=your_gemini_api_key_hereGet your free Gemini API key at Google AI Studio
-
Start the backend server
python main.py
The backend API will be available at
http://localhost:8000
For full functionality, run both frontend and backend:
# Terminal 1 - Frontend
npm run dev
# Terminal 2 - Backend
cd backend
source venv/bin/activate # or venv\Scripts\activate on Windows
python main.pyXRP Web includes XRPCode Buddy, an intelligent AI assistant powered by Google Gemini that provides contextual help with your robotics projects. The AI automatically has access to:
- 📚 Complete XRP Documentation - All API references, tutorials, and programming guides
- 💻 Your Current Code - Both Python files and Blockly visual programs you have open
- 🎯 Context-Aware Responses - Answers based on official XRP documentation and your specific code
- Instant Code Help: Get explanations and debugging assistance for your current code
- Documentation-Backed Answers: All responses reference official XRP robotics documentation
- Multi-Language Support: Works with both Python code and Blockly visual programming
- Active File Awareness: Knows which file you're currently editing
- Real-Time Context: Automatically includes your open files in every conversation
- Secure API Proxy: Backend handles API key securely without exposing it to the browser
- Start the backend server (see Backend Setup above)
- Get a free Google Gemini API key at Google AI Studio
- Add API key to backend/.env file as shown in Backend Setup
- Restart the backend server to load the API key
- Click the AI Chat tab in XRP Web
- Start coding - the AI will automatically see your work and XRP documentation!
XRPCode Buddy uses:
- Model: Gemini 2.5 Flash - Google's latest fast and efficient model optimized for real-time conversations and code assistance
- Architecture: FastAPI backend proxy with specialized educational prompts
- Security: API keys stored server-side, not exposed to browser
- Context Management: Automatic file content inclusion and XRP documentation integration