Nextly for developersCollections you define in code are files in your repository.
Nextly is an open-source content platform for Next.js.
MIT licensed, self-hosted. Runs inside your own Next.js app, on your own PostgreSQL or MySQL database, or SQLite for local work.
Model content in TypeScript or in the Visual Schema Builder. Both feed the same Nextly runtime, admin and APIs.
npx create-nextly-app@alpha my-appWhat it does
Typed, code-defined schemas and APIs: nextly generate:types writes types for the collections, singles and field groups in your config.
LimitA collection made in the Visual Schema Builder is stored in your database, with no TypeScript file written for it, and gets no generated types.
Codenextly.config.ts
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] });Compiled against nextly 0.0.2-alpha.82
Read content straight from your database in your page code (the Direct API), or over REST.
The Direct API runs as trusted server code and skips access rules unless you pass overrideAccess: false.
Codeapp/blog/page.tsx, With access rules
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>;
}const visiblePosts = await nextly.find({
collection: "posts",
overrideAccess: false,
user: { id: "user-123", role: "editor" },
});Compiled against nextly 0.0.2-alpha.82
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.
Sign-in for your team: email and password, sessions and API keys, stored in your own database.
CodeREST
GET /admin/api/collections/posts/entries?limit=10&sort=-createdAt
Authorization: Bearer <api key>
{
"items": [{ "id": "…", "title": "Release notes: November" }],
"meta": { "total": 1, "page": 1, "limit": 10, "totalPages": 1 }
}Written for nextly 0.0.2-alpha.82
Role-based permissions for each collection and action, plus field-level read and write rules in code, on a collection’s or single’s fields, fields inside field groups included.
Codecollections/posts.ts
import { defineCollection, relationship, text } from "nextly/config";
export const Posts = defineCollection({
slug: "posts",
fields: [
text({ name: "title" }),
relationship({ name: "author", relationTo: "users" }),
],
access: {
read: true,
// Narrowed: the role's update-posts, and not while a content freeze is on.
update: () => process.env.CONTENT_FREEZE !== "on",
},
});Hooks in code run before and after a change, a read or a delete.
Codecollections/posts.ts
hooks: {
beforeChange: [
async ({ data, operation, collection, user, context, req }) => {
if (operation === "create" && !data.slug) {
return { ...data, slug: slugify(data.title) };
}
return data;
},
],
afterChange: [
async ({ data, req }) => {
// Use req.nextly for the Direct API inside hooks
await req?.nextly?.create({
collection: "activity-logs",
data: { action: "post_updated", postId: data.id },
});
},
],
}Signed webhooks for content, media, user and form events, with retries, a delivery log, redelivery and secret rotation.
Background jobs, run by calling one endpoint from your scheduler.
Codejobs/send-digest.ts, nextly.config.ts, Your scheduler, Webhook signature
import { defineJob } from "nextly";
export const sendDigest = defineJob({
slug: "send-digest",
handler: async (input, context) => {
// `input` is the payload the job was enqueued with. `context` is what the
// runner tells the handler about the run it is in.
},
});import { defineConfig } from "nextly";
import { sendDigest } from "./jobs/send-digest";
export default defineConfig({
jobs: [sendDigest],
});POST /admin/api/jobs/run
Authorization: Bearer $NEXTLY_DRAIN_SECRETkey = base64_decode(secret without its "whsec_" prefix)
signedContent = "<id>.<timestamp>.<rawBody>"
signature = base64(HMAC_SHA256(key, signedContent))From docs/jobs/index.mdx · v0.0.2-alpha.82
From docs/jobs/index.mdx · v0.0.2-alpha.82
An alpha plugin SDK for schema, services, routes, admin UI and permissions. Parts are marked experimental; pin exact versions.
Dashboard widgets in the admin; plugins can add their own, an experimental part of the plugin SDK. The SEO plugin adds an SEO issues widget.
Codeplugins/example.ts
import { definePlugin } from "@nextlyhq/plugin-sdk";
export const myPlugin = definePlugin({
name: "@acme/nextly-plugin-example",
version: "1.0.0",
nextly: ">=0.0.2-alpha.67",
contributes: {
collections: [MyCollection], // merged automatically by the pipeline
},
setup(config) {
return { ...config }; // escape hatch for advanced config transforms
},
});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] });Compiled against 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
- Runs in
- Your own Next.js app, self-hosted
- 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
- APIs
- The Direct API and REST
- Plugin SDK
@nextlyhq/plugin-sdk, alpha
Not today
Where it stops
- Visual Schema Builder collections
- A collection made in the Visual Schema Builder is stored in your database, with no TypeScript file written for it, and gets no generated types. 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
- The plugin SDK
- Alpha plugin SDK. The
@publicsurface becomes semver-protected at 1.0; until then, pin exact versions. Docs - Database versions
- PostgreSQL 15 or later, MySQL 8 or later, SQLite 3.38 or later for local work. Docs
Nextly is in alpha. APIs may change before 1.0. Pin exact versions in production.
Questions
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.
Are my collections files in my repository?
Collections you define in code are files in your repository.
A collection made in the Visual Schema Builder is stored in your database, with no TypeScript file written for it, and gets no generated types.
Does Nextly write TypeScript types?
Typed, code-defined schemas and APIs: nextly generate:types writes types for the collections, singles and field groups in your config.
Does Nextly have a GraphQL API?
No. Nextly offers REST and the Direct API.
Can my app’s customers sign in with Nextly?
No. Sign-in is for your team. It is not sign-in for site visitors or customers.
Is Nextly free?
Nextly is MIT licensed and self-hosted.
MIT today, and no decision yet about paid offerings.
Can a coding agent set it up?
Every new Nextly project ships with an AGENTS.md and CLAUDE.md written for coding agents.