BiTree
  • Search For Lessons
  • Curriculum
  • Pricing
  • For Educators
  • Become a Tutor
  • About
  • Contact
Log InGet Started

Questions, concerns, bug reports, or suggestions? We read every message, write to us at [email protected].

More ways to reach us →
BiTree

Live coding lessons for aspiring developers and security professionals.

[email protected]

(201) 785-7951

Mon–Fri, 9 AM–5 PM EST

Learn

  • Search For Lessons
  • Curriculum
  • Pricing

Company

  • About
  • For Educators & Schools
  • Become a Tutor
  • Contact Us

Legal

  • Terms of Service
  • Privacy Policy
© 2026 BiTree. All rights reserved.
Curriculum/Artificial Intelligence/Passion Project: Anthropic + Next.js + Vercel
180 minAdvanced

Passion Project: Anthropic + Next.js + Vercel

After this lesson, you will be able to: Build and deploy a functional AI-powered tool using the Anthropic API and Next.js, then write the case study that goes with it.

This is the formal passion project for the AI track per Curriculum-Upgrade.md. Pick one of three project briefs, build it end-to-end with the Anthropic API + Next.js + Vercel, and produce the case study a hiring manager will read.

Prerequisites:AI Project: Build Something with AI

Why Anthropic + Next.js for the capstone

Anthropic's API is the most senior-engineer-friendly LLM API in 2026: predictable structured output, prompt caching for cost, computer use and tool calling baked in. Next.js is the dominant React framework for AI products; server components let you keep your API key off the browser, and Vercel deployment is sub-5-minutes. The combination is what most real AI features in 2026 production look like.

Pick one of three project briefs

Pick the one that lights you up, you'll spend 10-20 hours on it.

  1. 1

    Brief 1, Document Summariser: drop a PDF, get a structured summary (key points, action items, open questions, sentiment). Cost target: under $0.05 per document.

  2. 2

    Brief 2, Custom Assistant: a chatbot with a system prompt tailored to one specific use case (e.g. a personal D&D dungeon master, a startup-pitch coach, a code-review buddy). User can save conversations.

  3. 3

    Brief 3, Structured Data Extractor: paste unstructured text (job listings, recipes, RSVPs), get back a typed JSON object validated by Zod that downstream systems can consume.

Milestones (one weekend each)

Treat this as a real product launch, not a school project.

  1. 1

    M1, Spec: write a 1-page spec covering user, problem, success metric, cost target. Get a peer to sign off before coding.

  2. 2

    M2, Prompt prototype: build the prompt in the Anthropic Console. Iterate against 5 hand-picked test inputs until it works.

  3. 3

    M3, Eval set: build a 20-case JSON eval set (use the cs-vuln-cve template style); run baseline pass rate.

  4. 4

    M4, Next.js scaffolding: `npx create-next-app@latest`, add Tailwind, set up the API route at /api/generate that proxies Anthropic.

  5. 5

    M5, UI: simple input form, streaming output, copy button. Don't over-design.

  6. 6

    M6, Cost telemetry: log token counts per request to your own DB (SQLite or Vercel KV). You need to know your cost shape.

  7. 7

    M7, Deploy to Vercel: connect to GitHub, add ANTHROPIC_API_KEY as env, push to main, custom domain.

  8. 8

    M8, Three users: get three real people to use it. Watch over their shoulder. Take notes.

  9. 9

    M9, Case study: write the README + a blog post (Markdown) covering the user problem, the prompt design choices, the failure modes you found, the metrics. Link the eval set.

The Anthropic API route (Next.js App Router)

This is the canonical shape. Read it carefully.

python
// app/api/generate/route.ts
import Anthropic from "@anthropic-ai/sdk";
import { NextResponse } from "next/server";
const client = new Anthropic(); // reads ANTHROPIC_API_KEY from env
export async function POST(req: Request) {
const { input } = await req.json();
// Stream for snappy UX
const stream = await client.messages.stream({
model: "claude-sonnet-4-6",
max_tokens: 1024,
system: "You are a concise document summariser. Respond with JSON: { key_points: string[], action_items: string[], open_questions: string[] }.",
messages: [{ role: "user", content: input }],
});
// Server-Sent Events back to the browser
return new NextResponse(stream.toReadableStream(), {
headers: { "Content-Type": "text/event-stream" },
});
}

💡 How to talk about this in an interview

Open the deployed URL. Demo for 60 seconds. Walk through the prompt: 'I chose XML tags for the document content because it makes the model treat that content as data, not instructions.' Show the eval set: 'I have 22 cases that lock in the contract. Here's the pass rate over the last 3 commits.' Discuss the cost telemetry: 'At current volume the feature costs $0.012 per request; at 10K daily requests that's about $3,600/month.' Acknowledge limits: 'It still struggles on Spanish input. That's a known failure mode; here's how I'd fix it.'

Common mistakes only candidates with offers avoid

Treating it as a school project. The case study is the artefact; the working app is the demo. Skipping the deploy. A local-only build is invisible to hiring managers. Skipping the eval set. 'It worked for me when I tested it' is not a portfolio claim. Hiding the API key in the browser. The system prompt + API key in client code is a 30-second leak. Always proxy through your Next.js server route. Overscoping. Brief 1 in one weekend beats Brief 1 + 2 + 3 half-finished.

Sign in and purchase access to unlock this lesson.

Sign in to purchase
←Cryptography Fundamentals for AI
Back to Artificial Intelligence
AI Resources and Next Steps→