{"id":41580,"library":"nextly","title":"Nextly","description":"Nextly is a headless CMS and app framework for Next.js, providing core functionality for database interaction, services, and APIs. It is currently in early alpha (v0.0.2-alpha.20) with rapid iteration, targeted at developers building content-driven Next.js applications. Key differentiators include tight Next.js integration, support for multiple database adapters (MySQL, SQLite, PostgreSQL via Drizzle), and TypeScript-first design. It requires Next.js ^14.0.0, ^15.0.0, or ^16.0.0 as a peer dependency, along with one of the database adapter packages. The library ships its own TypeScript types for a type-safe developer experience.","status":"active","version":"0.0.2-alpha.20","language":"javascript","source_language":"en","source_url":"https://github.com/nextlyhq/nextly","tags":["javascript","cms","nextjs","headless-cms","app-framework","framework","typescript","react","drizzle"],"install":[{"cmd":"npm install nextly","lang":"bash","label":"npm"},{"cmd":"yarn add nextly","lang":"bash","label":"yarn"},{"cmd":"pnpm add nextly","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; Nextly integrates directly with Next.js","package":"next","optional":false},{"reason":"Peer dependency; required MySQL adapter","package":"@nextlyhq/adapter-mysql","optional":true},{"reason":"Peer dependency; required SQLite adapter","package":"@nextlyhq/adapter-sqlite","optional":true},{"reason":"Peer dependency; required PostgreSQL adapter","package":"@nextlyhq/adapter-postgres","optional":true}],"imports":[{"note":"Named export, not default. Requires ESM.","wrong":"import Nextly from 'nextly'","symbol":"Nextly","correct":"import { Nextly } from 'nextly'"},{"note":"Named export; CommonJS require may work but not recommended.","wrong":"const defineConfig = require('nextly').defineConfig","symbol":"defineConfig","correct":"import { defineConfig } from 'nextly'"},{"note":"Named export for error handling.","symbol":"NextlyError","correct":"import { NextlyError } from 'nextly'"}],"quickstart":{"code":"import { Nextly } from 'nextly';\nimport { adapterPostgres } from '@nextlyhq/adapter-postgres';\n\nconst nextly = new Nextly({\n  adapter: adapterPostgres({\n    connectionString: process.env.DATABASE_URL ?? ''\n  })\n});\n\n// Define a content model\nexport const posts = nextly.define('post', {\n  schema: {\n    title: 'text',\n    content: 'text',\n    published: 'boolean'\n  }\n});\n\n// Create an API route handler\nexport async function GET(request: Request) {\n  const allPosts = await posts.findMany();\n  return new Response(JSON.stringify(allPosts), {\n    headers: { 'Content-Type': 'application/json' }\n  });\n}","lang":"typescript","description":"Initializes Nextly with a PostgreSQL adapter, defines a content model, and creates an API route to fetch all posts."},"warnings":[{"fix":"Pin to a specific alpha version and consult release notes before upgrading.","message":"API changes between alpha versions: schema definitions and adapter APIs may change without notice.","severity":"breaking","affected_versions":">=0.0.2-alpha.0 <0.1.0"},{"fix":"Pass options object as second argument to define().","message":"The 'define' method signature changed in v0.0.2-alpha.15: options object is now required.","severity":"deprecated","affected_versions":">=0.0.2-alpha.15"},{"fix":"Install one of @nextlyhq/adapter-mysql, @nextlyhq/adapter-sqlite, or @nextlyhq/adapter-postgres.","message":"Database adapters must be explicitly installed; Nextly does not include them by default.","severity":"gotcha","affected_versions":">=0.0.2-alpha.0"},{"fix":"Use Node.js 20 or later.","message":"Node.js version must be >=20.0.0; older versions will fail at runtime.","severity":"gotcha","affected_versions":">=0.0.2-alpha.0"},{"fix":"Set strict: false in tsconfig.json or use type assertions.","message":"TypeScript strict mode may cause type errors due to incomplete type definitions.","severity":"gotcha","affected_versions":">=0.0.2-alpha.0"}],"env_vars":null,"search_vec":"'14.0.0':64 '15.0.0':65 '16.0.0':67 'adapt':50,78 'along':72 'alpha':26 'api':20 'app':8,101 'app-framework':100 'applic':39 'build':34 'cms':6,95,99 'content':36 'content-driven':35 'core':13 'current':23 'databas':16,49,77 'depend':71 'design':60 'develop':33,92 'differenti':41 'driven':37 'drizzl':55,106 'earli':25 'experi':93 'first':59 'framework':9,102,103 'function':14 'headless':5,98 'headless-cm':97 'includ':42 'integr':45 'interact':17 'iter':30 'javascript':94 'key':40 'librari':81 'multipl':48 'mysql':51 'next':1,2 'next.js':11,38,44,63 'nextj':96 'one':74 'packag':79 'peer':70 'postgresql':53 'provid':12 'rapid':29 'react':105 'requir':62 'safe':91 'servic':18 'ship':82 'sqlite':52 'support':46 'target':31 'tight':43 'type':86,90 'type-saf':89 'typescript':58,85,104 'typescript-first':57 'v0.0.2-alpha.20':27 'via':54","created_at":"2026-06-04T18:53:06.199873+00:00","updated_at":"2026-06-04T18:53:06.199873+00:00","problems":[{"fix":"npm install @nextlyhq/adapter-postgres","cause":"The database adapter package is not installed.","error":"Cannot find module '@nextlyhq/adapter-postgres'"},{"fix":"Check import: import { Nextly } from 'nextly'. Then const posts = nextly.define('post', {...}).","cause":"Using an older version where define was a property of the return value of another method, or the import is incorrect.","error":"TypeError: nextly.define is not a function"},{"fix":"Use import statements and set 'type': 'module' in package.json, or use .mjs file extension.","cause":"Using CommonJS require() with an ESM-only module.","error":"Dynamic require of 'nextly' is not supported"},{"fix":"Ensure the adapter package is installed and imported correctly: import { adapterPostgres } from '@nextlyhq/adapter-postgres'.","cause":"TypeScript expects the adapter to be provided when instantiating Nextly; missing or wrong import.","error":"Property 'adapter' is missing in type 'typeof import'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://nextlyhq.com","github":"https://github.com/nextlyhq/nextly","docs":null,"changelog":null,"pypi":null,"npm":"nextly","openapi_spec":null,"status_page":null,"smithery":null,"categories":["cms"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}