A lightweight campaign operations tool for triaging underperforming ad campaigns — built live during the Claude Code Masterclass.
This repo is the starting skeleton for a hands-on, instructor-led build. Over two days, the class will turn it into a working investigation tracker using Claude Code as the primary development workflow.
The finished product lets an operator browse campaigns, spot health issues, open structured investigations, capture evidence, and progress issues through to resolution.
| Layer | Technology |
|---|---|
| Frontend | React, Tailwind CSS, shadcn/ui |
| Backend | FastAPI (Python) |
| Database | PostgreSQL (Supabase) |
frontend/ → React app shell with routing and baseline styling
backend/ → FastAPI server with health endpoint and DB connectivity
- App shell, routing, and baseline component scaffolding
- FastAPI bootstrapped with a health check endpoint
- Database schema and seed data for realistic demo scenarios
- Basic test harnesses (runnable out of the box)
- Local startup flow that works without additional setup
The seed data provides a small, curated dataset that tells a workshop story — not a production-scale fixture. Five tables are pre-seeded in the database:
- Campaigns — mix of healthy, unhealthy, and ambiguous ad campaigns
- Campaign Health — time-series snapshots with metrics like CTR, viewability, spend, and pacing
- Investigations — structured triage records with question, hypothesis, status, and next action
- Investigation Evidence — typed evidence items (metrics, delivery notes, operator notes, QA checks)
- AI Runs — lightweight log of model usage tied to investigations (for economics discussion)
The backend currently maps only campaigns and campaign_health as ORM models. The remaining models, schemas, and API routes will be built during the workshop.
Over the course of the workshop, this skeleton becomes a working product while demonstrating Claude Code workflows:
- Surface campaign health data and make a first visible change
- Add the AI usage model scaffold and discuss token economics
- Build a campaign detail page with investigation entry point
- Implement investigation creation, evidence capture, and persistence end to end
- Add investigation status progression (New → Investigating → Needs Action → Resolved)
- Surface AI usage and recommendation data
- Layer in shared repo standards, skills, hooks, and automation
- Python 3.10+ and uv
- Bun
- Supabase CLI and Docker (for local Supabase)
supabase startThis starts PostgreSQL, Auth, and other Supabase services in Docker. The seed data in supabase/seed.sql is applied automatically. Note the DB URL from the output — you'll need it next.
cd backend
cp .env.example .env # then set DATABASE_URL to the DB URL from `supabase start`
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000API docs will be at http://localhost:8000/docs.
cd frontend
bun install
bun run devOpens at http://localhost:5173. The Vite dev server proxies /api requests to the backend.
cd backend
uv run pytestThis repo includes a .mcp.json that configures five MCP servers for use with Claude Code. After cloning, follow these steps to make sure they work.
- Node.js — required for
npx, which launches the Playwright and Exa servers - Codex CLI — install globally:
npm install -g @openai/codex
Add these to your shell profile or a local .env file:
export OPENAI_API_KEY="your-openai-key" # required by Codex CLI
export EXA_API_KEY="your-exa-key" # required by Exa MCP — get one at https://dashboard.exa.aiAtlassian and Linear are remote HTTP servers. Claude Code will prompt you to authenticate via OAuth the first time you use them — no keys or installs required.
| Server | What it runs | Requires |
|---|---|---|
| Playwright | npx @playwright/mcp@latest |
Node.js only |
| Codex | codex mcp-server |
Codex CLI installed globally + OPENAI_API_KEY |
| Exa | npx exa-mcp-server |
Node.js + EXA_API_KEY |
Open Claude Code in the project directory and run:
/mcp
All five servers should show as connected.
This project is part of the LoopMe Claude Code Masterclass. It is intentionally scoped to stay small, legible, and demo-friendly — not to be a production campaign ops platform.