Deployment

🚢 Deployment

IntentScope is designed to be deployed across three platforms:

ServicePlatformWhy
Backend API (FastAPI + Go)RenderFree tier, Docker support
Frontend (Next.js)VercelOptimized for Next.js
Database (PostgreSQL)NeonServerless Postgres, free tier
Docs (this site)VercelAuto-deploy from docs/ folder

1. Database — Neon

Create a Neon project

  1. Sign up at neon.tech
  2. Create a new project → name it intentscope
  3. Copy the connection string (pooled, asyncpg format):
postgresql+asyncpg://user:password@host-pooler.neon.tech/neondb?sslmode=require

Run migrations

Set your DATABASE_URL to the Neon connection string and run:

cd backend-python
alembic upgrade head

Reset stale model preferences (if needed)

In the Neon SQL Editor, run:

UPDATE users
SET default_model = 'groq/llama-3.1-8b-instant'
WHERE default_model IS NULL
   OR default_model NOT IN (
       'groq/llama-3.1-8b-instant',
       'groq/llama-3.3-70b-versatile',
       'groq/gemma2-9b-it',
       'mistral/mistral-small-latest',
       'mistral/mistral-large-latest',
       'ollama/llama3.2'
   );

2. Backend — Render

The repo includes a render.yaml for one-click deployment.

Connect your repo

  1. Go to render.com → New → Blueprint
  2. Connect your GitHub repo (intent-scope)
  3. Render will detect render.yaml and create both services

Add environment variables

In the Render dashboard for intentscope-api, go to Environment and add:

KeyValue
DATABASE_URLYour Neon connection string
CLERK_SECRET_KEYsk_test_...
GROQ_API_KEYgsk_...
MISTRAL_API_KEYYour key (optional fallback)

OLLAMA_URL is not needed on Render — Ollama cannot run on cloud instances.

Verify deployment

curl https://intentscope-api.onrender.com/health
# {"status":"healthy","db":"connected"}

3. Frontend — Vercel

Import project

  1. Go to vercel.com → Add New Project
  2. Import your GitHub repo
  3. Set Root Directory to frontend
  4. Framework Preset: Next.js (auto-detected)

Add environment variables

In Vercel project settings → Environment Variables:

KeyValue
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYpk_test_...
CLERK_SECRET_KEYsk_test_...
NEXT_PUBLIC_CLERK_SIGN_IN_URL/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL/sign-up
NEXT_PUBLIC_API_URLhttps://intentscope-api.onrender.com

Deploy

Click Deploy. Every push to main triggers an automatic redeploy.


4. Docs — Vercel (this site)

Create a separate Vercel project

  1. Go to vercel.com → Add New Project
  2. Import the same GitHub repo
  3. Set Root Directory to docs
  4. Framework Preset: Next.js (auto-detected)

Deploy

No environment variables needed. Click Deploy.

Your docs will be live at https://intent-scope-docs-lake.vercel.app (or a custom domain).


Production Checklist

  • Neon DB created and migrations run
  • GROQ_API_KEY set on Render
  • CLERK_SECRET_KEY set on both Render and Vercel
  • NEXT_PUBLIC_API_URL points to Render backend URL
  • /health endpoint returns {"status":"healthy","db":"connected"}
  • Stale model preferences cleaned up via Neon SQL Editor

Docker (Self-Hosted)

To run the full stack locally with Docker:

docker compose -f docker-compose.prod.yml up --build -d
ContainerPort
intentscope-postgres5434
intentscope-ollama11434
intentscope-api8000
intentscope-validator8081
intentscope-frontend3000