This guide explains how to set up the AI Interviewer locally and how to deploy it to the cloud for free.
- Node.js & npm installed.
- Python 3.10+ installed.
- A GitHub account.
- An Atlas MongoDB account (Free tier).
- An Upstash Redis account (Free tier, required for background queues).
- A Google AI Studio account (for Gemini API Key).
- A Groq Console account (for Groq API Key for transcription).
- A Google Cloud Console project (for Google Login/OAuth).
- A JDoodle account (for Live Code Execution API).
- Create a
.envfile:MONGO_URI=your_mongodb_connection_string_here FRONTEND_URL=http://localhost:5173 PORT=5000 NODE_ENV=development JWT_SECRET=your_secure_jwt_secret_here GOOGLE_CLIENT_ID=your_google_client_id_here GOOGLE_CLIENT_SECRET=your_google_client_secret_here AI_SERVICE_URL=http://localhost:8000 JDOODLE_CLIENT_ID=your_jdoodle_client_id_here JDOODLE_CLIENT_SECRET=your_jdoodle_client_secret_here REDIS_URL=rediss://default:your_upstash_redis_password@your-upstash-endpoint.upstash.io:6379 CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name_here CLOUDINARY_API_KEY=your_cloudinary_api_key_here CLOUDINARY_API_SECRET=your_cloudinary_api_secret_here
- Run:
npm install && npm run dev
- Create a
.envfile:PORT=8000 MODEL_NAME=gemini-3.1-flash-lite GEMINI_API_KEY=your_gemini_api_key_here GROQ_API_KEY=your_groq_api_key_here ALLOWED_ORIGINS=http://localhost:5000,http://localhost:5173 REQUEST_TIMEOUT=60
- Run:
pip install -r requirements.txt && python main.py
- Create a
.envfile:VITE_API_URL=http://localhost:5000/api VITE_GOOGLE_CLIENT_ID=your_google_client_id_here
- Run:
npm install && npm run dev
We have provided a render.yaml Blueprint which automatically configures Docker-based deployments for both services. The AI Service uses Docker to properly install tesseract-ocr and poppler-utils.
- Go to your Render Dashboard and click New -> Blueprint.
- Connect your GitHub repository.
- Render will detect the
render.yamlfile. - Fill in the required environment variables in the Render UI (e.g.,
MONGO_URI,JWT_SECRET,GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,FRONTEND_URL,GEMINI_API_KEY,GROQ_API_KEY,REDIS_URL). - Click Apply. Render will build and deploy both the
ai-interviewer-backendandai-interviewer-ai-serviceautomatically using the provided Dockerfiles.
Note: You can find the AI Service URL in your Render dashboard after deployment. Update your Backend's AI_SERVICE_URL environment variable to point to it, and the Backend URL will go in your Frontend's VITE_API_URL.
- Import Project -> Connect Repo.
- Root Directory:
frontend - Framework Preset:
Vite - Env Vars: Add
VITE_API_URL(your Render backend URL +/api) andVITE_GOOGLE_CLIENT_ID.
To make Google Login work in production:
- Go to Google Cloud Console -> APIs & Services -> Credentials.
- Add your Vercel URL (e.g.,
https://my-app.vercel.app) to Authorized JavaScript Origins. - Add
https://your-backend.onrender.com/api/user/auth/google/callbackto Authorized redirect URIs.
- 502 Bad Gateway: Usually a "Cold Start" on Render. Wait 30 seconds and refresh.
- Cookie/Login Issues: Ensure
NODE_ENV=productionis set in your Render Backend environment variables. - Memory Limits: This app is optimized to run on 512MB RAM using Groq's blazing fast Whisper API for audio. Do not use local Whisper/Torch models on Render Free Tier.