# BookTracker — The Workshop Sample Application

> **Summary — what this page covers**
> The canonical reference for the sample app every lab builds on. Day 1 configures and improves
> BookTracker; Day 2 adds AI-native features to it. The two day pages cover their day-specific arc;
> this page is the one to link when anyone asks "what app are we working with?" Add the repo URL
> and a screenshot if you have one.

## What it is

**BookTracker** is a small, realistic ASP.NET Core Minimal API for tracking books and reading
progress, built on EF Core and SQL Server. It's deliberately *complete enough to feel real* and
*flawed enough to teach* — there are intentional gaps (validation, observability, security) that
attendees discover and fix across the labs.

- **Repo:** [add the canonical GitHub URL]
- **License:** [add]

## Solution structure

```text
BookTracker/
  BookTracker.Api/          # ASP.NET Core 10 Minimal API (no controllers)
  BookTracker.Core/         # Domain entities, DTOs, services, interfaces
  BookTracker.Data/         # EF Core DbContext, migrations
  BookTracker.Tests/        # xUnit project (initially sparse)
  CLAUDE.md                 # Minimal at start — Day 1 Lab 1 configures it
  BookTracker.sln
```

## Stack

- **.NET 10** · **ASP.NET Core Minimal API** (no controllers)
- **EF Core 10** · **SQL Server**
- **xUnit** for tests
- **Day 2 adds:** the official **Anthropic** NuGet (v12.x), **Qdrant** (Docker, for RAG), and
  **ModelContextProtocol** (v1.x, for the MCP server)

## Conventions formalized in the labs

These are the conventions attendees encode into CLAUDE.md / rules in Day 1 Labs 1–2. The full
treatment is in [Day 1 Section 2](<Day 1/05-section-2-steering.md>):

- DTOs (records) live in `BookTracker.Core/Dtos`. Endpoints **never** return EF entities.
- Endpoints stay thin: parse → validate → call a service → map → typed `Results<...>`.
- All data access is `async`/`await`. Never `.Result` or `.Wait()`.
- Parameterized queries only — no string-concatenated SQL.
- Every new endpoint group's `Map…Endpoints` method must be wired in `Program.cs`.

## How each day uses it

| Day 1 (Claude Code) | Day 2 (Anthropic API) |
|---|---|
| Configure CLAUDE.md, rules, skills, hooks; explore the codebase; specify and build a Reading Progress feature; debug | Add `/api/chat` (SDK), streaming + tool-calling agent, `/api/recommend` (RAG), `BookTracker.Mcp` server, AI tests, CI/CD review and release notes |

## Deliberate gaps

The starter has intentional teaching gaps (validation holes, an SQL-injection vector, missing
observability). Attendees find them through exploration in Day 1 — no spoilers on this page.
The gap catalog is instructor-only and gitignored.

## Day-specific pages

- [Day 1 — sample app overview](<Day 1/02-booktracker-app.md>)
- [Day 2 — AI extensions architecture](<Day 2/02-booktracker-ai-extensions.md>)
