LinkbCMSLinkbCMS

Quick Start

Getting started with Linkbcms

hero

Introduction

Linkbcms is a headless CMS built with NextJS in mind, designed to be fast, flexible, and composes seamlessly into Next.js App Router.

Linkbcms Core

Type-safe configuration. Admin UI.

Linkbcms CLI

A command line tool to generate schema and DB migration.

Features

  • Type-safe content: Automatically generate TypeScript types from your CMS schema
  • Seamless integration: Connect to popular headless CMS platforms with minimal configuration
  • CLI tools: Automate content setup and deployment
  • Optimized rendering: Fast page loads with efficient data fetching strategies

Automatic Installation

A minimum version of Node.js 18 required, note that Node.js 23.1 might have problems with Next.js production build.

npx @linkbcms/cli@latest create-app my-app

It will ask you:

  • DATABASE_TYPE: the type of the database to use. (default: "supabase")
  • DATABASE_URL: the connection string for the database. (optional, can be set later)

A new Linkbcms app should be initialized. Now you can start hacking!

From Existing Codebase?

You can follow the Manual Installation guide to get started.

Happy Hacking!

Update the CMS schema and content.

cms.config.tsx
import { fields, defineConfig } from '@linkbcms/core';
 
export default defineConfig({
  collections: {
    settings: fields.singleton({
      name: 'Settings',
      schema: {
        appName: fields.text({
          name: 'appName',
          label: 'App Name',
        }),
      },
    }),
  }
});

Open terminal and run the CLI to generate the schema using Drizzle.

npx @linkbcms/cli db gen-schema

After generating the schema, you need to run the following command to generate the DB migration and execute it.

npx @linkbcms/cli db migrate

Run the app in development mode and see http://localhost:3000/cms.

npm run dev

Explore

In the project, you can see:

  • database/: Folder for the database schema and migration.
  • cms.config.tsx: The CMS configuration.
RouteDescription
app/cms/[[...params]]This is the route for the CMS.
app/api/linkb/All the API routes will be generated here.

Learn More

New to here? Don't worry, we are welcome for your questions.

If you find anything confusing, please give your feedback on Github Discussion!

On this page