Daily Agent
Setup GuideAdmin GuideUser GuideCustomization

Setup Guide

Step-by-step deployment guide for Daily Agent. Covers Supabase, Vercel, and first-run configuration.

Prerequisites

1. Supabase Setup

Create a project

  1. Go to supabase.com/dashboard and create a new project
  2. Choose a region close to your users
  3. Set a strong database password
  4. Wait for provisioning (~2 minutes)

Get your API credentials

  1. Go to Settings → API
  2. Copy: Project URL NEXT_PUBLIC_SUPABASE_URL, anon public key NEXT_PUBLIC_SUPABASE_ANON_KEY

Run the database migration

  1. Go to SQL Editor
  2. Click New Query
  3. Paste contents of supabase/migrations/schema.sql
  4. 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.

Note: Signup requires 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 install

Configure environment variables

cp .env.example .env.local

Required env vars:

Optional:

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)

  1. Push repo to GitHub
  2. Import at vercel.com/new
  3. Set env vars
  4. Deploy

Option B: Vercel CLI

npm i -g vercel
vercel login
vercel
vercel env add NEXT_PUBLIC_SUPABASE_URL
vercel --prod

Update Supabase auth redirect

Set Site URL and Redirect URLs in Supabase Authentication settings.

4. First-Run Walkthrough

Create admin account

  1. Sign up with email + SIGNUP_SECRET
  2. Grant admin via SQL:
    UPDATE profiles SET is_admin = true WHERE email = 'your@email.com';
  3. 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

ModelProviderBest forCost
claude-sonnet-4-5AnthropicBest all-around~$3/$15 per M tokens
gemini-2.5-flashGoogleFast and cheap~$0.15/$0.60 per M tokens
gpt-4oOpenAIGeneral-purpose~$2.50/$10 per M tokens
claude-opus-4-6AnthropicMost 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

IssueFix
"No models available"Add models as admin
RLS errorsRe-run full schema.sql
Provider 401/403Check API key, use Test button
Web search missingSet TAVILY_API_KEY
Build errorsRun npm install
PWA not updatingHard refresh or clear service worker
Encrypted keys unreadableENCRYPTION_KEY changed
"Signup is disabled"Set SIGNUP_SECRET