Headless CMSNextly as a headless CMS.
Read content straight from your database in your page code (the Direct API), or over REST.
MIT licensed, self-hosted. Runs inside your own Next.js app, on your own PostgreSQL or MySQL database, or SQLite for local work.
npx create-nextly-app@alpha my-app01How it fits together
What you write, what Nextly runs, and who it is for
Each numbered part is explained under the drawing, with its limit where it has one.
Your Next.js app
- Nextly, inside your Next.js appRESTUnder /admin/api, with API keysWho it is forOther apps and services
- In your code
nextly.config.tsCollections, singles, rulesNextly, inside your Next.js appThe adminAt /adminWho it is forYour team: entries, media, users - In your code
app/**/page.tsxYour routes and server codeNextly, inside your Next.js appThe Direct APITrusted server codeWho it is forYour pages and routes
Your own PostgreSQL or MySQL database, or SQLite for local work
REST
Access rules you write in code apply over REST and in the admin, including read rules on a collection’s or single’s own fields.
LimitWith the rate limit on (the default), every REST request, the admin API included, counts against a budget for whoever is asking: a signed-in session, an API key, or an address.
CMS for Next.jsThe admin
Model content in TypeScript or in the Visual Schema Builder. Both feed the same Nextly runtime, admin and APIs.
Role-based permissions for each collection and action, plus field-level read and write rules in code, on a collection’s or single’s own fields.
CMS for Next.jsThe Direct API
Read content straight from your database in your page code (the Direct API), or over REST.
LimitThe Direct API runs as trusted server code and skips access rules unless you pass
CMS for Next.jsoverrideAccess: false.
02In your code
The code you write
import { defineCollection, defineConfig, richText, text } from "nextly/config";
const Posts = defineCollection({
slug: "posts",
admin: { useAsTitle: "title" },
fields: [
text({ name: "title", required: true }),
text({ name: "slug", required: true, unique: true }),
richText({ name: "content" }),
],
status: true,
});
export default defineConfig({ collections: [Posts] });import { getNextly } from "nextly";
import config from "@/nextly.config";
export default async function BlogPage() {
const nextly = await getNextly({ config });
const { items: posts } = await nextly.find({
collection: "posts",
where: { status: { equals: "published" } },
sort: "-createdAt",
limit: 10,
});
return <ul>{posts.map((p) => <li key={p.id}>{p.title}</li>)}</ul>;
}written for nextly 0.0.2-alpha.82
In 0.0.2-alpha.82
What ships today
- Package
nextly- Release
0.0.2-alpha.82· 28 Nov 2026- Licence
- MIT
- APIs
- The Direct API and REST
- Databases
- PostgreSQL 15+, MySQL 8+, SQLite 3.38+ for local work
- Requires
- Node.js 22.12+ or 24+; Next.js 16 with the App Router; React 19
Where Nextly is today
Before you start
Nextly fits if you want
- Access rules in code that apply over REST and in the admin.
- Your data in your own PostgreSQL or MySQL database.
Look elsewhere if you need
- A GraphQL API. Nextly offers REST and the Direct API.
- A hosted service. Nextly is self-hosted.
- Behind a proxy
- Behind a proxy, set
security.trustProxyso anonymous callers are told apart. Docs - Access rules and the Direct API
- The Direct API runs as trusted server code and skips access rules unless you pass
overrideAccess: false. Called that way with nouser, it is judged as a signed-out visitor: it can read where no rule names the read, and a create, update or delete needs a rule that allows it. Docs - Sign-in
- Sign-in for your team: email and password, sessions and API keys, stored in your own database. Docs
Nextly is in alpha. APIs may change before 1.0. Pin exact versions in production.
Questions
Short answers
Does Nextly have a GraphQL API?
No. Nextly offers REST and the Direct API.
Does Nextly run inside my Next.js app?
MIT licensed, self-hosted. Runs inside your own Next.js app, on your own PostgreSQL or MySQL database, or SQLite for local work.
Do access rules apply over REST?
Access rules you write in code apply over REST and in the admin, including read rules on a collection’s or single’s own fields.
Is Nextly free?
Nextly is MIT licensed and self-hosted.
MIT today, and no decision yet about paid offerings.