Phase 1: FastAPI backend with async job model

- backend/app: FastAPI API wrapping the CAD skill modules
  - upload -> job -> poll -> model / BOM / artifacts -> geometry query
  - SQLite via SQLModel (Model, Job, BomRow, QueryLog)
  - ThreadPoolExecutor worker, serialized, with live stage updates
- docker-compose.yml: dev server (mounts source, --reload) on :8000
- api-test.sh: end-to-end live validation script
- requirements.txt: add fastapi, uvicorn, python-multipart, sqlmodel
- external_diagram.py: port active-area detection OCC.Core -> OCP
- .gitignore, PHASE1.md

Validated live: MR16 round-trip passes (28 BOM rows, 12 artifacts,
bounding-box query, xlsx download; active-area detection working).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jason Stedwell
2026-06-17 16:38:26 -05:00
parent c1abe36822
commit b3c3e2a3b2
15 changed files with 701 additions and 5 deletions
+6
View File
@@ -24,3 +24,9 @@ cairosvg>=2.7 # SVG -> PNG/PDF
# --- Chinese -> English part-name translation ---------------------------------
anthropic>=0.39 # needs ANTHROPIC_API_KEY at runtime (optional in Phase 0)
# --- web API (Phase 1) --------------------------------------------------------
fastapi>=0.115
uvicorn[standard]>=0.32
python-multipart>=0.0.9 # multipart/form-data uploads
sqlmodel>=0.0.22 # SQLAlchemy + Pydantic ORM over SQLite