Required Variables
These variables are required for the application to function.Database
PostgreSQL connection string for the application database.Format:
postgresql://user:password@host:port/database?sslmode=requireProviders:- Neon (recommended for Vercel)
- Supabase
- Amazon RDS
- Any PostgreSQL 14+ compatible database
Authentication
Google OAuth 2.0 Client ID for user authentication.How to get:
- Go to Google Cloud Console
- Create or select a project
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URI:
https://your-app.vercel.app/api/auth/callback/google
Google OAuth 2.0 Client Secret.How to get: Found in the same credentials page as the Client ID.Example:
AI / OpenAI
OpenAI API key for AI-powered features including embeddings and semantic search.How to get:Used for:
- Create account at platform.openai.com
- Navigate to API keys
- Create new secret key
- Generating embeddings for semantic search
- AI-powered feedback categorization
- Slack bot AI assistant
Upstash KV (Redis)
Upstash Redis REST API endpoint URL.How to get:
- Create account at upstash.com
- Create a new Redis database
- Copy REST API URL from database details
Upstash Redis REST API authentication token.Example:
Upstash Redis read-only token for secure read operations.Example:
Upstash Redis connection URL (native protocol).Example:
Optional Variables
These variables enable additional features but are not required for basic functionality.Upstash Vector
Upstash Vector database REST API URL for semantic search.How to get:
- In Upstash dashboard, create a Vector database
- Copy the REST URL
If not set, semantic search features will be disabled.
Upstash Vector database authentication token.Example:
Slack Integration (Web App)
Shared secret between web app and Slack app for request verification.How to generate:Example:
Slack Bot User OAuth Token for posting messages and interacting with Slack.How to get:
- Go to api.slack.com/apps
- Select your app → OAuth & Permissions
- Copy the Bot User OAuth Token (starts with
xoxb-)
Slack channel ID where weekly feedback digests will be posted.How to get:
- Open Slack in browser
- Navigate to desired channel
- Copy channel ID from URL (starts with
C)
Slack channel ID for real-time feedback notifications.Example:
Slack Integration (Slack App)
Slack app signing secret for request verification.How to get:
- Go to api.slack.com/apps
- Select your app → Basic Information → App Credentials
- Copy the Signing Secret
API key for AI Gateway (alternative to VERCEL_OIDC_TOKEN).Example:
Vercel OIDC token for secure AI service authentication.Note: This is automatically provided in Vercel deployments.
ngrok authentication token for local development tunneling.How to get:
- Create account at ngrok.com
- Copy auth token from dashboard
Only needed for local Slack app development.
Cron Jobs
Secret key for authenticating cron job requests.How to generate:Example:Used for:
- Weekly Slack digests
- Scheduled data cleanup
- Analytics aggregation
Other Configuration
Verification token for external API integrations.Example:
Public URL of your deployed application.Example:Default: Automatically set by Vercel
UUID of the system user for automated actions.Default:
Only change this if you’re using a custom system user ID.
Configuration by Deployment Type
- Web App (Minimal)
- Web App (Full Features)
- Slack App
Minimum required variables to run the web app:
Security Best Practices
Rotate secrets regularly
Rotate secrets regularly
Rotate sensitive credentials (API keys, tokens, secrets) every 90 days or immediately if compromised.
Use different values per environment
Use different values per environment
Use separate credentials for development, staging, and production environments.
Restrict API key permissions
Restrict API key permissions
Configure API keys with minimum required permissions. For example, use read-only tokens where possible.
Monitor usage
Monitor usage
Regularly check API usage dashboards for unexpected activity that might indicate compromised credentials.
Troubleshooting
Variables not updating after change
Variables not updating after change
After changing environment variables in Vercel:
- Trigger a new deployment (or wait for next git push)
- Variables are only loaded at build time, not runtime
- Check Vercel deployment logs to verify new values are set
Local .env not working
Local .env not working
- Ensure file is named exactly
.envor.env.local - Restart your development server after changes
- Verify file is in the correct directory (app root)
- Check for typos in variable names
Database connection fails
Database connection fails
- Verify connection string format is correct
- Check that
?sslmode=requireis included for most providers - Ensure database allows connections from Vercel IPs
- Test connection using a PostgreSQL client
Next Steps
Web App Deployment
Deploy the main feedback application
Slack App Deployment
Set up the Slack integration