Connai — AI-powered digital maturity audits for African SMEs
# 🔭 Connai
> AI-powered digital maturity audits — at 42% of consultant cost.
**URL:** connai.linkgrow.io
**Stack:** Next.js 14 + Supabase + Vercel + Gemini 2.0 Flash + Stripe
---
## 🚀 Deploy in 5 minutes (Vercel)
1. Go to vercel.com → New Project
2. Import `Hikoska/connai`
3. Add environment variables (copy from `.env.example`):
- `NEXT_PUBLIC_SUPABASE_URL`
- `NEXT_PUBLIC_SUPABASE_ANON_KEY`
- `SUPABASE_SERVICE_ROLE_KEY`
- `GEMINI_API_KEY`
- `STRIPE_SECRET_KEY`
- `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY`
- `STRIPE_WEBHOOK_SECRET`
- `NEXT_PUBLIC_APP_URL`
- `ADMIN_PASSWORD`
- `NEXT_PUBLIC_REPORT_UNLOCK_TOKEN`
4. Deploy — done. Set `connai.linkgrow.io` CNAME to your Vercel deployment URL.
---
## 🗄️ Database Setup (Supabase)
1. Create a new project at supabase.com
2. Go to SQL Editor and run migrations in order:
- `supabase/migrations/001_initial_schema.sql`
- `supabase/migrations/20260320_sprint_columns.sql` ← adds transcript, action_plan, exec_tier, timestamps
3. Copy your project URL and keys to Vercel env vars
4. Enable **Google** OAuth provider in Supabase Dashboard → Authentication → Providers
5. Set **Site URL** to `
your-domain.com` and add `
your-domain.com` to the redirect allow-list
---
## 💳 Stripe Setup
Connai uses Stripe for paid report packs. You need two things: API keys + a webhook.
### 1. API Keys
In your Stripe Dashboard, copy:
- **Publishable key** → `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` in Vercel
- **Secret key** → `STRIPE_SECRET_KEY` in Vercel
### 2. Webhook Registration
Go to Stripe Dashboard → Webhooks and add an endpoint:
```
URL:
connai.linkgrow.io
Event: checkout.session.completed
```
Copy the **Webhook signing secret** → `STRIPE_WEBHOOK_SECRET` in Vercel.
> ⚠️ Without the webhook, payments will process but report packs will **not** be credited — the `/api/stripe/webhook` handler is what unlocks the purchased pack in the database.
### 3. Report Unlock Token
Set `NEXT_PUBLIC_RE …