chore: remove the superseded Python backend - #71
Merged
Conversation
The Python Flask backend was unreachable from the running app. firebase.json
deploys only functions/; the frontend calls Firebase callables and never
referenced VITE_API_URL, the variable the Flask service was exposed under in
docker-compose.yml; and backend/app.py did not import task_manager, tax_forms,
or form_filler. Its presence had already misdirected planning more than once.
It was also the repository's largest source of dependency risk. FOSSA
attributes to backend/requirements.txt all 7 open license issues and roughly
34 of the 64 vulnerabilities — pillow (17), cryptography (7), PyJWT (5),
requests (2), plus idna, pytest, and PyPDF2. Dependabot never surfaced these
because it is only watching npm here.
Removed:
- backend/ (49 files: Flask app, LangChain agents, parser, tax_forms, queue,
embedding/FAISS, RAG pipelines, prompts, samples)
- docker/backend/Dockerfile and the backend service, its volume, and the
frontend's depends_on in docker-compose.yml
- The now-unused VITE_API_URL build arg
- .github/workflows/backend.yml, which only ran pytest against the deleted
backend/parser/functions
Verified nothing live depended on it: functions/src has no reference to
backend, and the agent prompts it uses are functions/prompts/{accountant,
auditor}.md, not the superseded backend/agents/skills copies. faiss-cpu had
no imports anywhere; reportlab, Pillow, and urllib3 were used only inside the
deleted tree.
frontend builds and passes 13/13 tests; functions typechecks and passes 60/60.
docker-compose and api-docs/openapi.yml both still parse.
Docs updated: README.md, CLAUDE.md, docker/README.md, and the stale
backend/sample reference in api-docs/openapi.yml.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
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.



Summary
Removes the Python Flask backend, which is unreachable from the running app and is the repository's single largest source of dependency risk.
57 files changed, 49 of them deletions under
backend/.Why it is dead
firebase.jsondeploys onlyfunctions/VITE_API_URL— the variable the Flask service was exposed under indocker-compose.ymlbackend/app.pydid not importtask_manager,tax_forms, orform_fillerThis was established in #69, where the stale architecture description in
CLAUDE.mdhad already misdirected planning twice.Why it matters beyond cleanup
FOSSA attributes to
backend/requirements.txtall 7 open license issues and roughly 34 of the 64 vulnerabilities:Dependabot never surfaced any of these — it is only watching npm in this repo, which is why they went unnoticed while the npm alerts were being triaged in #70.
Removed
backend/— 49 files: Flask app, LangChain agents, parser,tax_forms, queue, embedding/FAISS index, RAG pipelines, prompts, samplesdocker/backend/Dockerfile, plus thebackendservice, itsbackend_datavolume, and the frontend'sdepends_onindocker-compose.ymlVITE_API_URLbuild arg fromdocker-compose.ymlanddocker/frontend/Dockerfile.github/workflows/backend.yml, which only ran pytest against the deletedbackend/parser/functionsChecks that nothing live depended on it
functions/srccontains no reference tobackendfunctions/prompts/{accountant,auditor}.md, loaded byfunctions/src/prompts.ts. Thebackend/agents/skills/*.mdcopies were the superseded originals.faiss-cpuhad zero imports anywhere in the repositoryreportlab,Pillow/PIL, andpytesseractwere imported only bybackend/tax_forms/form_filler.py,backend/queue/task_processors.py,backend/src/chatbot.py, andbackend/src/openai/rag_pipeline.py— all deletedurllib3had no direct imports; it was pinned only as a version floorfirebase-deploy.yml,frontend.yml,upgrade-docs.yml) contain no reference tobackend,python, orpytestVerification
frontend:npm run buildsucceeds, 13/13 tests passfunctions:npx tsc --noEmitclean, 60/60 tests passdocker compose configparsesapi-docs/openapi.ymlparses (12 paths)Docs updated
README.md,CLAUDE.md, anddocker/README.mdall described the Flask backend as current. Also corrected two stale references the deletion exposed:CLAUDE.mdclaimed extraction ran viaparser.py(it runs viaflows/extractor.ts), andapi-docs/openapi.ymlpointed/sample/{filename}at the deletedbackend/sampledirectory.Note
api-docs/openapi.ymldocuments several REST endpoints that have no implementation infunctions/—/sample/{filename}was one, served by the removed Flask dev server. I marked that one as not implemented rather than deleting the path, since reconciling the whole spec against the callable-function reality is a separate piece of work.Everything here is recoverable from git history if any of it turns out to be wanted.
🤖 Generated with Claude Code