Introduction
Ghost Writr is an autonomous content engine. It researches, writes, and publishes articles for your site on its own — your job as a developer is just to pull those published articles into your app and render them. These docs are about that read side: the SDKs that fetch your articles and the shape they arrive in.
How it fits together
Section titled “How it fits together”An autonomous engine runs behind the scenes and publishes finished articles. Each publish writes an immutable snapshot to a public static feed. Your site reads from that feed at build time (SSG/ISR) or per request (SSR) and renders the Markdown. You never call a write API and you never run a CMS sync.
Ghost Writr engine ──publishes──▶ static feed (feeds.ghostwritr.io/{siteId}/) ──reads──▶ your siteThe keyless model in 60 seconds
Section titled “The keyless model in 60 seconds”Reads are keyless. There is no API key and no authenticated fallback path:
- Your site ID is an unguessable UUID. It is the read capability — knowing it is what lets you read your articles.
- All reads hit the public static feed at
feeds.ghostwritr.io/{siteId}/. It’s free R2 egress and immutable per-build snapshots. - A missing feed fails closed: the SDK throws a
GhostwritrErrorwith code"NOT_FOUND"rather than returning empty or falling back to an authed endpoint. - The site ID only grants read of already-public published content, so it’s safe to ship to the client or the edge. The engine’s write key is separate and the SDKs never need it.
See Keyless reads for the full contract.
The SDK family
Section titled “The SDK family”One core package does the fetching; thin framework adapters wrap it with the right caching and conventions for your stack; one package renders the Markdown.
| Package | Role | Use it for |
|---|---|---|
@ghostwritr/feed | Core | The framework-agnostic keyless fetchers — fetchArticles, fetchArticle. Everything else builds on it. |
@ghostwritr/next | Framework adapter | Next.js App Router — a server-only client with ISR/SSG and instant revalidation. |
@ghostwritr/astro | Framework adapter | Astro — a Content Layer loader that pulls articles into a collection at build time. |
@ghostwritr/react-router | Framework adapter | React Router v7 — server-side loaders plus SEO meta. |
@ghostwritr/react | Renderer | <ArticleContent> — a sanitized, GFM-aware Markdown renderer (RSC-safe). |
The framework adapters re-export the core types and wrap its fetchers with framework caching. If your stack isn’t listed, build directly on @ghostwritr/feed.
Next: pick your framework
Section titled “Next: pick your framework”Each quickstart gets a blog index and article pages reading from the keyless feed in a few minutes.