payloadcms-website

Block-based website builder on Payload 3.0 with Next.js, Tailwind CSS and the form builder plugin

payloadcms-website preview

Overview

Summary generated from the README

A website template built with Payload 3.0 beta, Next.js, React and Tailwind CSS. Pages are assembled in the admin panel from pre-built blocks, and custom blocks can be added. It uses MongoDB and needs a database URI and a Payload secret. Docker and one-click Vercel deployment are supported.

Features

  • Pages collection with a drag-and-drop block layout
  • Pre-built content blocks that can be extended with custom ones
  • Form builder plugin with forms added as page blocks and submissions stored in the admin
  • Media collection for image uploads
  • Users collection where the first user becomes admin
  • Docker compose setup and Vercel deploy button

Good for

  • Launching a marketing or company website managed by non-developers through blocks
  • Starting a Payload 3.0 site that needs contact or lead forms with stored submissions

From the author

A blank template to get started with Payload 3.0

Get started

This repository is a GitHub template: create your own copy of it in one click.

Create a repository from this template

README

Contributors Forks Stargazers Issues MIT License LinkedIn LinkedIn


Payload CMS website template

A website builder template built with Payloadcms 3.0

View Tutorial »

View Demo · Report Bug · Request Feature · Contact Us

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Structure
  5. Contributing
  6. License
  7. Contact

About The Project

Build your website with ease using our website builder template. Our block-based system makes making your website as easy as dragging and dropping a couple of blocks!


(back to top)

Built With

  • Next
  • React
  • Tailwindcss
  • Payload

(back to top)

Getting Started

To get a local copy of our template up and running follow these simple steps.

Prerequisites

  • npm
    npm install npm@latest -g
    
  • setup environment variables in your project's root directory
    MONGO_DATABASE_URI=<your-database-url>
    PAYLOAD_SECRET=<your-payload-secret>
    

Deploy to vercel

Deploy with Vercel

Installation

To spin up the project locally, follow these steps:

  1. First clone the repo
  2. Then cd YOUR_PROJECT_REPO
  3. Next yarn && yarn dev (or docker-compose up, see Docker)
  4. Now open http://localhost:3000/admin to access the admin panel
  5. Create your first admin user using the form on the page

That's it! Changes made in ./src will be reflected in your app.

(back to top)

Docker

Alternatively, you can use Docker to spin up this project locally. To do so, follow these steps:

  1. Follow steps 1 and 2 from above, the docker-compose file will automatically use the .env file in your project root
  2. Next run docker-compose up
  3. Follow steps 4 and 5 from above to login and create your first admin user

That's it! The Docker instance will help you get up and running quickly while also standardizing the development environment across your teams.

Production

To run Payload in production, you need to build and serve the Admin panel. To do so, follow these steps:

  1. First invoke the payload build script by running yarn build or npm run build in your project root. This creates a ./build directory with a production-ready admin bundle.
  2. Then run yarn serve or npm run serve to run Node in production and serve Payload from the ./build directory.

Deployment

The easiest way to deploy your project is to use Payload Cloud, a one-click hosting solution to deploy production-ready instances of your Payload apps directly from your GitHub repo. You can also deploy your app manually, check out the deployment documentation for full details.

Usage

Manage your backend with the admin dashboard

Admin Dashboard Screen Shot

Build pages from your dashboard with layout and blocks from the pages collection.

Dashboard Frontend

Build your page with our pre-built blocks or create your own!

We leverage the powerful Form builder plugin to give you the best form creation and submission experience!


Simply create your form and add it as a block in your page. Form submissions will be sent straight to your dashboard!

Forms Form Submissions

What your forms will look like

(back to top)

Structure

This is the typical file structure of the project.

  src
  ├── access
  ├── app
  │   ├── (app)
  │   ├── (payload)
  │   │   ├── admin
  │   │   ├── api
  │   │   ├── Blocks
  │   │   └── fields
  │   ├── globals
  │   └── my-route
  ├── collections
  │   ├── Media
  │   ├── Pages
  │   └── Users
  ├── common
  │   ├── Blocks
  │   └── Components
  ├── utilities
  │── payload-types.ts
  └── payload.config.ts

payload.config.ts is the configuration file for the payload application. You can control the configuration for the entire application from here.

Whenever you create a collection or globals schema, you have to add it to the config file and generate types for it using the command:

yarn generate:types

This will generate payload-types.ts file in your root directory.

  • The app directory inside your /src folder contains all the backend files for payload collections, globals and your api end points.
  • Collections and Globals are schemas that are defined which will be converted into a database collection of your choice.
  • You can configure things like access control, fields shown in admin panel, custom hooks and so on from your collection configuration file.
  • Globals are similar to collections, but they contain app-wide data that your site or app might rely on like header and footer settings.

Collections:

  • Users - This collection will be automatically generated when you setup the application. First time login will automatically make you an admin user.
  • Media - This collection lets you upload photos that you can use anywhere in your application.
  • Pages - The pages collection will let you add and manage your pages. You can build your page with blocks that are pre-built by us or you can make your own blocks!

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

See the open issues for a full list of proposed features (and known issues).

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Open Ocean Technologies - @cornerrrhq - [email protected]

Project Link: https://github.com/OpenOceanHQ/payloadcms-website-template

(back to top)

Claim this template

More Landing pages templates

payload-site-starter screenshot

payload-site-starter

Next.js website template with a layout builder, blog, search, SEO and live preview on Postgres

20
v?
Next.js
Updated 1 years ago
payload-cms screenshot

payload-cms

Payload 3 and Next.js website starter with a layout builder, live preview, SEO tools and Postgres

80
v3
Next.js
Updated 6 days ago
dd-starter screenshot

dd-starter

Payload starter with Puck visual page editing, a page tree and Better Auth sign-in on Next.js and Postgres

37
v3
Next.js
Updated 1 months ago