This is a framework I'm using to make JAM stack websites for clients. The way it is set up is via one main firebase projects with multi-tenancy of sub-projects per client. If this repo gets attention, I'll fix existing bugs, add in a demo and documentation to help you integrate your own version with firebase.
Edit PROJECT_NAME, under ./contants.js. This should be a unique name of the document in Firestore. APP_TITLE: Title of the website SITE_URL: The live website's URL. APP_ICON: favicon url, can be absolute or relative. SUPPORT_EMAIL: Destination mailbox to send enquiries or admin data to.
In the Database, page content is saved under one document called websiteContent. Dynamic content is stored as multiple documents under a separate subcollection.
Each of the CMS fields must have a unique id prop. This is the key that the document saves the content under. If it is not unique, it will be overridden by the next field to be edited.