docs: ADR 0001 + Python backend scaffolding for single-backend migration (Phase 0)#1571
Open
Snoww3d wants to merge 1 commit into
Open
docs: ADR 0001 + Python backend scaffolding for single-backend migration (Phase 0)#1571Snoww3d wants to merge 1 commit into
Snoww3d wants to merge 1 commit into
Conversation
…ion (Phase 0) Adds the architecture decision record to collapse the three-tier polyglot stack into a two-service architecture (React frontend + Python FastAPI single backend), deleting the .NET gateway over a phased strangler-fig migration. Phase 0 (additive, zero behavior change): - ADR docs/architecture/adr/0001-collapse-to-python-single-backend.md, linked from the architecture index and mkdocs nav. - Scaffolding packages under processing-engine/app/: auth/, db/, library/, jobs/. Empty routers wired into main.py to establish the import graph and OpenAPI tags without changing runtime behavior. - requirements.txt: motor, pyjwt, passlib[bcrypt], bcrypt for the upcoming persistence + auth phases. - AGENTS.md and system-overview.md note the in-progress target architecture. https://claude.ai/code/session_01MWMesVhoX13SVmCcgjWrDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No linked issue
Summary
Kicks off a phased architecture simplification: collapse the three-tier polyglot stack (React → .NET gateway → Python engine) into a two-service architecture — React frontend talking directly to a Python FastAPI single backend — and delete the
.NETgateway.This PR is Phase 0: the decision record plus backend scaffolding. It is additive with zero runtime behavior change — the empty routers add no endpoints, and
.NETstill serves the frontend exactly as before.Why
A full-stack review (
CODEBASE_REVIEW.md) confirmed the.NETComposite/Mosaic/Mast/Analysis/SemanticSearchservices are HTTP proxies to the Python engine, which already owns those domains end-to-end. The gateway's only non-duplicated responsibilities are auth, MongoDB persistence (just 2 collections), job tracking + SignalR, and a storage abstraction Python already has. Astropy must stay in Python, so the natural simplification is to make Python the single backend.Outcome of the full migration: one backend instead of two, ~44k fewer lines of C# (incl. tests), no
snake_case ↔ camelCaseboundary, and far fewer containers/compose files. The system stays shippable after every phase (strangler-fig).Changes Made
docs/architecture/adr/0001-collapse-to-python-single-backend.md— context, decision, consequences, and the 8-phase roadmap. Linked from the architecture index and mkdocs nav.processing-engine/app/:auth/,db/,library/,jobs/. EmptyAPIRouters wired intomain.pyto establish the import graph and OpenAPI tags ahead of Phases 1–3.requirements.txt— addsmotor(async MongoDB),pyjwt,passlib[bcrypt],bcryptfor the upcoming persistence + auth phases.AGENTS.mdanddocs/architecture/system-overview.mdnote the in-progress target architecture and where new backend code lives.Test Plan
ast.parse); router wiring is mechanically identical to the five existing routers.docker exec jwst-processing python -m pytestin CI (fastapi/deps run in Docker, not in this environment).Documentation Checklist
docs/architecture/(new ADR + system-overview note)Tech Debt Impact
.NETproxy tier and the duplicated storage abstraction.Risk & Rollback
Follow-up phases
Each lands as its own PR: (1) Mongo + Auth, (2) Library/persistence, (3) Jobs + WebSocket, (4) MAST/discovery wiring, (5) frontend cutover, (6) delete
.NET, (7) infra simplification, (8) in-tier god-file cleanup.https://claude.ai/code/session_01MWMesVhoX13SVmCcgjWrDF
Generated by Claude Code