Next.js Headless CMS in One Line: The Fastest Way to Get Started

How to Get Headless CMS in Next.js with One Line!.jpeg
By Anmol Baranwal
Read time 6 min
Posted on 21 Mar 2025

Over the years, developers have realized the power of Headless CMS.

Using a solid CMS with frameworks like Next.js can make a lot of difference if you manage a lot of content.

While big names dominate the space, today we will explore BCMS and how to use it with Next.js. Plus, there are some starter templates to get you started.

Let's jump in.

Next.js headless CMS: What is covered?

In a nutshell, I will cover these topics in detail.

  • What is BCMS and why should you use it?

  • A step-by-step guide on how to get started with BCMS and Next.js.

  • Starter templates you can use.

What is BCMS and why should you use it?

BCMS is one of the underrated options as a headless CMS for building Next.js projects. It even provides flexible content modeling for other tech stacks including Astro, Gatsby.js, Nuxt.js, and Svelte.

You also get:

✅ Option for Global CDN.

✅ Component-based content modeling.

✅ Flexible content for multilingual sites.

✅ 10+ input options with detailed permissions.

You can do all sorts of stuff like handling forms, HR tools, sending emails, and custom reporting, all through BCMS using webhooks, functions, and cron jobs.

Inside BCMS

Why is Headless CMS architecture important?

A headless CMS simply allows you to manage content in one place and deploy it on any digital channel.

In short, it's just any backend application, which is 100% built upon APIs. Headless means frontendless body which can be attached to any frontend or Head.

Headless vs Traditional

If you're interested in knowing more, you can check our Headless CMS guide and also the Headless VS traditional CMS comparison.

Why should you use BCMS as a Next.js headless CMS?

Many useful features make BCMS worth it. Let's explore some of them.

✅ BCMS lets you store content in flexible inputs like dropdowns, files, numbers, and rich text, all built to work smoothly with Next.js applications.

store content in flexible inputs

✅ You can easily upload and manage any media in your Next.js project using BCMS's organized folder system (much better than the others). Read the docs.

BCMS folders
media in dashboard

✅ You also get dynamic components for your blog or e-commerce site. They are called Widgets in BCMS which are reusable building blocks that are used inside of the entry's content area.

Read more: BCMS Widgets: Reusable structured content guide

BCMS widget example
BCMS widgets

✅ There is also the concept of Groups which helps you to define reusable content structures, like author profiles or addresses, to be easily queried in your Next.js application.

You can use them in templates, widgets or even inside other groups.

BCMS groups

✅ To write multilingual content in BCMS, all you need to do is just click add and choose from nearly 100 languages.

English is the default and can’t be deleted, but other languages can be removed which will also remove all associated data with that language.

multilingual content

✅ There is also the concept of entry which is like a single document or item created from a predefined template.

The template decides what details each entry should have. These details, called properties, appear in a section called meta. Every entry also has a content area where you can write text and add interactive elements.

For example, if you create a Blog template, you can set properties like author, category, tags, and publish date. Then, whenever you add a new blog post (entry), these fields will be ready to fill.

You can duplicate the entry, delete it, and even set the entry status to indicate when a blog post is ready for publishing. Read the docs to know more.

Screenshot 2025-03-20 at 15.23.37.png

All details about the features can be found on the Next CMS page.

By the way, BCMS is open source with hundreds of stars on GitHub. You can find jobs, plugins and more from the readme.

Now that you have understood the unique concepts of BCMS, it's time to integrate BCMS with Next.js in the next section.

A step-by-step guide on how to get started with BCMS and Next.js

I will keep it simple and easy to understand even if you know nothing about the concepts. The first thing you need to install is the BCMS CLI, by running the following command.

npx @thebcms/cli create next

You will get the option to install the package and authenticate with BCMS in case you are not.

BCMS authantication

Once you log in, this is how the dashboard looks. It's available at app.thebcms.com/.

next js project

This sets up a new Next.js project and lets you pick a starter template based on your needs. You can also start from scratch, but to keep things simple, I will go with the blog starter.

This will set up a new nextjs project and it will give you options to select a starter project (based on your use case). There is also the option to start from scratch but for the sake of easiness, I'm selecting the blog starter.

blog starter

This is how the directory structure looks.

directory structure

In the root of your project, you will find bcms.config.cjs which is the main configuration file.

/** * @type {import('@thebcms/cli/config').BCMSConfig} */ module.exports = {     client: {         orgId: process.env.BCMS_ORG_ID,         instanceId: process.env.BCMS_INSTANCE_ID,         apiKey: {             id: process.env.BCMS_API_KEY_ID,             secret: process.env.BCMS_API_KEY_SECRET,         },     }, };

You will see the codebase pre-filled with some content, a .env file, and the necessary BCMS config.

In the dashboard, you can explore settings if you want to adjust functions, webhooks, dependencies, or environment variables.

settings dashboard

If you skip the starter template, you will need to create a new API Key under settings. You will get the option to allow necessary permissions once you create entries in the template. Don't worry if this sounds confusing, we will go over it soon.

API Key

