SaDA AI is an end-to-end AI-powered system for intelligent document analysis and multimodal customer support automation. It combines advanced LLM integrations with a modern, animated React frontend and robust backend using FastAPI. The system provides real-time chat, smart analysis of documents, and intuitive user experiences.
- Frontend: React 19.0.0 + Three.js + GSAP + Framer Motion + Tailwind CSS
- Backend: FastAPI + Python 3.11
- Database: MongoDB
- AI Integration: Gemini API (Google)
- Animations: Three.js, GSAP, Framer Motion
- Styling: Tailwind CSS + Custom 3D CSS
# Current Key (provided in project)
GEMINI_API_KEY=A...
# To get your own key:
# 1. Go to: https://aistudio.google.com/app/apikey
# 2. Create new project or select existing
# 3. Generate API key
# 4. Replace in /app/backend/server.py line 18
# Current Configuration
MONGO_URL=mongodb://localhost:27017
DB_NAME=sada_ai
# To use different database:
# 1. Update /app/backend/.env file
# 2. Change MONGO_URL and DB_NAME variables
MONGO_URL=mongodb://localhost:27017
DB_NAME=sada_ai
REACT_APP_BACKEND_URL=http://your-backend-url
# Change model configuration:
chat = LlmChat(
api_key="your-openai-key",
session_id=session_id,
system_message="Your system message"
).with_model("openai", "gpt-4o") # or other OpenAI models
# Change model configuration:
chat = LlmChat(
api_key="your-anthropic-key",
session_id=session_id,
system_message="Your system message"
).with_model("anthropic", "claude-sonnet-4-20250514")
# OpenAI Models:
'gpt-4.1', 'gpt-4.1-mini', 'o4-mini', 'o3-mini', 'o3', 'gpt-4o', 'o1-pro'
# Anthropic Models:
'claude-sonnet-4-20250514', 'claude-opus-4-20250514', 'claude-3-5-sonnet-20241022'
# Gemini Models:
'gemini-2.5-flash-preview-04-17', 'gemini-2.0-flash', 'gemini-1.5-pro'
- Update API Key: Replace in
/app/backend/server.py
line 18 - Change Model: Update
.with_model()
calls (lines ~85, ~165) - Restart Backend:
sudo supervisorctl restart backend
# Default connection (already configured)
MONGO_URL=mongodb://localhost:27017
DB_NAME=sada_ai
# Collections created automatically:
- chat_sessions
- document_analyses
- chat_messages
- status_checks
# 1. Update /app/backend/.env
MONGO_URL=mongodb://your-mongo-host:27017
DB_NAME=your_database_name
# 2. Or use MongoDB Atlas (cloud):
MONGO_URL=mongodb+srv://username:[email protected]/
DB_NAME=your_database_name
# 3. Restart backend
sudo supervisorctl restart backend
cd /app/backend
pip install -r requirements.txt
# Key packages:
- fastapi==0.110.1
- motor==3.3.1 (MongoDB async driver)
- python-multipart (file uploads)
cd /app/frontend
yarn install
# Key packages:
- [email protected]
- [email protected]
- @react-three/[email protected]
- @react-three/[email protected]
- [email protected]
- [email protected]
# Health Check
GET /api/
# Session Management
POST /api/chat/sessions
GET /api/chat/sessions
GET /api/chat/sessions/{session_id}
# Document Analysis
POST /api/documents/analyze
GET /api/documents/analyses
GET /api/documents/analyses/{session_id}
# Multimodal Chat
POST /api/chat/message
GET /api/chat/messages/{session_id}
# File Upload
POST /api/upload
- Development:
http://localhost:8001
- All API routes must have
/api
prefix - CORS enabled for all origins
// Located in /app/frontend/src/App.js
// 3D Components:
- FloatingOrb (animated spheres)
- AI_Brain (rotating torus rings)
- BackgroundScene (3D environment)
// Animation features:
- Hero section timeline animations
- Scroll-triggered animations
- Hover effect animations
- Loading state animations
/* Current: Cyan-Pink-Orange */
Primary: #06b6d4 (Cyan)
Secondary: #ec4899 (Pink)
Accent: #f97316 (Orange)
/* To change colors, update in /app/frontend/src/App.css */
# Restart all services
sudo supervisorctl restart all
# Individual services
sudo supervisorctl restart frontend
sudo supervisorctl restart backend
# Check status
sudo supervisorctl status
- Frontend:
http://localhost:3000
- Backend:
http://localhost:8001
- API Base:
http://localhost:8001/api
/app/
βββ backend/
β βββ server.py # Main FastAPI application
β βββ requirements.txt # Python dependencies
β βββ .env # Backend environment vars
βββ frontend/
β βββ src/
β β βββ App.js # Main React component with 3D
β β βββ App.css # Enhanced styles & animations
β βββ package.json # Node dependencies
β βββ .env # Frontend environment vars
βββ test_result.md # Testing documentation
# All backend APIs tested and working:
β
LLM Integration (Gemini API)
β
Document Analysis
β
Chat Sessions
β
Multimodal Chat
β
File Upload System
β
3D Animations (Three.js)
β
Advanced GSAP Effects
β
Framer Motion Transitions
β
Responsive Design
β
File Upload Interface
β
Real-time Chat
- Never commit API keys to version control
- Use environment variables in production
- Rotate keys regularly
- 3D animations are GPU-accelerated
- File uploads use base64 encoding
- MongoDB indexes recommended for production
- Chrome 90+ (recommended)
- Firefox 88+
- Safari 14+
- Mobile browsers supported
-
Backend not starting:
tail -n 100 /var/log/supervisor/backend.*.log
-
Frontend build errors:
cd /app/frontend yarn install
-
API connection issues:
- Check
REACT_APP_BACKEND_URL
in frontend/.env - Ensure backend is running on correct port
- Check
-
3D animations not working:
- Check browser WebGL support
- Update graphics drivers
For issues with:
- LLM Integration: Check API key validity
- Database: Verify MongoDB connection
- 3D Graphics: Ensure WebGL support
- Animations: Check browser compatibility
Project Status: β
Production Ready
Backend Tests: β
11/11 Passed
Frontend: β
Fully Functionals
Status: β Ok! all ready to go .....