Replies: 2 comments 1 reply
-
|
@marcvergees @vharkins1 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
How are we feeling about calling both repos The rest looks good to me. @vharkins1, opinions? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
A few things I noticed while reading the code. Writing them here so we can talk about it before any PR goes up.
What is wrong right now
api/andsrc/both look like the backend at first. They are not duplicates.api/is the FastAPI service.src/is the LLM + PDF engine the routes call into. The names do not say that, and a new contributor will guess wrong. The same repo also holds the Electron frontend, which has nothing to do with the Python side.release.ymlis already using aworking-directory: frontendworkaround because of this.frontend/app.jsis one file, over a thousand lines long. It has the API client, the localStorage state, the tab UI and the Electron glue all in one place. No modules, no lint, no build step.What I want to do
Split the project into two repos and restructure both.
fireform-server: FastAPI app, DB, LLM/PDF pipeline.fireform-desktop: Electron app, talks to the server over HTTP.They only talk over one URL today so the split is cheap.
Server repo layout
Top level:
backend/is one Python package, layered:docker/is one folder per environment:conf/is external service config that we ship with the repo so deploys are reproducible. Only add what we actually use.docs/is short, single-purpose files. Clear name prefixes:how-to-*,explain-*,ref-*,tutorial-*. Each file does one thing and fits on one screen. Use diataxis Stylescripts/is ops and dev helpers that are not part of the runtime. Right now the Makefile reaches into the container for these. Moving them out means they run outside Docker too.Makefile targets become thin wrappers:
make pull-modelruns./scripts/pull-model.sh.Server migration steps, one PR each:
api/andsrc/intobackend/, fix imports.docker/{dev,prod,...}/.docs/to match the new layout, one short file at a time.Desktop repo layout
React + Vite + Electron, with TypeScript. Replace the single
app.jsfile.Why React over vanilla modules or Svelte/Vue:
app.js.Desktop migration:
frontend/where it is for now.fireform-serverandfireform-desktopfrom the restructured tree.app.js. Port one feature at a time (templates list, fill form, template builder). Deleteapp.jsonce the last feature is done.Step 3 is the slowest. Doing it inside the new repo (not on
mainhere) keeps it off the critical path for everyone else.Few questions
mainfirst and then cut the new repos, or cut first and restructure inside them.Happy to start with the backend restructure, if this sounds reasonable.
Beta Was this translation helpful? Give feedback.
All reactions