NeoMentor is a fully functional multi-agent AI system that generates educational videos using Google's Vertex AI, Firebase for authentication and database, and advanced voice cloning technology. The system processes text prompts, images, and audio through a sophisticated pipeline of specialized agents to create high-quality educational content. Project Demo
- π― Vertex AI Integration: Uses Google's Gemini 2.0 Flash model for educational content generation
- π¬ Video Generation: Google Veo 2.0 for professional educational video creation
- π€ Voice Cloning: F5-TTS for natural speech synthesis and voice generation
- π€ Multi-Agent Pipeline: Specialized agents for formatting, research, scheduling, analytics, media generation, and final assembly
- π Course & Syllabus Scheduling: AI-powered course and syllabus scheduling
- π Analytics: User and session analytics with insights and recommendations
- π Frame Continuity: Seamless video transitions using extracted frames
- β‘ Real-time Processing & Logs: FastAPI backend with WebSocket support for live updates and log streaming
- π Authentication: Google Firebase Authentication
- πΎ Database: Firestore for session and user data storage
- π± Modern Responsive UI: Beautiful React TypeScript interface with Tailwind CSS
- π§ Fully Functional: Complete working system with actual AI models
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β React Frontend β β FastAPI Backend β β Google ADK β
β (TypeScript) βββββΊβ (Python) βββββΊβ Agents β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Formatter Agent: Processes and formats input data
- Research Agent: Conducts relevant research and fact-checking
- Scheduler Agent: AI-powered course and syllabus scheduling
- Analytics Agent: Provides user/session analytics and recommendations
- Video Generation Agent: Creates video content based on inputs
- Final Agent: Merges all components into the final output
- React 19 with TypeScript
- Tailwind CSS for styling
- Axios for API communication
- Custom NeoMentor branding with integrated icon
- Firebase SDK for authentication
-Google ADK for well built AI Agents
- FastAPI for high-performance API
- Google Vertex AI with Gemini 2.0 Flash
- Firebase Admin SDK for authentication
- Firestore for database operations
- WebSockets for real-time updates
- F5-TTS for voice cloning
- FFmpeg for media processing
- Python 3.9+ with async/await support
For immediate deployment, follow this checklist:
-
Environment Setup
- Copy
.env.exampleto.envin both backend and frontend directories - Configure all environment variables with your actual values
- Place
service-account-key.jsonin backend directory
- Copy
-
Firebase/Google Cloud Setup
- Create Firebase project and enable Authentication, Firestore
- Enable Vertex AI API in Google Cloud Console
- Create service account with proper permissions
- Download service account JSON key
-
Dependencies
- Install Docker and Docker Compose (for containerized deployment)
- Or install Python 3.9+, Node.js 16+ (for local deployment)
Option 1: Docker (Recommended)
docker-compose up -dOption 2: Local Development
./start_dev.shOption 3: Manual
# Terminal 1
cd backend && uvicorn main:app --host 0.0.0.0 --port 8000
# Terminal 2
cd frontend && npm start- Python 3.9+
- Node.js 16+ and npm
- Google Cloud Account with billing enabled
- Firebase Project (instructions below)
- FFmpeg installed on your system
- Go to Firebase Console
- Click "Add project" β Enter name (e.g., "neomentor-app") β Create project
- In Firebase project β "Authentication" β "Get started"
- Go to "Sign-in method" tab β Enable "Google" sign-in provider
- Add your support email β Save
- Click "Firestore Database" β "Create database"
- Choose "Start in test mode" β Select region β Done
Go to Google Cloud Console and enable:
- Vertex AI API
- Firebase Admin SDK API
- Cloud Storage API
- Go to "IAM & Admin" β "Service Accounts" β "Create Service Account"
- Name:
neomentor-backend - Grant roles:
- Firebase Admin SDK Administrator Service Agent
- Cloud Datastore User
- Vertex AI User
- Create and download JSON key β Save as
service-account-key.jsonin backend folder
- Project Settings β Scroll to "Your apps" β Add Web App
- Register app β Copy the config object
-
Clone and Setup
git clone <repository-url> cd NeoMentor
-
Backend Setup
cd backend pip install -r requirements.txt -
Frontend Setup
cd frontend npm install -
Environment Configuration
Backend (.env)
# Firebase Configuration GOOGLE_APPLICATION_CREDENTIALS=./service-account-key.json FIREBASE_PROJECT_ID=your-project-id # Google Cloud GOOGLE_CLOUD_PROJECT=your-project-id GOOGLE_CLOUD_LOCATION=us-central1 # Application Settings UPLOAD_FOLDER=./uploads GENERATED_MEDIA_FOLDER=./generated_media LOG_FOLDER=./logs MAX_FILE_SIZE=50MB
Frontend (.env)
REACT_APP_API_URL=http://localhost:8000 REACT_APP_FIREBASE_API_KEY=your-api-key REACT_APP_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com REACT_APP_FIREBASE_PROJECT_ID=your-project-id REACT_APP_FIREBASE_STORAGE_BUCKET=your-project.appspot.com REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your-sender-id REACT_APP_FIREBASE_APP_ID=your-app-id
cd backend
python -c "
import firebase_admin
from firebase_admin import credentials, firestore
cred = credentials.Certificate('./service-account-key.json')
firebase_admin.initialize_app(cred)
db = firestore.client()
db.collection('users').document('init').set({'created': True})
db.collection('sessions').document('init').set({'created': True})
print('Firestore collections initialized!')
"Terminal 1 - Backend
cd backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000Terminal 2 - Frontend
cd frontend
npm startOr use the provided script:
# Make executable and run
chmod +x start_dev.sh
./start_dev.shThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Enter a Text Prompt: Describe what you want NeoMentor to create
- Upload an Image: Provide visual context for your request
- Upload an Audio File: Add audio elements to your content
- Click "Generate Video": Let the AI agents process your inputs
- View Real-time Logs: Watch live progress and logs in the UI
- Download Your Video: Get your personalized video content
- View Analytics: Access analytics and recommendations for your sessions
Firestore Rules (firestore.rules):
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Users can read/write their own data
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
// Sessions - users can read/write their own sessions
match /sessions/{sessionId} {
allow read, write: if request.auth != null &&
(request.auth.uid == resource.data.user_id || request.auth.uid == request.resource.data.user_id);
}
}
}Storage Rules (storage.rules):
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /uploads/{userId}/{allPaths=**} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
match /generated/{sessionId}/{allPaths=**} {
allow read: if request.auth != null;
}
}
}The application uses the following environment variables:
Backend Environment Variables:
GOOGLE_APPLICATION_CREDENTIALS: Path to service account JSONFIREBASE_PROJECT_ID: Your Firebase project IDGOOGLE_CLOUD_PROJECT: Your Google Cloud project IDGOOGLE_CLOUD_LOCATION: Deployment region (e.g., us-central1)UPLOAD_FOLDER: Directory for user uploadsGENERATED_MEDIA_FOLDER: Directory for generated contentLOG_FOLDER: Directory for application logsMAX_FILE_SIZE: Maximum upload file size
Frontend Environment Variables:
REACT_APP_API_URL: Backend API URLREACT_APP_FIREBASE_*: Firebase configuration from console
POST /analytics
Content-Type: application/json
Body:
{
"user_id": "string",
"date_range": {"start": "YYYY-MM-DD", "end": "YYYY-MM-DD"},
"metrics": ["sessions", "videos_generated", ...]
}GET /ws/logs/{session_id}
(WebSocket endpoint for real-time log streaming){
"session_id": "uuid",
"status": "processing|completed|failed",
"message": "Status message",
"result_video_url": "https://...",
"user_id": "firebase_user_id",
"created_at": "timestamp",
"processing_steps": [
{
"step": "formatter_agent",
"status": "completed",
"timestamp": "2025-06-20T10:30:00Z"
}
]
}-
Build Frontend
cd frontend npm run build -
Configure Production Environment
- Update environment variables for production URLs
- Set up Firebase project for production
- Configure Google Cloud for production deployment
-
Deploy Backend
# Using Docker (recommended) docker build -t neomentor-backend ./backend docker run -p 8000:8000 neomentor-backend # Or using cloud services # Google Cloud Run, AWS Lambda, etc.
-
Deploy Frontend
# Upload build folder to your hosting service # Netlify, Vercel, Firebase Hosting, etc.
Prerequisites:
- Docker and Docker Compose installed
- Service account JSON file placed in backend directory
- Environment variables configured
Quick Deploy:
# 1. Copy environment files
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env
# 2. Configure your environment variables in both .env files
# 3. Place your service-account-key.json in the backend directory
# 4. Deploy with Docker Compose
docker-compose up -d
# 5. Access the application
# Frontend: http://localhost:3000
# Backend: http://localhost:8000Production Deployment:
# Build for production
docker-compose -f docker-compose.prod.yml up -d
# Or build individually
docker build -t neomentor-backend ./backend
docker build -t neomentor-frontend ./frontend
# Run with proper environment variables
docker run -d -p 8000:8000 --env-file backend/.env neomentor-backend
docker run -d -p 3000:80 --env-file frontend/.env neomentor-frontenddocker-compose.yml:
version: '3.8'
services:
backend:
image: neomentor-backend
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
volumes:
- ./backend:/app
environment:
- GOOGLE_APPLICATION_CREDENTIALS=/app/service-account-key.json
- FIREBASE_PROJECT_ID=${FIREBASE_PROJECT_ID}
- GOOGLE_CLOUD_PROJECT=${GOOGLE_CLOUD_PROJECT}
- GOOGLE_CLOUD_LOCATION=${GOOGLE_CLOUD_LOCATION}
- UPLOAD_FOLDER=/app/uploads
- GENERATED_MEDIA_FOLDER=/app/generated_media
- LOG_FOLDER=/app/logs
- MAX_FILE_SIZE=50MB
frontend:
image: neomentor-frontend
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:80"
volumes:
- ./frontend:/app
environment:
- REACT_APP_API_URL=http://localhost:8000
- REACT_APP_FIREBASE_API_KEY=${REACT_APP_FIREBASE_API_KEY}
- REACT_APP_FIREBASE_AUTH_DOMAIN=${REACT_APP_FIREBASE_AUTH_DOMAIN}
- REACT_APP_FIREBASE_PROJECT_ID=${REACT_APP_FIREBASE_PROJECT_ID}
- REACT_APP_FIREBASE_STORAGE_BUCKET=${REACT_APP_FIREBASE_STORAGE_BUCKET}
- REACT_APP_FIREBASE_MESSAGING_SENDER_ID=${REACT_APP_FIREBASE_MESSAGING_SENDER_ID}
- REACT_APP_FIREBASE_APP_ID=${REACT_APP_FIREBASE_APP_ID}docker-compose.prod.yml:
version: '3.8'
services:
backend:
image: neomentor-backend
ports:
- "8000:8000"
environment:
- GOOGLE_APPLICATION_CREDENTIALS=/app/service-account-key.json
- FIREBASE_PROJECT_ID=${FIREBASE_PROJECT_ID}
- GOOGLE_CLOUD_PROJECT=${GOOGLE_CLOUD_PROJECT}
- GOOGLE_CLOUD_LOCATION=${GOOGLE_CLOUD_LOCATION}
- UPLOAD_FOLDER=/app/uploads
- GENERATED_MEDIA_FOLDER=/app/generated_media
- LOG_FOLDER=/app/logs
- MAX_FILE_SIZE=50MB
frontend:
image: neomentor-frontend
ports:
- "3000:80"
environment:
- REACT_APP_API_URL=http://localhost:8000
- REACT_APP_FIREBASE_API_KEY=${REACT_APP_FIREBASE_API_KEY}
- REACT_APP_FIREBASE_AUTH_DOMAIN=${REACT_APP_FIREBASE_AUTH_DOMAIN}
- REACT_APP_FIREBASE_PROJECT_ID=${REACT_APP_FIREBASE_PROJECT_ID}
- REACT_APP_FIREBASE_STORAGE_BUCKET=${REACT_APP_FIREBASE_STORAGE_BUCKET}
- REACT_APP_FIREBASE_MESSAGING_SENDER_ID=${REACT_APP_FIREBASE_MESSAGING_SENDER_ID}
- REACT_APP_FIREBASE_APP_ID=${REACT_APP_FIREBASE_APP_ID}For detailed GCP deployment instructions, see GCP_DEPLOYMENT_GUIDE.md.
One-Command Deployment:
# Make sure you have gcloud CLI and Docker installed
./deploy-gcp.shManual Deployment Steps:
# 1. Set up your project
export PROJECT_ID="your-project-id"
gcloud config set project $PROJECT_ID
# 2. Enable required APIs
gcloud services enable cloudbuild.googleapis.com run.googleapis.com artifactregistry.googleapis.com
# 3. Create artifact repository
gcloud artifacts repositories create neomentor-repo --repository-format=docker --location=us-central1
# 4. Build and deploy
gcloud builds submit --tag us-central1-docker.pkg.dev/$PROJECT_ID/neomentor-repo/backend ./backend
gcloud builds submit --tag us-central1-docker.pkg.dev/$PROJECT_ID/neomentor-repo/frontend ./frontend
# 5. Deploy to Cloud Run
gcloud run deploy neomentor-backend --image us-central1-docker.pkg.dev/$PROJECT_ID/neomentor-repo/backend --region us-central1 --allow-unauthenticated
gcloud run deploy neomentor-frontend --image us-central1-docker.pkg.dev/$PROJECT_ID/neomentor-repo/frontend --region us-central1 --allow-unauthenticatedRequired Environment Variables:
GOOGLE_CLOUD_PROJECT: Your GCP project IDFIREBASE_PROJECT_ID: Your Firebase project IDGOOGLE_CLOUD_LOCATION: Deployment region (us-central1)- Service account JSON for backend authentication
Estimated Costs:
- Cloud Run: ~$10-50/month (depending on usage)
- Cloud Storage: ~$5-20/month (for media files)
- Vertex AI: ~$20-100/month (for AI processing)
- Firebase: Free tier for authentication
# Backend tests
cd backend
python -m pytest
# Frontend tests
cd frontend
npm test# Python linting
cd backend
flake8 .
black .
# TypeScript checking
cd frontend
npm run type-check-
Authentication Errors
- Verify service account JSON file is correctly placed
- Check Firebase project ID matches environment variables
- Ensure required APIs are enabled in Google Cloud Console
-
File Upload Issues
- Check file size limits (default 50MB)
- Verify supported file types (audio: .wav, .mp3; images: .jpg, .png, .gif)
- Ensure upload directory exists and has write permissions
-
Agent Processing Failures
- Verify Vertex AI API is enabled and accessible
- Check Google Cloud quotas and billing
- Review logs for specific error messages
-
Video Generation Issues
- Ensure FFmpeg is installed and accessible
- Check generated_media directory permissions
- Verify sufficient disk space for processing
-
WebSocket Connection Issues
- Check firewall settings for WebSocket connections
- Verify backend is running on correct port
- Review CORS configuration
-
Firebase Connection Issues
- Verify Firestore rules allow authenticated access
- Check network connectivity to Firebase services
- Ensure service account has proper permissions
Enable debug logging:
Backend:
import logging
logging.basicConfig(level=logging.DEBUG)View Logs:
# Check application logs
tail -f backend/logs/neomentor.log
# Check session logs
ls backend/logs/sessions/-
Media Processing
- Optimize image sizes before upload
- Use compressed audio formats when possible
- Monitor generated_media directory size
-
Database Queries
- Implement proper Firestore indexing
- Use pagination for large result sets
- Cache frequently accessed data
-
API Response Times
- Monitor agent processing times
- Implement request timeouts
- Use background tasks for long-running processes
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
- Google Agent Development Kit team
- React and FastAPI communities
- All contributors to this project
- F5TTS-HuggingFace
For support, email sid.dev.2006@gmail.com
Made with β€οΈ by the NeoMentor Team
