Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions kits/assistant/interview-coach/.env.example
Original file line number Diff line number Diff line change
@@ -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"
31 changes: 31 additions & 0 deletions kits/assistant/interview-coach/.gitignore
Original file line number Diff line number Diff line change
@@ -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
163 changes: 163 additions & 0 deletions kits/assistant/interview-coach/README.md
Original file line number Diff line number Diff line change
@@ -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 |
Comment thread
piyushkumar0707 marked this conversation as resolved.
Outdated

### 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.
83 changes: 83 additions & 0 deletions kits/assistant/interview-coach/actions/orchestrate.ts
Original file line number Diff line number Diff line change
@@ -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<ActionResult> {
let raw: Record<string, unknown>

try {
raw = await lamaticClient.executeFlow(
process.env.LAMATIC_FLOW_ID!,
{
jobRole: input.jobRole,
company: input.company,
background: input.background,
experienceLevel: input.experienceLevel,
}
) as Record<string, unknown>
} catch (e) {
return { success: false, error: `Lamatic flow error: ${e}` }
}

// Try all possible response structures
const resultData =
(raw?.result as Record<string, unknown>)?.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 }
}
31 changes: 31 additions & 0 deletions kits/assistant/interview-coach/app/globals.css
Original file line number Diff line number Diff line change
@@ -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; }
23 changes: 23 additions & 0 deletions kits/assistant/interview-coach/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
)
}
9 changes: 9 additions & 0 deletions kits/assistant/interview-coach/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import InterviewCoach from '@/components/InterviewCoach'

export default function Home() {
return (
<main className="min-h-screen py-10 px-4">
<InterviewCoach />
</main>
)
}
Loading
Loading