The Interview AI system follows a simplified client-server architecture where all clients communicate through a centralized Vercel API proxy.
- Electron Client: Local desktop application with main UI and optional floating window. Can optionally run local Whisper for speech-to-text. All requests go through Vercel API.
- Website: Web-based frontend hosted on Vercel, using the same API endpoints as the Electron client.
- Vercel: Serves as both the API proxy (forwarding to OpenAI, managing API keys, checking usage) and hosts the website frontend.
- OpenAI: Only accessible through Vercel; clients never communicate with OpenAI directly.
graph TD
E[Electron] --> V[Vercel API]
W[Website] --> V
V --> O[OpenAI]
E -->|optional| L[Local Whisper]
The project uses Bazel for building Electron, tools, and managing dependencies. Bazel is not part of the runtime architecture and targets are kept simple and minimal.
For detailed architecture documentation, see docs/architecture.md.
- Node.js 20+
- npm or yarn
- Bazel (for building Electron)
- Vercel account (for deployment)
- Clone the repository:
git clone <repository-url>
cd interview-ai- Install dependencies:
npm install- Set up environment variables:
- Copy
.env.exampleto.env(if not blocked) - Set
OPENAI_API_KEYin your Vercel project environment variables - Set
VERCEL_API_URLto your deployed Vercel URL
- Copy
cd website
npm install
npm run devcd electron
npm install
npm run build
npm start- Deploy to Vercel:
vercel-
Set environment variables in Vercel dashboard:
OPENAI_API_KEY: Your OpenAI API key
-
The API routes will be available at
/api/chat,/api/speech, and/api/usage
# Build Electron
bazel build //electron:electron-app
# Build Website
bazel build //website:website-package.
├── api/ # Vercel API routes
│ ├── chat.ts # Chat API endpoint
│ ├── speech.ts # Speech-to-text API endpoint
│ └── usage.ts # Usage tracking API endpoint
├── electron/ # Electron desktop client
│ ├── src/ # Main process code
│ └── renderer/ # Renderer process HTML
├── website/ # Next.js web frontend
│ └── app/ # Next.js app directory
├── docs/ # Documentation
├── BUILD # Bazel build file
└── WORKSPACE # Bazel workspace