AItern is a full-stack AI-powered mock interview platform built using Next.js, Firebase, Vapi, and Google Gemini API. It helps users practice interviews with voice-enabled AI interviewers and get real-time feedback.
Live Demo: https://mock-interview-platform-three.vercel.app/
- Frontend: Next.js 14 (App Router)
- Styling: Tailwind CSS, shadcn/ui components
- Authentication: Firebase Auth
- AI Interviewer: Google Gemini + Vapi (Voice API)
- Database: Firebase Firestore
Clone the Repository
git clone https://github.com/72897/mock-interview-platform.git
cd mock-interview-platform
npm installCreate .env.local File
Create a file at the root called .env.local and add:
# Firebase Admin
FIREBASE_PROJECT_ID=your_project_id
FIREBASE_CLIENT_EMAIL=your_client_email
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
# Google Gemini API
GOOGLE_GENERATIVE_AI_API_KEY=your_google_gemini_api_key
# Vapi Config
NEXT_PUBLIC_VAPI_WEB_TOKEN=your_vapi_web_token
NEXT_PUBLIC_VAPI_WORKFLOW_ID=your_vapi_workflow_id├── app
│ ├── (auth) # Authentication routes
│ ├── (root) # Main routes
│ ├── api # API routes
│ ├── favicon.ico
│ ├── globals.css # Global styles
│ └── layout.tsx # Root layout
│
├── components # Reusable UI components
├── constants # Static constants
├── firebase # Firebase config
├── lib # Utility functions
├── public # Static assets
├── types # TypeScript types
│
├── .env.local # Environment variables
├── .gitignore
├── next.config.ts
├── tsconfig.json
└── package.json
Create a .env.local file at the root and add:
FIREBASE_PROJECT_ID=aitern
FIREBASE_PRIVATE_KEY="<your_private_key>"
FIREBASE_CLIENT_EMAIL="firebase-adminsdk-xxx@aitern.iam.gserviceaccount.com"
GOOGLE_GENERATIVE_AI_API_KEY="<your_google_gemini_api_key>"
NEXT_PUBLIC_VAPI_WEB_TOKEN="<your_vapi_token>"
NEXT_PUBLIC_VAPI_WORKFLOW_ID="<your_vapi_workflow_id>"Make sure you replace <your_private_key>, <your_google_gemini_api_key>, etc., with your actual keys.
⚠️ Never expose your.envfile publicly.
- Go to Firebase Console
- Create a project and register a web app
- Enable Authentication (Email/Password)
- Enable Firestore Database
- Generate a service account key and copy credentials to
.env.local
- Visit vapi.ai and create an account
- Create a new Workflow
- Get your Web Token and Workflow ID from the dashboard
- Add them to your
.env.local - Vapi is used for real-time voice interaction between user and AI interviewer
- Go to Google AI Studio
- Create a Gemini API Key
- Add it to
.env.localunderGOOGLE_GENERATIVE_AI_API_KEY - Used to generate real-time interview questions and responses
git clone https://github.com/72897/mock-interview-platform
cd mock-interview-platform
npm install
npm run devVisit http://localhost:3000 to see it in action.
Made with ❤️ by Kunal Singh
GitHub: 72897