This project is a Docusaurus-based textbook application focused on robotics and AI with an integrated chatbot. The frontend is built with Docusaurus and React, while the backend is a Python FastAPI application.
- Node.js (v18 or higher)
- Python (v3.9 or higher)
- pip (Python package manager)
Hackathone_Book/
├── apps/
│ ├── textbook/ # Docusaurus frontend
│ └── chatbot_backend/ # Python FastAPI backend
├── specs/ # Feature specifications
└── history/ # Prompt history records
Navigate to the chatbot backend directory and start the server:
cd apps/chatbot_backend
pip install -r requirements.txt
python -m uvicorn main:app --host 0.0.0.0 --port 8001The backend will be available at http://localhost:8001
In a separate terminal, navigate to the textbook directory and start the frontend:
cd apps/textbook
npm install
npm run startThe frontend will be available at http://localhost:3000/Hackathone_Book/
- Modern, responsive design with blue (user) and green (bot) message bubbles
- Typing indicators with animated dots
- Relative timestamps (e.g., "2 min ago")
- Smooth animations and transitions
- Works with the FastAPI backend at
http://localhost:8001
- Docusaurus-based documentation site
- Multi-language support (English and Urdu)
- Module-based organization for robotics content
- Interactive chatbot widget integrated throughout
- Port conflicts: Ensure ports 3000 (frontend) and 8001 (backend) are available
- Missing dependencies: Run
npm installinapps/textbook/andpip install -r requirements.txtinapps/chatbot_backend/ - API connection issues: Verify both servers are running and accessible
GET /- Health checkGET /test_qdrant- Test Qdrant connectionPOST /chat- Chat endpoint (expects {"query": "your message"})POST /query_selection- Query with selected text (expects {"selected_text": "", "query": ""})
- The chatbot widget is located at
apps/textbook/src/components/ChatbotWidget.js - The chatbot styling is in
apps/textbook/src/components/ChatbotWidget.css - The backend API is in
apps/chatbot_backend/main.py - All environment variables should be in
.envfiles (not committed to version control)