Environment file setup
FairMatch AI stores configuration in a.env file located in the backend directory.
Required environment variables
All of these variables are required for FairMatch AI to function properly.Database configuration
SUPABASE_URL
Your Supabase project URL.
- Log in to your Supabase dashboard
- Navigate to Project Settings > API
- Copy the “Project URL” value
https://abcdefghijklmnop.supabase.co
SUPABASE_KEY
Your Supabase anonymous API key for client-side access.
- In your Supabase dashboard, go to Project Settings > API
- Copy the “anon” “public” key from the “Project API keys” section
AI service configuration
GEMINI_API_KEY
Your Google Gemini API key for AI-powered evaluations.
- Visit Google AI Studio
- Sign in with your Google account
- Create a new API key
- Copy the generated key
FairMatch AI uses Google Gemini for natural language processing, resume analysis, and candidate evaluation. This is a core dependency.
ZYND_API_KEY
Your Zyndai API key for multi-agent orchestration.
- Sign up at Zyndai
- Navigate to your dashboard
- Generate an API key from the API Keys section
Zyndai powers the multi-agent evaluation pipeline, coordinating the Resume Analyst, GitHub Verifier, Interview Grader, and Integrity Agent.
Complete configuration example
Here’s what your complete.env file should look like:
Configuration validation
After setting up your environment variables, verify your configuration:Check the logs
Monitor the terminal output for any connection errors or warnings about missing environment variables.
Test the API
Visit http://localhost:8000/docs and try making a test request to verify database connectivity.
Security best practices
Follow these security guidelines:- Keep keys private: Never share your API keys in public repositories, issues, or documentation
- Rotate keys regularly: Periodically regenerate your API keys, especially if they may have been exposed
- Use service accounts: For production deployments, use dedicated service accounts with minimal permissions
- Environment-specific configs: Maintain separate
.envfiles for development, staging, and production - Backup safely: If you backup your
.envfile, store it in a secure, encrypted location
Environment-specific configuration
Development
For local development, use your personal API keys and a development Supabase project:Production
For production deployments:- Use a production Supabase project with appropriate security rules
- Generate production-specific API keys
- Set environment variables through your hosting platform’s dashboard (e.g., Vercel, Railway, or AWS)
- Enable rate limiting and monitoring on your API keys
Troubleshooting configuration issues
”Environment variable not found” errors
- Verify the
.envfile is in thebackenddirectory - Check that variable names match exactly (including case)
- Ensure there are no extra spaces around the
=sign - Restart the backend server after making changes
Database connection failures
- Verify your
SUPABASE_URLis correct and accessible - Test your
SUPABASE_KEYin the Supabase dashboard - Check your network connection and firewall settings
- Ensure your Supabase project is active and not paused
AI service errors
- Verify your
GEMINI_API_KEYis valid and not expired - Check your Google AI Studio quota and usage limits
- Ensure your
ZYND_API_KEYhas the correct permissions - Review the agent logs for specific error messages
Advanced configuration
Custom ports
To run the backend on a different port:Host binding
To allow external connections in production:Log levels
Adjust logging verbosity by setting the log level in your startup command:critical, error, warning, info, debug, trace
Next steps
With your configuration complete, you can:- Start building your first job posting
- Upload candidate resumes
- Explore the AI evaluation pipeline
- Customize the application for your hiring workflow