You just need to install the dependencies and run the server using the following commands.

npm i npm run dev
npm i  npm run dev

The bcms --pull types --lng ts command starts BCMS CLI and pulls types from BCMS, saving them in /bcms/types/. These types work for both JavaScript and TypeScript.

Then, go to http://localhost:3000 to view the locally hosted version. Here's how it looks:

blog example

Congrats! 🎉

You have just integrated BCMS with Next.js, it's that simple!

Inside BCMS

Let's study more about what is involved. Head over to the BCMS dashboard and look for the Templates option in the sidebar.

blog template

You'll find a Blog template already created, with six properties: title, slug, date, description, cover_image, and category. Each property type is displayed as a badge (media, string, date).

blog template propeties

You can easily update any properties based on your use case.

properties updates

You can also create a template from scratch as shown.

create a template from scratch
add properties in a template

Once your template is ready, you will need to create entries for it. In this case, the Blog template already has four entries.

23 create entries.png

Each entry contains all the necessary details.

entry details

When creating a new entry, it will automatically include the required fields based on your template properties.

required fields

Similarly, for the cover image, just upload and select it accordingly.

26 Cover image.png

Once you refresh your local setup, the updates will appear.

cover image

The entry will be accessible at the route based on the slug URL you set in the dashboard.

slug url

Let's talk about the codebase.

First, the BCMS Client is initialized by creating bcms.ts inside the /src directory.

The main logic for fetching and displaying data from BCMS is in /src/app/page.tsx.

import React from 'react'; import { bcms } from './bcms-client'; import { BlogEntry, BlogEntryMetaItem } from '../../bcms/types/ts'; import { Metadata } from 'next'; import BlogCard from '@/components/blog/Card'; import Tag from '@/components/Tag'; const pageTitle = 'Blogs - Simple Blog'; export const metadata: Metadata = {     title: pageTitle,     openGraph: {         title: pageTitle,     },     twitter: {         title: pageTitle,     }, }; const HomePage: React.FC = async () => {     const blogs = (await bcms.entry.getAll('blog')) as BlogEntry[];     const items = blogs.map((blog) => {         return blog.meta.en as BlogEntryMetaItem;     });     return (         <div className="py-24 md:py-32">             <div className="container">                 <div className="flex flex-col gap-6 items-center text-center mb-20 md:mb-[120px]">                     <Tag size="lg">Hi, I’m Anmol 👋</Tag>                     <h1 className="text-4xl font-bold leading-none md:text-5xl">                         This is my blog                     </h1>                 </div>                 <div>                     <div className="grid grid-cols-1 gap-12 max-w-[1040px] mx-auto">                         {items.map((item, index) => {                             return <BlogCard key={index} blog={item} />;                         })}                     </div>                 </div>             </div>         </div>     ); }; export default HomePage;

The BlogPage route is defined in src/app/blog/[slug]/page.tsx.

Core components like ContentManager and Tag are inside the src/app/components directory.

It's simple to understand if you're aware of Next.js concepts.

3. Next js CMS open-source: Starter templates you can use

Learning the concepts is great, but having everything pre-built for different use cases is amazing. Here are some starter templates that might save you time and effort.

Personal website

Personal website

This is one of the most decent portfolio templates I've come across. It’s clean, unique and well-structured, with some really good sections.

Built with Next.js and BCMS, this template offers a great starting point for developers. Read this tutorial if you want to explore everything that is involved.

You can check the GitHub Repository and live demo.

✅ E-Commerce site

E-Commerce site

This is a next.js e-commerce template that comes with analytics, multilingual support, and more.

If you want a detailed breakdown including templates, groups, elements involve,d and the step-by-step process to make this, read this guide.

You can check the GitHub Repository and live demo.

✅ Podcast website

Podcast website

If you're planning to launch a podcast or audio-focused platform, this template is a great choice.

The official tutorial is for Gatsby, but the GitHub repository provides a Next.js version as well.

You can check the GitHub Repository and live demo.

✅ Job board

Job board

This is for people looking to build a job board or a career page for an organization.

The official tutorial is for Nuxt but you can find the GitHub repository that includes a Next.js version as well.

You can check the GitHub Repository and live demo.

BCMS provides 10+ templates across different frameworks like Astro, Gatsby, Next and Nuxt. You can find all the samples on the official BCMS repository and the official website at thebcms.com/starters.

Other available templates include an agency website, job board, conference starter, recipe website and more. Each of these websites is really unique which makes things a lot better.

BCMS: The best Next js headless CMS example

I'm aware that there are other decent options out there but BCMS has its own perks.

Underrated tools can sometimes be the best fit for your workflow. You can start finding it put by giving BCMS a chance for your new Next.js project.

It takes a minute to start using BCMS

Gradient

Join our Newsletter

Get all the latest BCMS updates, news and events.

You’re in!

The first mail will be in your inbox next Monday!
Until then, let’s connect on Discord as well:

Join BCMS community on Discord

By submitting this form you consent to us emailing you occasionally about our products and services. You can unsubscribe from emails at any time, and we will never pass your email to third parties.

Gradient