Module 8: Capstone Project — A Complete Test Suite with TDD
Module 8: Capstone Project — A Complete Test Suite with TDD
Module 8: Capstone Project — A Complete Test Suite with TDD
Capsule overview
This is the final module. Everything you learned in modules 1-7 converges here: you'll build a complete application from scratch using 100% TDD with Claude Code. Every feature starts as a test, Claude Code implements, CI validates, and by the end you have a working application with a professional test suite.
It isn't a practice exercise — it's your evidence of mastery. The repository you produce demonstrates a professional skill most developers don't have: building software with AI-assisted TDD. It's your portfolio piece.
The application itself is intentionally simple (a REST API with auth, CRUD, business logic). What's valuable isn't the app's complexity — it's the TDD process that built it, the test pyramid that backs it, and the CI pipeline that protects it.
Module Context
Where are we?
This is Module 8 — the guide's final one.
Everything you've mastered:
- ✅ Spec-first methodology (Module 1)
- ✅ Unit tests with Claude Code (Module 2)
- ✅ Integration and E2E tests (Module 3)
- ✅ The complete TDD workflow (Module 4)
- ✅ Coverage ≥90% and edge cases (Module 5)
- ✅ Mocking, fixtures, validation loops (Module 6)
- ✅ CI with GitHub Actions (Module 7)
What's missing: Integrating all the pieces into a real project from start to finish.
Your trajectory
Phase 1: ✅ Fundamentals
Spec-first → Unit tests → Test pyramid
Phase 2: ✅ Workflows
TDD workflow → Coverage → Mocking → Validation loops
Phase 3: Final Project
CI ✅ → Module 8: ← YOU ARE HERE — The capstone project
Professional Objective
Build a complete application with a professional test suite using 100% TDD with Claude Code, demonstrating mastery of the whole workflow.
By the end of this module you'll have:
- ✅ A working application built with TDD
- ✅ A complete test pyramid: unit + integration + E2E
- ✅ Coverage ≥90% with edge cases covered
- ✅ Mocks for external services
- ✅ A working CI pipeline in GitHub Actions
- ✅ A repository that serves as a portfolio
Module Progression
Module Map
| Capsule | Topic | What you'll do |
|---|---|---|
| 02 | Spec-first planning | Design the app, define features as user stories, decompose them into tests |
| 03 | Core features with TDD | Build auth and CRUD using TDD cycles with Claude Code |
| 04 | Business logic and edge cases | Implement the business logic, coverage ≥90%, edge cases |
| 05 | Mocks, fixtures, CI | Add mocks for services, professional fixtures, a CI pipeline |
| 06 | Delivery and retrospective | Final documentation, project validation, a retrospective on the learning |
The development flow
Week 1 (capsules 02-03): Plan and build the application's core with TDD.
Week 2 (capsules 04-06): Complete the business logic, add mocking/CI, document and deliver.
The Application
TaskFlow API — A Task Manager with Teams
A REST API for team task management. Complex enough to require tests at multiple levels, but completable in ~2 hours with TDD + Claude Code.
Features:
- Authentication: Registration, login, tokens
- Teams: Create a team, add members
- Tasks: CRUD with assignment to members, priorities, statuses
- Business logic: Valid status transitions, permissions by role, team statistics
- Filtering: Tasks by status, priority, assignee
The Stack
- Python 3.11+
- FastAPI
- pytest, pytest-cov, pytest-mock, hypothesis
- GitHub Actions
The Structure
taskflow/
├── .github/
│ └── workflows/
│ └── tests.yml
├── app/
│ ├── __init__.py
│ ├── main.py
│ ├── models.py
│ ├── auth/
│ │ ├── __init__.py
│ │ ├── service.py
│ │ └── utils.py
│ ├── teams/
│ │ ├── __init__.py
│ │ └── service.py
│ └── tasks/
│ ├── __init__.py
│ ├── service.py
│ └── rules.py
├── tests/
│ ├── conftest.py
│ ├── unit/
│ │ ├── conftest.py
│ │ ├── test_auth.py
│ │ ├── test_teams.py
│ │ ├── test_tasks.py
│ │ └── test_rules.py
│ ├── integration/
│ │ ├── conftest.py
│ │ ├── test_auth_endpoints.py
│ │ ├── test_team_endpoints.py
│ │ └── test_task_endpoints.py
│ └── e2e/
│ ├── conftest.py
│ └── test_flows.py
├── requirements.txt
├── pyproject.toml
└── README.md
The Connection with Everything You Learned
| Module | How you use it here |
|---|---|
| M1: Spec-first | You plan features as tests before implementing |
| M2: Unit tests | Tests of isolated functions (auth, rules, validators) |
| M3: Test pyramid | Tests at 3 levels: unit, integration, E2E |
| M4: TDD workflow | Each feature is built with red-green-refactor cycles |
| M5: Coverage | A ≥90% target with edge cases and property tests |
| M6: Mocking | Mocks for external services, fixtures in conftest.py |
| M7: CI | A GitHub Actions pipeline that runs the whole suite |
Boundaries: What Will NOT Be Done
- ❌ A frontend — A REST API only
- ❌ A real database (PostgreSQL) — We use in-memory to keep it simple
- ❌ Deploying to production — CI but not CD
- ❌ Microservices — A single monolithic application
- ❌ OAuth/SSO authentication — Only username/password with simple tokens
Evidence of Success
By the end of this module, you'll know you succeeded if:
- ✅ The application works: you can register, log in, create teams, and manage tasks
- ✅ The test suite has tests at 3 levels (unit, integration, E2E)
- ✅ Coverage ≥90% line coverage
- ✅ The CI pipeline runs successfully in GitHub Actions
- ✅ The TDD process is documented (cycles, spec refinement, decisions)
- ✅ The repository is presentable as a portfolio piece
Summary
- ✅ This is the final project that integrates all the guide's modules
- ✅ You'll build a complete REST API using 100% TDD with Claude Code
- ✅ The application has auth, teams, tasks, and business logic
- ✅ The test suite has tests at 3 levels with ≥90% coverage
- ✅ A CI pipeline in GitHub Actions protects every push
- ✅ The repository is your evidence of mastery and a portfolio piece
Next capsule: Spec-First Planning — designing the application from the tests.
Additional Resources
- FastAPI Documentation - The framework for the API
- pytest Documentation - The testing framework
- GitHub Actions - The CI pipeline
- Anthropic: Claude Code - Your implementation assistant
- Test-Driven Development by Example - The TDD reference
Module 8 — Testing with Claude Code Guide Everything you learned, one project, your portfolio