InboxIQ is designed to run on a fully free (or low-cost) hosting stack:
| Layer | Service | Free Tier |
|---|---|---|
| Database | Supabase | 500 MB storage, 2 GB bandwidth |
| Backend | Render | 750 hrs/month (1 free web service) |
| Frontend | Vercel | Unlimited personal projects |
Before deploying, make sure you have accounts on:
- GitHub — source control and CI/CD
- Supabase — supabase.com
- Render — render.com
- Vercel — vercel.com
- OpenAI — platform.openai.com
- Google Cloud Console — console.cloud.google.com
- Stripe — stripe.com
- Log in to supabase.com and click New Project.
- Name it
inboxiq, choose a strong database password, and select your region. - Wait for the project to provision (~2 minutes).
- Navigate to Database → Extensions and search for
vector. Click Enable. - Navigate to SQL Editor (left sidebar).
- Run the migration files in order:
- Paste and execute
infra/migrations/001_initial_schema.sql - Paste and execute
infra/migrations/002_pgvector_functions.sql - (Optional, dev only) Paste and execute
infra/migrations/003_sample_data.sql
- Paste and execute
- Navigate to Settings → API and copy:
- Project URL →
SUPABASE_URL - anon / public key →
SUPABASE_ANON_KEY - service_role key →
SUPABASE_SERVICE_KEY
- Project URL →
Security: The service role key bypasses Row Level Security. Never expose it to the browser or commit it to source control.
- Go to console.cloud.google.com.
- Click the project dropdown → New Project → name it
InboxIQ→ Create. - From the left menu: APIs & Services → Library.
- Search for Gmail API → click it → Enable.
- Go to APIs & Services → OAuth consent screen:
- Select External → Create
- Fill in App name (
InboxIQ), User support email, Developer contact email - Click Save and Continue through all screens
- Add yourself as a test user
- Go to APIs & Services → Credentials → Create Credentials → OAuth client ID:
- Application type: Web application
- Name:
InboxIQ Backend - Authorized redirect URIs — add both:
http://localhost:8000/integrations/gmail/callback(development)https://your-render-url.onrender.com/integrations/gmail/callback(production, update after Step 4)
- Click Create and copy:
- Client ID →
GMAIL_CLIENT_ID - Client Secret →
GMAIL_CLIENT_SECRET
- Client ID →
- Create a Stripe account and complete verification.
- Navigate to Products → Add Product:
- Create InboxIQ Pro — set a monthly recurring price (e.g. $19/month) → copy the Price ID →
STRIPE_PRO_PRICE_ID - Create InboxIQ Agency — set a monthly recurring price (e.g. $49/month) → copy the Price ID →
STRIPE_AGENCY_PRICE_ID
- Create InboxIQ Pro — set a monthly recurring price (e.g. $19/month) → copy the Price ID →
- Go to Developers → API Keys and copy:
- Publishable key →
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY - Secret key →
STRIPE_SECRET_KEY
- Publishable key →
- Go to Developers → Webhooks → Add endpoint:
- Endpoint URL:
https://your-render-url.onrender.com/billing/webhook(update after Step 4) - Events to listen:
checkout.session.completed,customer.subscription.updated,customer.subscription.deleted - Copy the Signing secret →
STRIPE_WEBHOOK_SECRET
- Endpoint URL:
-
Push your code to GitHub (ensure the
backend/directory is committed). -
Log in to render.com → New → Web Service.
-
Connect your GitHub repository.
-
Configure the service:
Setting Value Root Directory backendRuntime Python 3Build Command pip install -r requirements.txtStart Command uvicorn main:app --host 0.0.0.0 --port $PORT -
Scroll to Environment Variables and add every variable from
backend/.env.examplewith real values. -
Click Create Web Service and wait for the first deploy (~3-5 minutes).
-
Copy your Render URL (e.g.
https://inboxiq-backend.onrender.com) — you'll need it for:NEXT_PUBLIC_API_URL(Vercel)- Gmail redirect URI (Google Cloud Console)
- Stripe webhook URL
-
Go back to Google Cloud Console and add the production redirect URI now.
-
Go back to Stripe and update the webhook endpoint URL now.
Note: Render free tier spins down services after 15 minutes of inactivity. The first request after idle will take ~30 seconds (cold start). Upgrade to a paid plan to avoid this.
-
Log in to vercel.com → Add New → Project.
-
Import your GitHub repository.
-
Configure:
Setting Value Framework Preset Next.jsRoot Directory frontend -
Add environment variables:
Variable Value NEXT_PUBLIC_SUPABASE_URLYour Supabase project URL NEXT_PUBLIC_SUPABASE_ANON_KEYYour Supabase anon key NEXT_PUBLIC_API_URLYour Render backend URL NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYYour Stripe publishable key -
Click Deploy. Vercel will build and deploy automatically.
-
Copy your Vercel URL (e.g.
https://inboxiq.vercel.app).
In your GitHub repository, go to Settings → Secrets and variables → Actions → New repository secret and add:
| Secret Name | Value |
|---|---|
SUPABASE_URL |
Supabase project URL |
SUPABASE_ANON_KEY |
Supabase anon key |
OPENAI_API_KEY |
OpenAI API key |
NEXT_PUBLIC_SUPABASE_URL |
Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase anon key |
NEXT_PUBLIC_API_URL |
Render backend URL |
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY |
Stripe publishable key |
RENDER_DEPLOY_HOOK_URL |
From Render: Settings → Deploy Hook |
Get the Render deploy hook from your Render service: Settings → Deploy Hook → Copy URL.
- Update CORS: In your Render environment variables, set
CORS_ORIGINSto include your Vercel URL:CORS_ORIGINS=https://inboxiq.vercel.app - Test the health endpoint: Visit
https://your-render-url.onrender.com/health— should return{"status": "ok"}. - Test the frontend: Visit your Vercel URL, sign up, and connect Gmail.
- Trigger a Gmail sync: After connecting Gmail, process a test email end-to-end.
- Verify Stripe: Use Stripe's test mode to complete a checkout and confirm the webhook fires.
# 1. Clone the repository
git clone https://github.com/yourusername/inboxiq.git
cd inboxiq
# 2. Backend setup
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # Fill in real values
uvicorn main:app --reload
# 3. Frontend setup (new terminal)
cd frontend
npm install
cp .env.example .env.local # Fill in real values
npm run devOpen http://localhost:3000 for the frontend and http://localhost:8000/docs for the interactive API documentation.
# From project root
cp .env.example .env # Fill in values
docker compose up --buildBackend available at http://localhost:8000, frontend at http://localhost:3000.
| Problem | Resolution |
|---|---|
| Render cold start is slow | Upgrade Render plan or add an uptime monitor (e.g. UptimeRobot) to ping /health every 5 minutes |
| Gmail OAuth redirect mismatch error | Ensure the redirect URI in Google Cloud Console exactly matches GMAIL_REDIRECT_URI |
| Stripe webhook signature invalid | Confirm STRIPE_WEBHOOK_SECRET matches the signing secret on the Stripe dashboard |
pgvector extension not found |
Enable it in Supabase Dashboard → Database → Extensions before running migrations |
| CORS errors in browser | Add the frontend URL to CORS_ORIGINS in Render environment variables |