From 01d629e4e86a97149c1a5d2c679f2476f2e13522 Mon Sep 17 00:00:00 2001 From: piyushkumar0707 <121piyush466mits@gmail.com> Date: Mon, 18 May 2026 15:57:48 +0530 Subject: [PATCH 1/5] feat: add AI Interview Coach kit --- kits/assistant/interview-coach/.env.example | 19 ++ kits/assistant/interview-coach/.gitignore | 31 ++ kits/assistant/interview-coach/README.md | 163 +++++++++ .../interview-coach/actions/orchestrate.ts | 83 +++++ .../assistant/interview-coach/app/globals.css | 31 ++ kits/assistant/interview-coach/app/layout.tsx | 23 ++ kits/assistant/interview-coach/app/page.tsx | 9 + .../components/InterviewCoach.tsx | 323 ++++++++++++++++++ kits/assistant/interview-coach/config.json | 29 ++ .../flows/interview-coach/FLOW_SETUP.md | 77 +++++ .../flows/interview-coach/inputs.json | 29 ++ .../flows/interview-coach/meta.json | 8 + .../interview-coach/lib/lamatic-client.ts | 34 ++ kits/assistant/interview-coach/next.config.js | 4 + kits/assistant/interview-coach/package.json | 28 ++ .../interview-coach/postcss.config.js | 6 + .../interview-coach/tailwind.config.js | 23 ++ kits/assistant/interview-coach/tsconfig.json | 21 ++ 18 files changed, 941 insertions(+) create mode 100644 kits/assistant/interview-coach/.env.example create mode 100644 kits/assistant/interview-coach/.gitignore create mode 100644 kits/assistant/interview-coach/README.md create mode 100644 kits/assistant/interview-coach/actions/orchestrate.ts create mode 100644 kits/assistant/interview-coach/app/globals.css create mode 100644 kits/assistant/interview-coach/app/layout.tsx create mode 100644 kits/assistant/interview-coach/app/page.tsx create mode 100644 kits/assistant/interview-coach/components/InterviewCoach.tsx create mode 100644 kits/assistant/interview-coach/config.json create mode 100644 kits/assistant/interview-coach/flows/interview-coach/FLOW_SETUP.md create mode 100644 kits/assistant/interview-coach/flows/interview-coach/inputs.json create mode 100644 kits/assistant/interview-coach/flows/interview-coach/meta.json create mode 100644 kits/assistant/interview-coach/lib/lamatic-client.ts create mode 100644 kits/assistant/interview-coach/next.config.js create mode 100644 kits/assistant/interview-coach/package.json create mode 100644 kits/assistant/interview-coach/postcss.config.js create mode 100644 kits/assistant/interview-coach/tailwind.config.js create mode 100644 kits/assistant/interview-coach/tsconfig.json diff --git a/kits/assistant/interview-coach/.env.example b/kits/assistant/interview-coach/.env.example new file mode 100644 index 00000000..1b976d79 --- /dev/null +++ b/kits/assistant/interview-coach/.env.example @@ -0,0 +1,19 @@ +# ───────────────────────────────────────────── +# Lamatic Flow Configuration +# ───────────────────────────────────────────── + +# Your Lamatic Flow ID for the Interview Coach flow +# Find it: Flow Editor → three-dot menu → Copy Flow ID +INTERVIEW_COACH_FLOW_ID="YOUR_FLOW_ID_HERE" + +# Your Lamatic API endpoint +# Find it: Settings → API Docs → Endpoint +LAMATIC_API_URL="YOUR_LAMATIC_API_ENDPOINT" + +# Your Lamatic Project ID +# Find it: Settings → Project → Project ID +LAMATIC_PROJECT_ID="YOUR_PROJECT_ID" + +# Your Lamatic API Key +# Find it: Settings → API Keys → Copy +LAMATIC_API_KEY="YOUR_API_KEY" diff --git a/kits/assistant/interview-coach/.gitignore b/kits/assistant/interview-coach/.gitignore new file mode 100644 index 00000000..8de5bff8 --- /dev/null +++ b/kits/assistant/interview-coach/.gitignore @@ -0,0 +1,31 @@ +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# env files — NEVER commit secrets! +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# misc +.DS_Store +*.pem +.vercel diff --git a/kits/assistant/interview-coach/README.md b/kits/assistant/interview-coach/README.md new file mode 100644 index 00000000..239fbb63 --- /dev/null +++ b/kits/assistant/interview-coach/README.md @@ -0,0 +1,163 @@ +# 🎯 AI Interview Coach — Lamatic AgentKit + +> Get a **fully personalized interview prep kit** in seconds. Paste your target role, +> company, and background — and get tailored technical questions, behavioral Q&A, +> company insights, and a 30-60-90 day plan. + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/Lamatic/AgentKit/tree/main/kits/assistant/interview-coach) + +--- + +## 🧩 What Problem Does This Solve? + +As a student and developer who went through campus placements and interviews myself, +I noticed a gap: generic interview prep tools give the same questions to everyone. +They don't care whether you're applying as a fresher to a startup or a mid-level +engineer at Google. + +**AI Interview Coach** solves this by: +- Tailoring questions to your **specific role + company + background** +- Giving STAR-method answer frameworks based on your actual experience +- Sharing company-specific culture and tech stack insights +- Providing a realistic 30-60-90 day onboarding plan if you get hired + +--- + +## ✨ Features + +| Feature | Description | +|---|---| +| 💻 Technical Questions | 8-10 role-specific questions based on your target company | +| 🧠 Behavioral Questions | 5-6 behavioral Qs + what the interviewer is actually testing | +| 💡 Answer Tips | STAR-method frameworks tailored to your background | +| 🏢 Company Insights | Culture, values, tech stack, and what they look for | +| 🗓️ 30-60-90 Day Plan | Personalized onboarding roadmap if you land the job | + +--- + +## 🛠️ Tech Stack + +- **Frontend:** Next.js 14, React, Tailwind CSS, TypeScript +- **AI Orchestration:** Lamatic Studio (LLM Flow) +- **Deployment:** Vercel + +--- + +## ⚙️ Setup Instructions + +### Prerequisites +- Node.js 18+ +- npm 9+ +- [Lamatic.ai](https://lamatic.ai) account (free) +- [Vercel](https://vercel.com) account (for deployment) + +### Step 1 — Set Up the Lamatic Flow + +1. Go to [studio.lamatic.ai](https://studio.lamatic.ai) and sign in +2. Create a new Project → Create a new Flow +3. Add an **API Trigger** node with these inputs: + - `jobRole` (string) + - `company` (string) + - `background` (string) + - `experienceLevel` (string) +4. Add an **LLM Node** — copy the prompts from `flows/interview-coach/FLOW_SETUP.md` +5. Add an **API Response** node connected to the LLM output +6. Click **Deploy** and wait for green status +7. Copy the **Flow ID** from the three-dot menu + +### Step 2 — Get Your API Keys + +Navigate to **Settings** in Lamatic Studio: + +| Variable | Where to find it | +|---|---| +| `LAMATIC_API_KEY` | Settings → API Keys → Copy | +| `LAMATIC_PROJECT_ID` | Settings → Project → Project ID | +| `LAMATIC_API_URL` | Settings → API Docs → Endpoint | +| `INTERVIEW_COACH_FLOW_ID` | Flow Editor → three-dot menu → Copy Flow ID | + +### Step 3 — Run Locally + +```bash +# Clone the AgentKit repo +git clone https://github.com/YOUR-USERNAME/AgentKit.git +cd AgentKit/kits/assistant/interview-coach + +# Install dependencies +npm install + +# Set up environment variables +cp .env.example .env +# Edit .env and fill in your keys + +# Run the development server +npm run dev +``` + +Open [http://localhost:3000](http://localhost:3000) to see the app. + +### Step 4 — Deploy to Vercel + +1. Push your branch to GitHub +2. Go to [vercel.com](https://vercel.com) → Import project +3. Set **Root Directory** to `kits/assistant/interview-coach` +4. Add all environment variables from your `.env` file +5. Click **Deploy** + +--- + +## 🧪 Example Usage + +**Input:** +- Role: `Frontend Developer` +- Company: `Lamatic.ai` +- Level: `Fresher` +- Background: `B.Tech IT, 1 year React + Node.js, built MediQueue (healthcare app), GSSoC Top 50 Rank 32, Oracle AI certified` + +**Output includes:** +- Technical questions on React, TypeScript, REST APIs, system design basics +- Behavioral questions around teamwork, open source contributions +- Tips: How to frame GSSoC experience using STAR method +- Company insight: Lamatic values AI-native thinking and open source culture +- 90-day plan: week 1 codebase exploration → week 4 first PR → day 60 owning a feature + +--- + +## 📁 Folder Structure + +``` +interview-coach/ +├── actions/ +│ └── orchestrate.ts # Server action — calls Lamatic flow +├── app/ +│ ├── layout.tsx +│ ├── page.tsx +│ └── globals.css +├── components/ +│ └── InterviewCoach.tsx # Full UI with tabs +├── flows/ +│ └── interview-coach/ +│ ├── meta.json +│ ├── inputs.json +│ └── FLOW_SETUP.md # Copy-paste prompts for Lamatic Studio +├── lib/ +│ └── lamatic-client.ts # Lamatic API wrapper +├── .env.example +├── config.json +└── README.md +``` + +--- + +## 🤝 Author + +Built by **Piyush Kumar Singh** for the Lamatic AgentKit Challenge. + +- GitHub: [@piyushkumar0707](https://github.com/piyushkumar0707) +- Portfolio: [piyush-singh.dev](https://piyush-singh.dev) + +--- + +## 📄 License + +MIT — feel free to use and extend. diff --git a/kits/assistant/interview-coach/actions/orchestrate.ts b/kits/assistant/interview-coach/actions/orchestrate.ts new file mode 100644 index 00000000..a6900eca --- /dev/null +++ b/kits/assistant/interview-coach/actions/orchestrate.ts @@ -0,0 +1,83 @@ +'use server' + +import { lamaticClient } from '@/lib/lamatic-client' + +export interface InterviewCoachInput { + jobRole: string + company: string + background: string + experienceLevel: string +} + +export interface InterviewCoachResult { + technicalQuestions: string[] + behavioralQuestions: string[] + answerTips: string[] + companyInsights: string[] + ninetyDayPlan: { + first30: string[] + next30: string[] + final30: string[] + } + quickSummary: string +} + +export interface ActionResult { + success: boolean + data?: InterviewCoachResult + error?: string +} + +export async function runInterviewCoach( + input: InterviewCoachInput +): Promise { + let raw: Record + + try { + raw = await lamaticClient.executeFlow( + process.env.LAMATIC_FLOW_ID!, + { + jobRole: input.jobRole, + company: input.company, + background: input.background, + experienceLevel: input.experienceLevel, + } + ) as Record + } catch (e) { + return { success: false, error: `Lamatic flow error: ${e}` } + } + + // Try all possible response structures + const resultData = + (raw?.result as Record)?.output ?? + raw?.result ?? + raw?.output ?? + raw + + if (resultData && typeof resultData === 'object') { + return { success: true, data: resultData as InterviewCoachResult } + } + + // Fallback: try parsing as string + const outputText = + (raw?.result as string) ?? + (raw?.output as string) ?? + JSON.stringify(raw) + + let parsed: InterviewCoachResult + try { + const cleaned = outputText.replace(/```json|```/g, '').trim() + parsed = JSON.parse(cleaned) + } catch { + parsed = { + technicalQuestions: [], + behavioralQuestions: [], + answerTips: [], + companyInsights: [], + ninetyDayPlan: { first30: [], next30: [], final30: [] }, + quickSummary: String(outputText), + } + } + + return { success: true, data: parsed } +} \ No newline at end of file diff --git a/kits/assistant/interview-coach/app/globals.css b/kits/assistant/interview-coach/app/globals.css new file mode 100644 index 00000000..52adedc5 --- /dev/null +++ b/kits/assistant/interview-coach/app/globals.css @@ -0,0 +1,31 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --foreground-rgb: 15, 23, 42; + --background-start-rgb: 248, 250, 252; + --background-end-rgb: 241, 245, 249; +} + +body { + color: rgb(var(--foreground-rgb)); + background: linear-gradient( + to bottom, + rgb(var(--background-start-rgb)), + rgb(var(--background-end-rgb)) + ) + fixed; + min-height: 100vh; +} + +@layer utilities { + .text-balance { text-wrap: balance; } +} + +/* Smooth fade-in for result sections */ +@keyframes fadeIn { + from { opacity: 0; transform: translateY(12px); } + to { opacity: 1; transform: translateY(0); } +} +.animate-fade-in { animation: fadeIn 0.4s ease forwards; } diff --git a/kits/assistant/interview-coach/app/layout.tsx b/kits/assistant/interview-coach/app/layout.tsx new file mode 100644 index 00000000..b3e419a7 --- /dev/null +++ b/kits/assistant/interview-coach/app/layout.tsx @@ -0,0 +1,23 @@ +import type { Metadata } from 'next' +import { Inter } from 'next/font/google' +import './globals.css' + +const inter = Inter({ subsets: ['latin'] }) + +export const metadata: Metadata = { + title: 'AI Interview Coach — Lamatic AgentKit', + description: + 'Get tailored interview questions, answer frameworks, and a 90-day plan powered by Lamatic AI flows.', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} diff --git a/kits/assistant/interview-coach/app/page.tsx b/kits/assistant/interview-coach/app/page.tsx new file mode 100644 index 00000000..769b9c5b --- /dev/null +++ b/kits/assistant/interview-coach/app/page.tsx @@ -0,0 +1,9 @@ +import InterviewCoach from '@/components/InterviewCoach' + +export default function Home() { + return ( +
+ +
+ ) +} diff --git a/kits/assistant/interview-coach/components/InterviewCoach.tsx b/kits/assistant/interview-coach/components/InterviewCoach.tsx new file mode 100644 index 00000000..6f71059d --- /dev/null +++ b/kits/assistant/interview-coach/components/InterviewCoach.tsx @@ -0,0 +1,323 @@ +'use client' + +import { useState } from 'react' +import { runInterviewCoach, type InterviewCoachResult } from '@/actions/orchestrate' + +type Tab = 'technical' | 'behavioral' | 'company' | 'plan' + +const TABS: { id: Tab; label: string; emoji: string }[] = [ + { id: 'technical', label: 'Technical Questions', emoji: '💻' }, + { id: 'behavioral', label: 'Behavioral Questions', emoji: '🧠' }, + { id: 'company', label: 'Company Insights', emoji: '🏢' }, + { id: 'plan', label: '30-60-90 Day Plan', emoji: '🗓️' }, +] + +const EXP_LEVELS = [ + { value: 'fresher', label: 'Fresher / Intern' }, + { value: 'junior', label: 'Junior (0–2 yrs)' }, + { value: 'mid', label: 'Mid-level (2–5 yrs)' }, + { value: 'senior', label: 'Senior (5+ yrs)' }, +] + +function BulletList({ items }: { items: string[] }) { + if (!items || items.length === 0) + return

No data available.

+ + return ( +
    + {items.map((item, i) => ( +
  • + + {i + 1} + + {item} +
  • + ))} +
+ ) +} + +function PlanSection({ title, emoji, items }: { title: string; emoji: string; items: string[] }) { + return ( +
+

+ {emoji} {title} +

+ +
+ ) +} + +export default function InterviewCoach() { + const [jobRole, setJobRole] = useState('') + const [company, setCompany] = useState('') + const [background, setBackground] = useState('') + const [experienceLevel, setExperienceLevel] = useState('fresher') + const [loading, setLoading] = useState(false) + const [error, setError] = useState('') + const [result, setResult] = useState(null) + const [activeTab, setActiveTab] = useState('technical') + + async function handleSubmit(e: React.FormEvent) { + e.preventDefault() + if (!jobRole.trim() || !company.trim() || !background.trim()) { + setError('Please fill in all fields.') + return + } + setError('') + setLoading(true) + setResult(null) + + const res = await runInterviewCoach({ jobRole, company, background, experienceLevel }) + + setLoading(false) + if (!res.success || !res.data) { + setError(res.error ?? 'Something went wrong. Please try again.') + return + } + setResult(res.data) + setActiveTab('technical') + } + + return ( +
+ + {/* ── Header ── */} +
+
+ 🤖 Powered by Lamatic AgentKit +
+

+ AI Interview Coach +

+

+ Tell us the role, company, and your background — and get a fully personalized + interview prep kit in seconds. +

+
+ + {/* ── Form ── */} +
+
+ {/* Job Role */} +
+ + setJobRole(e.target.value)} + placeholder="e.g. Frontend Developer" + className="w-full px-3 py-2.5 rounded-lg border border-slate-300 text-sm focus:outline-none focus:ring-2 focus:ring-brand-500 focus:border-transparent" + /> +
+ + {/* Company */} +
+ + setCompany(e.target.value)} + placeholder="e.g. Google, Lamatic.ai" + className="w-full px-3 py-2.5 rounded-lg border border-slate-300 text-sm focus:outline-none focus:ring-2 focus:ring-brand-500 focus:border-transparent" + /> +
+
+ + {/* Experience Level */} +
+ +
+ {EXP_LEVELS.map(lvl => ( + + ))} +
+
+ + {/* Background */} +
+ +