|
1 | 1 | # harness-python-react |
2 | 2 |
|
| 3 | +[](https://github.com/constk/harness-python-react/actions/workflows/ci.yml) |
| 4 | +[](https://github.com/constk/harness-python-react/actions/workflows/security.yml) |
| 5 | +[](LICENSE) |
| 6 | +[](https://www.python.org/) |
| 7 | +[](https://nodejs.org/) |
| 8 | +[](https://react.dev/) |
| 9 | +[](docs/HARNESS.md) |
| 10 | + |
3 | 11 | > A production-quality coding harness for Python (FastAPI) + Vite/React/TypeScript projects. Designed for LLM-driven development: every gate — lint, types, architecture, security, eval — is enforced mechanically so code quality stays consistent across many human and AI contributors. |
4 | 12 |
|
5 | 13 | ## What ships |
@@ -27,6 +35,61 @@ docker compose up # backend :8000, frontend :5173, Jaeger :16686 |
27 | 35 |
|
28 | 36 | The pre-push gate is `just check` (= ruff + mypy + import-linter + pytest). For frontend changes add `just frontend-check`. |
29 | 37 |
|
| 38 | +## Screenshots |
| 39 | + |
| 40 | +### `just check` — local pre-push gate |
| 41 | + |
| 42 | +What every contributor sees before pushing: |
| 43 | + |
| 44 | +```text |
| 45 | +$ uv run --frozen ruff check . |
| 46 | +All checks passed! |
| 47 | +
|
| 48 | +$ uv run --frozen ruff format --check . |
| 49 | +37 files already formatted |
| 50 | +
|
| 51 | +$ uv run --frozen mypy --strict src/ tests/ |
| 52 | +Success: no issues found in 31 source files |
| 53 | +
|
| 54 | +$ uv run --frozen lint-imports |
| 55 | +Analyzed 24 files, 15 dependencies. |
| 56 | +
|
| 57 | +src layers flow one-way (api/eval -> agent -> tools -> data -> observability -> |
| 58 | +models) KEPT |
| 59 | +src.models depends on nothing in src/ KEPT |
| 60 | +
|
| 61 | +Contracts: 2 kept, 0 broken. |
| 62 | +
|
| 63 | +$ uv run --frozen pytest tests/ --cov=src --cov-report=term |
| 64 | +============================= 40 passed in 0.75s ============================== |
| 65 | +TOTAL 221 3 99% |
| 66 | +Required test coverage of 75.0% reached. Total coverage: 98.64% |
| 67 | +``` |
| 68 | + |
| 69 | +### CI on a sample PR |
| 70 | + |
| 71 | +Eight backend + two frontend + four security jobs all green on every PR: |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | +> **Capture:** open <https://github.com/constk/harness-python-react/actions/workflows/ci.yml>, click any green run on `develop`, screenshot the job-list panel. Save as `docs/images/ci-green.png`. |
| 76 | +
|
| 77 | +### Hello page (`docker compose up`) |
| 78 | + |
| 79 | +The scaffold's React page hits `/api/v1/health` on load and renders the version + status badge: |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | +> **Capture:** `docker compose up`, open <http://localhost:5173>, screenshot. |
| 84 | +
|
| 85 | +### Jaeger trace for `/api/v1/health` |
| 86 | + |
| 87 | +OTel auto-instrumentation produces one span per request, exported via OTLP gRPC to the local Jaeger: |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +> **Capture:** with the stack running, hit `/api/v1/health` once, then open <http://localhost:16686>, select service `harness-python-react`, click the most recent trace, screenshot the span timeline. |
| 92 | +
|
30 | 93 | ## Why a harness |
31 | 94 |
|
32 | 95 | The differentiator isn't the scaffold — it's that every layer of the pipeline catches a different failure class **without relying on the human or LLM coder remembering to run anything**. The same posture protects code regardless of who wrote it. |
|
0 commit comments