Giter VIP home page Giter VIP logo

philparzer / builder-next-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 1.0 80 KB

Drag+Drop CMS Template with ⚑ nextjs πŸ‘·β€β™€οΈ builder.io πŸ’… tailwind 🌐 localization

TypeScript 90.49% JavaScript 8.73% CSS 0.78%
builder next nextjs cms cms-framework content-management-system i18n internationalization localization marketing-page next13 nextjs-starter nextjs-template tailwind tailwind-css tailwindcss template visual drag-and-drop page-builder

builder-next-boilerplate's Introduction

Warning

UPDATE: Localization is now a paid feature in Builder.io so this repo doesn't really work anymore if you don't choose one of Builder's paid plans :( I personally won't be using Builder.io for future client projects because they are not transparent regarding pricing changes and broke my personal site in prod without informing me.

Next + Builder + Tailwind

CMS boilerplate repos suck. This one doesn't.

Features

🦺 Typescript

⚑ Next13 (no app dir yet)

πŸ‘·β€β™€οΈ β€ŠBuilderβ€Š.io

πŸ’… TailwindCSS

🌐 Localization


Getting Started

Prerequisites

  1. Create a Builder.io account and get your API key (in your space under Account)
  2. You most likely want to disable Builder's built-in components (this step ensures editors only use the components you've built)
  3. Get a primer on how Builder works over in their Docs

Folder Structure

Get familiar with the repo's structure before you start building your site. I added some comments to help you understand what's going on.

πŸ“¦ your-project
┣ πŸ“‚ node_modules
┣ πŸ“‚ public
┣ πŸ“‚ components
┃ ┣ πŸ“‚ builder I recommend separating builder components from other components
┃ ┃ β”— πŸ“„ Card.tsx example builder component
┃ β”— πŸ“„ LanguageSwitch.tsx example language switch component
┣ πŸ“‚ styles
┃ β”— πŸ“„ globals.css
┣ πŸ“‚ pages
┃ ┣ πŸ“„ _app.tsx used to import styles, you probably won't need to edit this
┃ β”— πŸ“„ [[...page]].tsx catch-all route for all pages, including index
┣ πŸ“„ builder.config.ts register your components here
┣ πŸ“„ .eslintrc.json
┣ πŸ“„ postcss.config.js
┣ πŸ“„ tailwind.config.js
┣ πŸ“„ tsconfig.json
┣ πŸ“„.gitignore
┣ πŸ“„.env.local.example reference for your .env.local file, don't fill out this file
┣ πŸ“„ READMEβ€Š.md
┣ πŸ“„ next.config.js update locales here
┣ πŸ“„ package-lock.json
β”— πŸ“„ package.json

Local Dev Setup

  1. Create a .env.local in the root of the project and add your API key as specified in .env.example

Warning Don't fill out env.local.example

  1. Specify the locals you want to use in next.config.js (see Next.js docs for more info)
  2. Run the following commands
npm i 
npm run dev

Builder Intro

  1. In builder, create a new page and drag and drop the 'Card' component onto the page
  2. Localize some of the card's content to test the i18n setup

Development Wokflow

  1. Create a new react component in /components
  2. Update builder.config.ts to include the new component (see Builder docs for more info)
  3. If everything is working correctly, you should be able to see the component in the Builder UI and add it to a page

Deployment

  1. I recommend using Vercel for deployment
  2. Add the environment variable to your project before deploying
  3. Deploy!
  4. When you're done, update the preview URL in Builder (in your space settings) to point to your deployment URL

TODOs, Issues, and Contributing

Please feel free to contribute to this repo!

  • Add fetch example for CMS Data models
  • Add example on how to use Section models (prob commented out code block on how to use section for home)
  • Remove any in page
  • Look into loc pricing plan changes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.