Getting Started
Supabase Setup
Create and configure a Supabase project for NextBento.
1. Create a Project
- Go to supabase.com and sign in
- Click New Project
- Choose your organization, name the project, set a database password
- Select a region and click Create new project
2. Get API Keys
Once the project is ready:
- Go to Project Settings (gear icon) → General
- Copy:
- Project URL →
NEXT_PUBLIC_SUPABASE_URL
- Project URL →
- Go to Project Settings (gear icon) → API
- Copy:
- Publishable key key →
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY - Secret key key →
SUPABASE_SECRET_KEY(keep this secret, server-side only)
- Publishable key key →
3. Enable Auth Providers
Go to Authentication → Providers and enable:
- Email — For email/password and magic link
- Google — For Google OAuth (add Client ID and Secret from Google Cloud Console)
- GitHub — For GitHub OAuth (add Client ID and Secret from GitHub OAuth Apps)
Add your callback URL in Google Cloud Console and GitHub OAuth App: https://YOUR_PROJECT.supabase.co/auth/v1/callback (Supabase handles the OAuth flow). For production, add your app redirect in Supabase: Authentication → URL Configuration → Redirect URLs (e.g. https://your-domain.com/auth/callback). To show your domain instead of Supabase on the Gmail consent screen, see Google Brand Verification.
4. Row Level Security (RLS)
NextBento uses RLS policies to secure data. Run the migrations from the Supabase SQL Editor or CLI to apply the schema. The schema includes:
profiles— User profiles linked to auth.userssubscriptions— Stripe subscription stateteams— Team/organization datateam_members— Team membershipapi_keys— API key storage (hashed)activity_logs— Audit trail
5. Environment Variables
Add to .env.local:
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=eyJ...
SUPABASE_SECRET_KEY=eyJ...
6. Local Development
For local development, use your Supabase project URL and keys. The Supabase SSR package handles session refresh via HTTP-only cookies. No additional config needed for localhost.
Next Steps
- Google Brand Verification — Show your domain on the Gmail OAuth consent screen
- Authentication — Auth flow overview
- Database — Schema and queries
- Environment Variables — Full env reference