A premier inspection intelligence platform designed for property management, restoration, and real estate professionals. InspectAI leverages cutting-edge Gemini vision models to automatically analyze walkthrough videos, map property defects, identify structural anomalies, and calculate localized cost estimations in real time.
InspectAI is built using a modern Decoupled Architecture to optimize performance, cost, and user experience:
- Frontend (Vercel): A fast, React 19 SPA. It loads instantly and remains always-awake.
- Backend (Render): An Express-based monolithic Node.js API container designed to handle heavy multi-modal AI processing tasks and secure uploads.
- Storage (Cloudflare R2): Large videos are uploaded directly from the browser using AWS S3-compatible presigned URLs, bypassing the server to maximize bandwidth.
- Database & Auth (Firebase): Google OAuth authentication and Firestore database storing user preferences and inspections.
Deploying InspectAI involves configuring four key components: Firebase, Cloudflare R2, the Render Backend, and the Vercel Frontend.
- Go to the Firebase Console.
- Create a new Firebase project.
- Enable Authentication:
- Navigate to Authentication > Sign-in method.
- Enable the Google provider.
- Create a Firestore Database:
- Navigate to Firestore Database > Create database.
- Set up rules inside
firestore.rules(provided in the repository) to restrict read/write access to authenticated owners.
- Whitelist Frontend Domain (Crucial for Mobile/Desktop OAuth):
- Navigate to Authentication > Settings > Authorized domains.
- Add your local domain:
localhost - Add your deployed Vercel domain:
inspect-ai-ruddy.vercel.app(replace with your production URL).
Cloudflare R2 acts as the high-capacity, low-latency video vault.
- Create a bucket in your Cloudflare R2 dashboard (e.g.,
inspect-ai). - Generate an API token with Edit permissions. Save the Access Key ID and Secret Access Key.
- Enable Public R2.dev URL (or bind a custom domain) in the bucket settings.
- CORS Policy Setup:
- Go to Bucket Settings > CORS Policy > Edit.
- Paste the following JSON to whitelist your development, Render, and Vercel domains:
[ { "AllowedOrigins": [ "http://localhost:5173", "https://inspectai-e49p.onrender.com", "https://inspect-ai-ruddy.vercel.app" ], "AllowedMethods": [ "GET", "PUT", "POST", "HEAD" ], "AllowedHeaders": [ "*" ] } ]
The backend container spins down on Render's free tier, but the frontend features an automatic background warm-up loading bar to manage the transition smoothly.
- Create a Web Service on Render.
- Connect your GitHub repository.
- Configure the build parameters:
- Build Command:
npm install && npm run build - Start Command:
npm start
- Build Command:
- Add the following Environment Variables:
GEMINI_API_KEY: Your primary Gemini API key (acts as the server fallback).R2_ENDPOINT: Your Cloudflare S3 endpoint (https://<account_id>.r2.cloudflarestorage.com).R2_ACCESS_KEY_ID: Your Cloudflare Access Key.R2_SECRET_ACCESS_KEY: Your Cloudflare Secret Key.R2_BUCKET_NAME: The name of your R2 bucket.R2_PUBLIC_URL: Your bucket's public domain URL.
The frontend is completely serverless, ensuring 100% uptime with zero sleep timeouts.
- Link your GitHub repository in the Vercel Dashboard.
- Vercel automatically detects the Vite configuration.
- Set the following Environment Variables:
VITE_API_URL: Your Render backend URL (https://inspectai-e49p.onrender.com).VITE_FIREBASE_API_KEY: Firebase API Key.VITE_FIREBASE_AUTH_DOMAIN: Firebase Auth Domain.VITE_FIREBASE_PROJECT_ID: Firebase Project ID.VITE_FIREBASE_STORAGE_BUCKET: Firebase Storage Bucket.VITE_FIREBASE_MESSAGING_SENDER_ID: Firebase Sender ID.VITE_FIREBASE_APP_ID: Firebase App ID.
- Deploy!
- Clone the Repository:
git clone https://github.com/lead-with-data/InspectAI.git cd InspectAI - Install Dependencies:
npm install
- Setup Environment:
Create a
.envfile in the root directory and populate it with the variables from.env.example. - Run Development Servers:
- Start the API backend:
npm run server(runs onhttp://localhost:3000) - Start the React frontend:
npm run dev(runs onhttp://localhost:5173)
- Start the API backend:
- Open
http://localhost:5173to explore.