Skip to content

AlessioGr/public-demo

 
 

Repository files navigation

Payload Public Demo

This is the code that powers the official public demo of Payload CMS.

It's deployed at https://demo.payloadcms.com. Go check it out!

Features shown

This demo showcases many of the powerful features that Payload is capable, including:

  1. Collections and Globals
  2. Use of Payload's Local Node API to seed and reset initial demo data each time the app starts
  3. Access Control to restrict who can do what to the public demo's data
  4. Versions and Drafts functionality
  5. A great pattern for how to create reusable fields that can be used and re-used easily
  6. Field-based localization
  7. Many advanced field types, including the relationship, blocks, array, and many more
  8. The official Payload SEO plugin
  9. The official Payload Form Builder plugin
  10. The official Payload Nested Docs plugin
  11. Custom React admin panel components
  12. Auto-generated TypeScript types

Each time you fire up the server—either in development or production, this demo will clear out your database and populate it with new records. If you're planning to use this for production purposes, make sure you remove the included code that's responsible for this, otherwise you will lose your data each time you restart your server!

Running locally

You can clone this repo to your own computer and play around super easily.

To do so, you'll need the following software:

  • Yarn or NPM
  • NodeJS version 10+
  • A Mongo Database - IMPORTANT: you need to either have MongoDB running locally, or have signed up for a free MongoDB Atlas server in order to test this repo locally.
Local installation steps:

1. Clone the repo by running the following command at your terminal:

git clone [email protected]:payloadcms/public-demo.git

Navigate to folder and install dependencies

Type cd ./public-demo and then yarn or npm install --legacy-peer-deps to add all required dependencies.

Duplicate the example .env file and fill in your own values

Type cp .env.example .env in your terminal to make a copy of the example .env file, and then edit that file to fill in your own values.

Typically, the only line that you'll need to change within your new .env for local development is the MONGO_URL value. If you have MongoDB running locally, then you can use the example connection string, but if you are using Mongo Atlas or similar, you'll want to fill this value in with your own connection string.

Fire up the development server

Finally, type yarn dev to start up the server and see it in action!

About

The official public demo for Payload

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.8%
  • SCSS 1.1%
  • JavaScript 0.1%