Use case

Content management

Blog posts, knowledge bases, marketing pages, product catalogs. Edit in the GUI, query via API, deploy from disk.

The headless CMS pattern

You want a place for editors to manage content. You want a fast API for your application to fetch it. You want a build pipeline that can statically generate pages. You want versioning, references, and rich text. You don't want to operate a CMS.

Jaina is the data layer for this. The application layer — Next.js, Astro, Hugo, Eleventy, whatever — fetches from Jaina at build time or runtime.

Schemas you'll define

  • Post — title, slug, body (richtext), author (reference), published_at, hero (image), tags (array of select).
  • Author — name, avatar (image), bio (richtext).
  • Page — title, slug, sections (array of references to mixed Section types).
  • Section — variant (select), content (richtext or json depending on variant).

Build-time fetching (Next.js)

// app/blog/[slug]/page.tsx
import { JainaClient } from '@jaina/sdk';

const jaina = new JainaClient({ apiKey: process.env.JAINA_API_KEY! });

export async function generateStaticParams() {
  const posts = await jaina.records.list<Post>('blog', 'post');
  return posts.items.map((p) => ({ slug: p.slug }));
}

export default async function PostPage({ params }) {
  const post = await jaina.records.getBySlug<Post>('blog', 'post', params.slug);
  return <PostView post={post} />;
}

Runtime fetching with revalidation

const post = await jaina.records.getBySlug<Post>('blog', 'post', slug, {
  next: { revalidate: 60 },  // ISR — re-fetch at most once per minute
});

Export to disk for build pipelines without network

jaina export my-blog --format json --output ./content/

Now ./content/blog/post-1.json exists at build time and your static site generator can read it directly. No network at build time.

What's not in scope

  • Live preview — you can build it on top of Jaina's API, but we don't ship a preview server.
  • Image transformation — Jaina stores files; image resize/crop pipelines belong in a CDN layer (Imgix, Cloudinary, Next.js Image).
  • Search — Jaina supports basic filtering, but if you need typo-tolerant full-text search across blog posts, run Algolia or Meilisearch alongside.

Why teams pick Jaina over Contentful / Sanity / Strapi

  • The MCP integration. AI assistants that can read and write your content layer natively are a real productivity unlock for content teams.
  • The schema-as-meta-class model. Adding a field is one form, three doors. Other CMSes treat custom field types as a plugin layer.
  • The price. Free tier with no payment method required; Pro is $9.99 / month.