Setup Guide
Step-by-step deployment guide for Daily Agent. Covers Supabase, Vercel, and first-run configuration.
Prerequisites
- Node.js 18+
- npm
- A Supabase account (supabase.com — free tier works)
- At least one AI provider API key: Anthropic (Claude), Google AI Studio (Gemini), OpenAI (GPT), or OpenRouter (any model)
- Optional: Tavily API key for web search (free tier: 1,000 searches/month)
1. Supabase Setup
Create a project
- Go to supabase.com/dashboard and create a new project
- Choose a region close to your users
- Set a strong database password
- Wait for provisioning (~2 minutes)
Get your API credentials
- Go to Settings → API
- Copy: Project URL →
NEXT_PUBLIC_SUPABASE_URL, anon public key →NEXT_PUBLIC_SUPABASE_ANON_KEY
Run the database migration
- Go to SQL Editor
- Click New Query
- Paste contents of
supabase/migrations/schema.sql - Click Run
This single file creates everything: all tables, indexes, RLS policies, triggers, and storage bucket. Safe to re-run.
Configure authentication
Uses Supabase email/password auth by default. Optional OAuth providers available.
SIGNUP_SECRET. OAuth bypasses this.Storage (automatic)
Migration script creates project-files bucket with RLS policies automatically.
2. GitHub Setup
Clone the repository
git clone https://github.com/your-username/daily-agent.git
cd daily-agent
npm installConfigure environment variables
cp .env.example .env.localRequired env vars:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYENCRYPTION_KEY(64-char hex, encrypts API keys in DB)SIGNUP_SECRET
Optional:
TAVILY_API_KEY
Provider API keys are configured from the Admin panel, not env vars.
Important: Use the same ENCRYPTION_KEY everywhere. Changing it makes existing encrypted keys unreadable.
3. Vercel Deployment
Option A: Deploy via GitHub (recommended)
- Push repo to GitHub
- Import at vercel.com/new
- Set env vars
- Deploy
Option B: Vercel CLI
npm i -g vercel
vercel login
vercel
vercel env add NEXT_PUBLIC_SUPABASE_URL
vercel --prodUpdate Supabase auth redirect
Set Site URL and Redirect URLs in Supabase Authentication settings.
4. First-Run Walkthrough
Create admin account
- Sign up with email +
SIGNUP_SECRET - Grant admin via SQL:
UPDATE profiles SET is_admin = true WHERE email = 'your@email.com'; - Refresh
Add AI providers
Settings → Provider Management → Add Provider. Keys encrypted with AES-256-GCM.
Add models
Settings → Model Management → Add Model. Fields: Model ID, Display Name, Provider, Type, Pricing, Default, Sort Order.
Configure optional settings
TITLE_MODEL, DEFAULT_IMAGE_MODEL, NEXT_PUBLIC_SITE_NAME
Invite users
Share SIGNUP_SECRET. Set usage limits in Settings → Usage Limits.
5. Model Recommendations
Chat models
| Model | Provider | Best for | Cost |
|---|---|---|---|
claude-sonnet-4-5 | Anthropic | Best all-around | ~$3/$15 per M tokens |
gemini-2.5-flash | Fast and cheap | ~$0.15/$0.60 per M tokens | |
gpt-4o | OpenAI | General-purpose | ~$2.50/$10 per M tokens |
claude-opus-4-6 | Anthropic | Most capable | ~$15/$75 per M tokens |
Title model: google/gemini-3-flash-preview (default)
Image model: google/gemini-2.5-flash-image (default)
AI task models: Briefing, Insights, Assist, Tools — configurable per user.
Cost guidance: Typical daily usage under $0.50/day with Claude Sonnet.
Troubleshooting
| Issue | Fix |
|---|---|
| "No models available" | Add models as admin |
| RLS errors | Re-run full schema.sql |
| Provider 401/403 | Check API key, use Test button |
| Web search missing | Set TAVILY_API_KEY |
| Build errors | Run npm install |
| PWA not updating | Hard refresh or clear service worker |
| Encrypted keys unreadable | ENCRYPTION_KEY changed |
| "Signup is disabled" | Set SIGNUP_SECRET |