The Local API Pattern
Why Kide CMS uses plain function calls instead of HTTP endpoints for content operations.
Most headless CMSes force you to fetch content over HTTP, even when the CMS and the frontend run in the same process. Kide CMS takes a different approach.
Import, don't fetch
With Kide, content operations are plain TypeScript imports: cms.posts.find() is a direct function call, not an HTTP round-trip. No serialization overhead, no network latency, full type safety.
When HTTP is needed
The admin UI runs as React islands that need to talk to the server. For this, a thin HTTP layer wraps the same local API. But your public pages never go through HTTP; they call the API directly.
Benefits
Zero network overhead for server-rendered pages
Full TypeScript types from schema to template
Same API for admin and public, no duplication
Easy to test with plain function calls