[37.1] BFF storage contract and file-system mock for LawNet #51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/37.1-bff-storage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Defines the BFF storage contract for LawNet catalog listing and case detail lookup, implements file-system storage with mock data, and adds tests — all without PostgreSQL or UI changes.
What's included
LawnetStoreinterface — contract forlistJudgments,getJudgment,getJudgmentByCitation,getArtifactFileSystemStore— reads catalog/artifact fixtures from diskGET):/api/judgments?limit=&offset=/api/judgments/:resultId/api/judgments/citation/:year/:courtCode/:decisionNumber/api/artifacts/:source/:artifactIdVerified
pnpm typecheck— cleanpnpm test— 17 tests pass (1 existing + 16 new)pnpm lint— cleanpnpm dev— starts without Docker/PostgreSQL@ -0,0 +1,41 @@import "@tanstack/react-start/server-only";I think we shouldn't take the class abstraction and then add another layer that converts it into functions. The API handler should just call
getStoreand then invoke the method on the result, not use a roundabout way of abstracting the store. Yeah, this is bad practice.16f9b95971517982459a