u/Melodic_Internet8158

What GitHub repo structure is recommended for a full-stack Firebase project?

I'm working on a Firebase project that has a Flutter mobile app and static website (that uses Firebase Hosting), and it uses services such as Cloud Functions, Firebase Auth, and Cloud Firestore. Currently, I have two separate GitHub repos for this, one for the app, and one for the website. But now, as I'm starting to write my Cloud Firestore rules, I'm realizing that this may not be the best idea, as updating the rules on both the app and website is annoying - and while I could create a third repo that only contains the Firestore rules or a GitHub action, this feels wrong for some reason. Alternatively, I could create a monorepo that contained the app and the website together with all of the backend and Firestore logic as well. What is the best way to do this to ensure I don't get into any messy situations?

Update: I migrated everything to one repo, and it definitely makes things feel less messy and my git history look nicer -- however, the Flutter app is complaining a little bit, because firebase.json is in my root directory...and the Flutter app is in ./apps/mobile...is there any way to configure it so that I can use the firebase.json from my root directory (it has both the web and the flutter config in it)?

reddit.com
u/Melodic_Internet8158 — 4 days ago