Sign in

Week 2Web Platform

5 lessons · project on day 12

Week progress0 / 5
  1. Day 7

    Next.js

    The App Router patterns — Server Components, Route Handlers, and streaming — that make Next.js the default framework for shipping AI products.

    Open
  2. Day 8

    Database

    Designing and querying a Postgres schema for AI products — conversation history, tool-call logs, and embeddings with pgvector.

    Open
  3. Day 9

    APIs

    Designing APIs for AI products — streaming responses, SSE, idempotency, rate limits, and retries against flaky model providers.

    Open
  4. Day 10

    Authentication

  5. Day 11

    LLMs

Day 12 project

Full-Stack Chatbot

A persistent chat app with accounts: messages stream token by token, conversations survive a refresh, and every row is scoped to its owner by a database policy rather than by a filter in your query. This is the week the AI part stops being the hard part and the web platform takes over.

Stack

  • Next.js
  • Postgres
  • Supabase Auth + RLS
  • Vercel AI SDK
  • Tailwind

The hard parts

  • Streaming into a database: you cannot write a row per token, so you need to buffer the stream and persist once on completion without losing the message if the client disconnects.
  • Getting row-level security right — a policy that reads correctly but is missing its WITH CHECK clause lets a user write rows they cannot read back.
  • Restoring scroll position and message order when a conversation is loaded mid-stream.

Why it belongs in your portfolio

The most common interview probe for an AI engineer is 'where does the conversation live and who can read it'. A working row-level security policy answers that in one screenshot.