firefly
firefly copied to clipboard
Consider moving frontend and scripts code to a second tier dir like functions
I'm starting to play around a little more with the file structure, and I keep interacting with the functions dir unexpectedly.
It seems like an anti pattern to have a full project sitting below a top level project. It'd be one thing if we shared dependencies (shared node_modules), and then treeshaked to trim.
My suggestion is to move scripts, public, src to another second tier dir.
firefly/ ---functions/ ---+--- existing ---+---package.json ---scripts/ ---+---existing ---frontend (or something else) ---+---public/ ---+---src/ ---+---.env.stage ---+---package.json ---+---etc ---.gitignore ---README.md ---firebase ---etc
I will add that I prefer the discoverability in the current model. A dev really "gets right into it" in with the existing infra.
The issue is (IMO) that a novice dev will hit issues with the existing structure before they're prepared to make a larger refactor.
@SamBroner I was definitely going for a simpler, flatter directory structure for new devs--but I do see your point.
I'd have to think about making it work with both Create React App and Firebase (both pretty opinionated about folder structure), but I could probably have all CRA stuff in the frontend
folder and keep Firebase config at the root.
Would love to hear thoughts from anyone else on this.