Interview-prep-agent

PrepAI — AI Interview Prep Agent

A fully static, resume-aware AI mock interview platform — deployable for free on GitHub Pages, powered by a free Google Gemini API key you supply yourself. No backend server, no hosting bill.

Why this architecture

GitHub Pages only serves static files — no server, no secrets, no databases of its own. So this version is a genuine client-side SPA:

This is an honest tradeoff, not a limitation hidden from you: see “Security notes” below.

✨ Features

🏗️ Tech Stack

Layer Technology
Framework Next.js 14, static export (output: 'export')
Styling Tailwind CSS
Auth & DB Supabase (Postgres + Auth), browser client only
AI Google Gemini API, called client-side
PDF parsing pdfjs-dist (browser)
PDF export jsPDF (browser)
Hosting GitHub Pages

🚀 Getting Started

1. Install dependencies

npm install

2. Set up Supabase

  1. Create a free project at supabase.com
  2. In the SQL editor, run these files in order:
    • supabase/schema.sql
    • supabase/functions.sql
    • supabase/advanced-schema.sql
    • supabase/futuristic-schema.sql
  3. Copy your Project URL and anon key (Settings → API)

3. Configure environment variables

cp .env.example .env.local

Fill in NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY. These are safe to be public — see Security notes.

4. Run locally

npm run dev

Visit http://localhost:3000, sign up, then go to Settings and paste a free Gemini API key from aistudio.google.com/apikey.

5. Deploy to GitHub Pages

a. Set your repo name in next.config.mjs (only if deploying to username.github.io/repo-name rather than a root user/org page):

const REPO_NAME = "/your-repo-name";

b. Push to GitHub, then in the repo:

c. Push to main — .github/workflows/deploy.yml builds the static export and publishes it automatically. Your site goes live at https://<username>.github.io/<repo-name>/.

📁 Project Structure

interview-prep-agent/
├── app/
│   ├── page.tsx                    # Landing page
│   ├── login/, signup/             # Auth (Supabase browser client)
│   ├── settings/page.tsx           # Paste your Gemini API key here
│   ├── dashboard/page.tsx          # Readiness score, sessions, weak topics
│   ├── pricing/page.tsx            # Illustrative Razorpay flow
│   └── interview/
│       ├── new/page.tsx            # Resume upload + persona/company/mode select
│       ├── session/page.tsx        # ?id=... query param (static-export friendly)
│       └── report/page.tsx         # ?id=... + PDF export
├── components/                     # Navbar, Footer, ResumeUpload, InterviewChat, WeakTopicsPanel
├── lib/
│   ├── supabase/client.ts          # Browser-only Supabase client
│   ├── gemini.ts                   # Client-side Gemini API wrapper
│   ├── apiKeyStore.ts              # localStorage key management
│   ├── interviewEngine.ts          # Core logic: parse/generate/evaluate
│   ├── deliveryAnalyzer.ts         # Filler-word/confidence heuristic
│   ├── spacedRepetition.ts         # SM-2-style review scheduler
│   ├── readinessScore.ts           # Recency-weighted readiness number
│   ├── pdfExtract.ts               # Browser PDF text extraction
│   └── useVoiceInterview.ts        # Web Speech API hook
├── supabase/*.sql                  # Run these in order (see step 2 above)
└── .github/workflows/
    ├── deploy.yml                  # Builds + publishes to GitHub Pages
    └── test.yml                    # Lint + unit tests on every push

🗺️ Roadmap / honest gaps

See CHANGELOG.md for the week-by-week feature history and a candid list of what’s still a real next step (e.g., no e2e tests yet, scanned/image PDFs won’t extract text, Razorpay flow needs a real backend before charging strangers).

📄 License

MIT — free to use, modify, and build on.


Designed and Developed by NIKHIL CHARY SRIRAMOJU