- Removed test files (
quick_firestore_test.py,test_query.json,validate_firestore_setup.py) - Removed old query history data (
query_history.json) - Updated all imports to use cloud-ready components
- Added proper error handling and logging
- Verified no development dependencies in production requirements
- Environment variables properly set in
.env - Google Cloud project configured
- Firestore database created and operational
- BigQuery datasets and tables verified
- API endpoints tested and working
- CORS configured for production domains
- Sensitive data in environment variables (not hardcoded)
- Service account permissions minimal and appropriate
- API input validation implemented
- Error messages sanitized (no sensitive info leaked)
- HTTPS enforced (Cloud Run default)
# Set up the project
gcloud config set project gen-lang-client-0044046698
# Enable required APIs
gcloud services enable run.googleapis.com
gcloud services enable bigquery.googleapis.com
gcloud services enable firestore.googleapis.com
gcloud services enable aiplatform.googleapis.com- Database created in us-central1 region
- Native mode selected
- Security rules configured (if needed)
- Collections properly indexed
- Dataset:
home_buyer_hackathon_data - Tables:
listings,neighborhoods,affordability_parameters - Proper IAM permissions for Cloud Run service account
- Data loaded and verified
# Build the container image
docker build -t gcr.io/gen-lang-client-0044046698/adk-home-buyer .
# Test locally
docker run -p 8000:8000 --env-file .env gcr.io/gen-lang-client-0044046698/adk-home-buyer
# Push to Google Container Registry
docker push gcr.io/gen-lang-client-0044046698/adk-home-buyer# Deploy to Cloud Run
gcloud run deploy adk-home-buyer \
--image gcr.io/gen-lang-client-0044046698/adk-home-buyer \
--platform managed \
--region us-central1 \
--allow-unauthenticated \
--set-env-vars GOOGLE_CLOUD_PROJECT=gen-lang-client-0044046698 \
--set-env-vars QUERY_HISTORY_BACKEND=firestore \
--set-env-vars ENABLE_QUERY_HISTORY=true \
--memory 2Gi \
--cpu 2 \
--max-instances 10 \
--port 8000# Build React frontend
cd frontend
npm run build
# Deploy to Firebase Hosting, Netlify, or other static host
# Update API_BASE_URL to point to Cloud Run service- API health endpoint responding:
GET /api/health - Backend status endpoint working:
GET /api/history/status - Sample analysis request successful:
POST /api/analyze - Firestore query history being saved
- BigQuery queries executing successfully
- Vertex AI models responding
- Load testing with multiple concurrent requests
- Response times under acceptable thresholds
- Auto-scaling working properly
- Memory and CPU usage within limits
- Cloud Logging configured and working
- Error alerting set up
- Performance monitoring enabled
- Uptime checks configured
# Core Configuration
GOOGLE_CLOUD_PROJECT=gen-lang-client-0044046698
PORT=8000
# Query History
QUERY_HISTORY_BACKEND=firestore
FIRESTORE_COLLECTION=query_history
ENABLE_QUERY_HISTORY=true
MAX_HISTORY_ENTRIES=50
# BigQuery Configuration
BIGQUERY_DATASET=home_buyer_hackathon_data
BIGQUERY_LOCATION=northamerica-northeast2
LISTINGS_TABLE=listings
NEIGHBORHOODS_TABLE=neighborhoods
# Vertex AI Configuration
VERTEX_AI_LOCATION=us-central1
DEFAULT_AGENT_MODEL=gemini-2.0-flash-001
ORCHESTRATOR_MODEL=gemini-2.0-flash-001
EMBEDDING_MODEL_NAME=text-embedding-004
# Feature Flags
USE_MOCK_DATA=false-
Immediate Rollback: Use Cloud Run revisions to rollback to previous version
gcloud run services update-traffic adk-home-buyer --to-revisions=PREVIOUS_REVISION=100
-
Database Issues: Firestore has automatic backups, BigQuery has versioned tables
-
Configuration Issues: Update environment variables without redeployment
gcloud run services update adk-home-buyer --set-env-vars KEY=VALUE
- Monitor Cloud Run logs for errors
- Review Firestore usage and clean up old queries if needed
- Monitor BigQuery costs and optimize queries
- Update dependencies monthly
- Review and rotate service account keys (if applicable)
- Monitor request patterns and adjust instance limits
- Consider regional deployment for global users
- Optimize database queries for performance
- Implement caching if needed
✅ Deployment is successful when:
- API responds to health checks
- Frontend can connect to API
- Property searches return results
- Query history is being saved to Firestore
- No errors in Cloud Run logs
- Response times < 10 seconds for analysis requests
- System handles multiple concurrent users
- Development Team: [Your team contact]
- Google Cloud Support: [Your support plan]
- Incident Response: [Your on-call procedures]
Deployment Date: ________________
Deployed By: ___________________
Version: ______________________
Rollback Plan Tested: ✅ / ❌