Build an automated email client classifier that drafts replies based on content intents.
Tick off requirements as you build to track real-time completion.
Follow this chronological guide to build the project from scratch.
Compile classification prompt schemas forcing Gemini to return structured JSON intents.
const { GoogleGenAI } = require("@google/genai");
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
async function classifyEmail(subject, body) {
const prompt = `
Analyze this email. Subject: ${subject}. Body: ${body}.
Output JSON format:
{ "intent": "billing" | "support" | "spam", "replyNeeded": boolean }
`;
const response = await ai.models.generateContent({
model: 'gemini-2.5-flash',
contents: prompt,
config: { responseMimeType: 'application/json' }
});
return JSON.parse(response.text);
}Real issues students hit during development and how to troubleshoot them fast.
Continue building your skills with similar projects.
Analytics dashboard with KPI cards, Recharts visualizations, data tables, and dark theme.
Node.js & Express REST API with MongoDB, nanoid key generation, and rate limiting.
Secure auth backend with JWT access/refresh tokens, bcrypt hashing, and role guard middleware.