Building a JSON Database with Vue & Netlify CMS
I've been working on a unique project that combines static site generation with dynamic content management. The idea? Create a JSON-based database that can serve as an API backend for modern frontend frameworks like Vue.js and React.
The Architecture
- Static JSON files in
/public/data/ serve as database
- Netlify CMS (Decap CMS) for content management
- Serverless functions for GitHub sync automation
- Vue 3 + Vite for the admin interface
Why This Approach?
- No database overhead - everything is static files
- API-ready - JSON endpoints consumable by any frontend
- Git-based - version control for content
- Fast deployments - static hosting with CDN
The Magic of JSON as API
// Your frontend can consume like this:
const projects = await fetch('/data/personal-projects.json')
const blogs = await fetch('/data/blogs/index.json')
const post = await fetch(`/data/blogs/${slug}.json`)
Next Steps
I'm planning to build a Vue.js frontend that consumes these JSON endpoints to create a dynamic portfolio and blog system. The beauty is that the content management happens through Netlify CMS, but the presentation layer can be completely decoupled.
Stay tuned for more updates on this project!