Jeslor-assistant is a voice-enabled AI chatbot built with Next.js, TypeScript, Tailwind CSS, Google Gemini API, Vapi, Vercel AI SDK, and NextAuth. It simulates mock technical interviews using voice or text.
- π‘ AI-powered by Google Gemini
- ποΈ Voice conversations via Vapi
- π§ Collects mock interview setup data
- π Auth via NextAuth.js (Credentials, github and google)
- π¨ Styled with Tailwind CSS
- β‘ Streamed responses using Vercel AI SDK
- βοΈ Easy to deploy on Vercel
git clone https://github.com/jeslor/jeslor_ai_assistant.git
cd jeslor_ai_assistantnpm installCreate a .env file at the root of the project:
# ββ App βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
APP_NAME="Jeslor Interview AI"
# ββ Database ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
DATABASE_URL=your_mongodb_connection_string
# ββ NextAuth ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret
AUTH_TRUST_HOST=true
# ββ Google OAuth ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
AUTH_WEBAPP_GOOGLE_CLIENT_ID=your_google_client_id
AUTH_WEBAPP_GOOGLE_CLIENT_SECRET=your_google_client_secret
# ββ GitHub OAuth ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
AUTH_GITHUB_ID=your_github_oauth_app_id
AUTH_GITHUB_SECRET=your_github_oauth_app_secret
# ββ Google Gemini AI ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
GOOGLE_GENERATIVE_AI_API_KEY=your_google_ai_api_key
# ββ Vapi (client-side) ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
NEXT_PUBLIC_VAPI_WEB_TOKEN=your_vapi_web_token
NEXT_PUBLIC_VAPI_WORKFLOW_ID=your_vapi_workflow_id
# ββ LogoKit (client-side) βββββββββββββββββββββββββββββββββββββββββββββββββββββ
NEXT_PUBLIC_LOGO_TOKEN=your_logokit_token
# ββ SMTP (password reset emails) βββββββββββββββββββββββββββββββββββββββββββββ
EMAIL_HOST=your_smtp_host
EMAIL_PORT=465
EMAIL_SECURE=true
EMAIL_USER=your_email@example.com
EMAIL_PASS=your_email_passwordnpx prisma generatenpx prisma db pushnpm run devOpen http://localhost:3000 in your browser.
This project uses MongoDB via Prisma.
- Go to https://cloud.mongodb.com and create a free account.
- Create a new Cluster (the free M0 tier is sufficient).
- Under Database Access, create a new database user with a username and password.
- Under Network Access, add
0.0.0.0/0to allow connections from anywhere (or restrict to your IP). - Click Connect on your cluster β Drivers β copy the connection string.
- Replace
<password>with your database user's password and append your database name:
DATABASE_URL="mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/your_db_name?retryWrites=true&w=majority"
NEXTAUTH_URL: The canonical URL of your app. Usehttp://localhost:3000for local development and your production domain when deployed.NEXTAUTH_SECRET: A random secret used to sign and encrypt JWTs. Generate one with:
openssl rand -base64 32- Go to the Google Cloud Console.
- Create a new project (or select an existing one).
- Navigate to APIs & Services β Credentials β Create Credentials β OAuth 2.0 Client IDs.
- Set the application type to Web application.
- Under Authorized redirect URIs, add:
http://localhost:3000/api/auth/callback/google(local)https://your-domain.com/api/auth/callback/google(production)
- Copy the Client ID and Client Secret.
- Go to https://github.com/settings/developers.
- Click New OAuth App.
- Fill in the details:
- Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Homepage URL:
- Click Register application.
- Copy the Client ID and generate a Client Secret.
Used by the @ai-sdk/google package to generate interview questions and grade feedback via the Gemini model.
- Go to https://aistudio.google.com/app/apikey.
- Click Create API key.
- Copy the key and paste it as
GOOGLE_GENERATIVE_AI_API_KEY.
- Go to https://dashboard.vapi.ai and sign up.
- From the dashboard, navigate to API Keys or Settings.
- Copy your Web Token (the public/client-side token, not the private API key).
- Create a workflow for interview generation and copy the Workflow ID.
Note: The
NEXT_PUBLIC_prefix exposes these values to the browser. Never use your private Vapi API key here.
Used to display company logos on interview cards.
- Go to https://logokit.com and click Sign Up.
- Once logged in, navigate to your Dashboard β API Keys (or Settings).
- Copy your API Token.
Note: The
NEXT_PUBLIC_prefix is required so the token is accessible in client-side components.
The forgot/reset password flow sends emails via SMTP using Nodemailer.
| Variable | Description |
|---|---|
EMAIL_HOST |
Your SMTP server hostname (e.g. smtp.gmail.com, server334.web-hosting.com) |
EMAIL_PORT |
SMTP port β 465 for SSL, 587 for TLS |
EMAIL_SECURE |
Set to true for port 465 |
EMAIL_USER |
The sender email address |
EMAIL_PASS |
The email account password (use an App Password for Gmail) |
Gmail users: Enable 2-Step Verification and generate an App Password.
- Push your repo to GitHub.
- Import the project on Vercel.
- Add all environment variables from your
.envfile in the Vercel dashboard. - Set
NEXTAUTH_URLto your production domain. - Deploy.
Prisma client generation runs automatically during next build.
| Script | Command | Description |
|---|---|---|
| Dev server | npm run dev |
Starts Next.js with Turbopack |
| Build | npm run build |
Production build |
| Start | npm start |
Starts production server |
| Lint | npm run lint |
Runs ESLint |
| Prisma Generate | npm run prisma:generate |
Generates Prisma client |
| Prisma Push | npm run prisma:push |
Pushes schema to database |