This is a Clone of the Payload CMS Website Template with an additional Collection of Products and settings for Resend as Form email service.
To spin up this example locally, follow these steps:
- Clone the repo:
git clone https://github.com/tarikkavaz/Payload-Boilerplate.git
- Copy the example environment variables:
cd Payload-Boilerplate && cp .env.example .env
- Install dependencies and start the dev server:
pnpm install && pnpm dev
-
Open the app in your browser:
That's it! Changes made in src
will be reflected in your app. Follow the on-screen instructions to login and create your first admin user.
Alternatively, you can use Docker to spin up this template locally. To do so, follow these steps:
-
Follow steps 1 and 2 from above, the docker-compose file will automatically use the
.env
file in your project root. -
Next run:
docker compose up
- 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.
To seed the database with a few pages, posts, and projects you can click the 'seed database' link from the admin panel.
The seed script will also create a demo user for demonstration purposes only:
- Demo Author
- Email:
[email protected]
- Password:
password
- Email:
NOTICE: seeding the database is destructive because it drops your current database to populate a fresh one from the seed template. Only run this command if you are starting a new project or can afford to lose your current data.
To run Payload in production, you need to build and start the Admin panel. To do so, follow these steps:
- Invoke the
next build
script by running:
pnpm build
- Finally run:
pnpm start
to run Node in production and serve Payload from the .build
directory.
When you're ready to go live, see Deployment below for more details.
See the Initial README file for more instructions.