A minimal web client for training-cc4e-vault.
This repo is the frontend half of Module 10 in the Claude Code for Enterprise training: Build It: One Spec, Two Repos. The lab builds out a small Vault feature that touches both repos at once, walking every beat from Modules 1 to 8 in a single cross-repo task.
- FastAPI — thin HTTP layer
- Jinja2 — server-side templates
- HTMX — interactive UX without a JavaScript build step
- pytest + httpx — tests
- uv — dependency manager (same as training-cc4e-vault)
No npm. No webpack. No Node toolchain.
┌────────────────────────┐
browser ── │ vault-web (FastAPI) │ ── HTTP ─┐
│ templates/, app/ │ │
└────────────────────────┘ ▼
┌────────────────────────┐
│ vault (this repo's │
│ upstream HTTP API) │
└────────────────────────┘
│
▼
notes/*.md
The web layer never touches the filesystem directly. It calls the Vault's HTTP API for every read and write. Two repos, one API contract.
# Get the matching Vault running on :8001
git clone --branch main https://github.com/infralovers/training-cc4e-vault
cd training-cc4e-vault
uv sync
uv run vault serve --port 8001 &
cd ..
# Run the web client on :8000
git clone --branch main https://github.com/infralovers/training-cc4e-vault-web
cd training-cc4e-vault-web
uv sync
uv run uvicorn app.main:app --reload --port 8000Open http://localhost:8000 in your browser.
This is a training stub. The following gaps are the lab:
- The
/notesendpoint exists but only renders a hardcoded list. - There is no
source_urlfield anywhere. - The form on the index page has no submit handler.
- Tests are minimal; coverage is on the contract layer only.
Module 10 fills these in, step by step, across both repos.
training-cc4e-vault-web/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI app, routes
│ ├── vault_client.py # Thin client for the vault HTTP API
│ └── models.py # Pydantic models for the API contract
├── templates/
│ ├── base.html # Jinja2 base layout
│ ├── index.html # Home: list + new-note form
│ └── partials/
│ └── note_list.html # HTMX swap target
├── static/
│ └── styles.css # Minimal CSS
├── tests/
│ ├── test_main.py # Route smoke tests
│ └── test_vault_client.py
├── CLAUDE.md # Project memory for Claude Code
├── pyproject.toml
└── README.md
Internal Infralovers training material. See trainings repo root for licence terms.