What OP is building is not a typical "flat file CMS".
Flat File CMS are typical CMS systems (often times written in PHP) that run on the server, but use files (often Markdown/Frontmatter) as their data backend (instead of a DB like Wordpress, Drupal, etc.) – if you're looking for a really nice Flat File CMS take a look at Kirby (https://getkirby.com) or Statamic.
What OP is building (I think) and what others like Netlify CMS and Tina CMS do, are Frontend Applications (typically SPA) that output a set of content files, which can then be fed into a static site generator (like Next.js, Astro, Hugo, Jekyll), which will built a website from it. Often these content files live on Git – so the common interface between a SSG and the "static CMS" is often Git (or a local folder on your file system). So it's a "smaller" concept than flat file CMS. Typically these "static CMS" only care about content and have nothing to do with templating, etc.
Flat File CMS are typical CMS systems (often times written in PHP) that run on the server, but use files (often Markdown/Frontmatter) as their data backend (instead of a DB like Wordpress, Drupal, etc.) – if you're looking for a really nice Flat File CMS take a look at Kirby (https://getkirby.com) or Statamic.
What OP is building (I think) and what others like Netlify CMS and Tina CMS do, are Frontend Applications (typically SPA) that output a set of content files, which can then be fed into a static site generator (like Next.js, Astro, Hugo, Jekyll), which will built a website from it. Often these content files live on Git – so the common interface between a SSG and the "static CMS" is often Git (or a local folder on your file system). So it's a "smaller" concept than flat file CMS. Typically these "static CMS" only care about content and have nothing to do with templating, etc.