AI Interview Coach is a full-stack web application designed to help job seekers prepare for interviews. It leverages the power of Google's Gemini LLM to act as an intelligent AI interviewer, providing in-depth, real-time feedback.
This project is built with a modern architecture using React/TypeScript on the frontend and Node.js/Express on the backend, containerized with Docker, and designed for deployment on the Google Cloud Platform.
Job interviews are a high-stakes, high-stress process. Many talented candidates struggle not because of a lack of skills, but due to a lack of practice in a realistic setting. Key challenges for job seekers include:
- Lack of Realistic Practice: Practicing in front of a mirror or with friends doesn't simulate the pressure of a real interview.
- No Immediate, Objective Feedback: It's hard to know what you're doing wrong. Friends may be too polite, and professional coaches can be expensive.
- Context is King: Generic interview questions are helpful, but real interviews focus on the specific role and the candidate's actual resume.
- Accessibility: High-quality interview coaching is often a paid service, creating a barrier for many.
This AI Interview Coach directly addresses these problems by providing a free, accessible, and highly personalized platform for users to practice in a simulated, yet realistic, verbal interview environment. It acts as a dedicated coach that's available 24/7.
- Dynamic Interview Sessions: Users can set up customized interview sessions by selecting their industry, job role, and preferred language.
- Deep Personalization: The AI uses context from an uploaded resume (PDF), a profile summary, and the job description to ask highly relevant, tailored questions.
- Structured Interview Flow: The interview progresses through distinct phases: Introduction, Experience, Role-Specific, and Personality, with a user-configurable number of questions for each phase.
- Dual AI Personas:
- AI Interviewer: Acts as the conversationalist, asking questions naturally.
- AI Analyst: Works behind the scenes to provide objective analysis, scores, hints, and example answers.
- Verbal Interviews (TTS & STT):
- Text-to-Speech: The AI Interviewer "speaks" using high-quality, selectable voices from Google Cloud TTS.
- Speech-to-Text: Users can answer questions using their voice, with real-time transcription powered by a WebSocket connection to the Google Cloud STT streaming API.
- Modern & Responsive UI:
- A professional interface with fully functional Light & Dark modes.
- Clean and intuitive layouts for both the setup and the interview session.
- Smooth animations (Framer Motion) and audio feedback (sound blips) for a polished user experience.
- Comprehensive Analysis: After the interview, users receive a final summary report detailing their overall score, key strengths, and areas for improvement.
- Framework: React.js with TypeScript
- Styling: Material-UI (MUI) with custom theming
- State Management: React Hooks (
useState,useEffect,useContext, Custom Hooks) - Animation: Framer Motion
- Notifications: React Hot Toast
- Real-time Communication: Client-side WebSocket API
- Framework: Node.js with Express.js
- Language: TypeScript
- Real-time Communication:
ws(Node.js WebSocket library) - AI & Cloud Services:
- Google Gemini API: For core conversational logic and analysis.
- Google Cloud Text-to-Speech: To generate the AI's voice.
- Google Cloud Speech-to-Text: For real-time streaming transcription of the user's voice.
- Utilities:
multerfor file uploads,pdf-parsefor resume reading.
- Containerization: Docker & Docker Compose
- Deployment Target: Google Cloud Run
- Node.js (v18 or later)
- Docker & Docker Compose
- Google Cloud SDK (gcloud CLI) installed and authenticated (
gcloud auth login). - A Google Cloud account with an active billing account.
-
Create a Project: Go to the Google Cloud Console and create a new project. Note your Project ID.
-
Enable APIs: In your new project, you must enable the following APIs. You can find them by searching their names in the console's search bar.
Generative Language API(for Gemini)Cloud Text-to-Speech APICloud Speech-to-Text API
This application requires two types of credentials.
- Go to Google AI Studio.
- Click "Get API key" and then "Create API key in new project".
- Select the Google Cloud Project you just created.
- Your API key will be generated. Copy this key.
- You will use this for the
GEMINI_API_KEYvariable in your.envfile.
The Text-to-Speech and Speech-to-Text libraries use a service account file for authentication.
- In the Google Cloud Console, navigate to IAM & Admin > Service Accounts.
- Click + CREATE SERVICE ACCOUNT.
- Give it a name (e.g.,
ai-coach-service-account). - Click CREATE AND CONTINUE.
- Give it a name (e.g.,
- Grant Permissions: Add the following roles to the service account:
Cloud Text-to-Speech UserCloud Speech-to-Text User- Click CONTINUE, then DONE.
- Generate a JSON Key:
- Find the service account you just created in the list and click on its email address.
- Go to the KEYS tab.
- Click ADD KEY > Create new key.
- Select JSON as the key type and click CREATE. A JSON file will download automatically.
- Prepare the Credential:
- Open the downloaded JSON file.
- Copy its entire content.
- You will use this for the
GCP_CREDENTIALS_JSONvariable in your.envfile. It must be a single-line string (remove all line breaks).
-
Clone the Repository:
git clone https://github.com/ru4ls/ai-interview-coach.git cd ai-interview-coach -
Create
.envfile:- In the root directory of the project, create a file named
.env. - Add the credentials you acquired in the previous step:
# From Google AI Studio GEMINI_API_KEY=your_gemini_api_key_here # The single-line JSON content from your Service Account file GCP_CREDENTIALS_JSON={"type": "service_account", "project_id": "...", ...}
- Copy this .env to /backend/.env
- In the root directory of the project, create a file named
-
Build and Run with Docker Compose: This command will build the Docker images and start both containers.
docker-compose up --build
-
Access the Application:
- Open your browser and navigate to
http://localhost:3000. - The backend server will be running on
http://localhost:8080.
- Open your browser and navigate to
Licensed under the CC BY-NC-SA 4.0 license. You can find the full license text in the LICENSE file.
