Getting Started
Prerequisites
- Node.js 18+ and pnpm
- MongoDB database (local or cloud)
- Git
Quick Start
To spin up this project locally, follow these steps:
Installation & Setup
-
Clone the repository (or fork it for easier updates in the future):
Note this is a private repo, to get access you need to buy the Payblocks addon from Shadcn Blocks
-
Install dependencies:
Terminal window corepack enablepnpm install -
Copy the environment variables:
Terminal window cp .env.example .env -
Set up your MongoDB database:
- Install MongoDB locally or use a hosted service such as Atlas MongoDB Cloud Account
- If you used a cloud host make sure you update your
.env
file with the connection string:Make sure to also include the database name in the connection URL (e.g.,MONGODB_URI=your_connection_stringpayload-template-website
as shown in.env.example
).
-
Start the development server:
Terminal window pnpm dev -
Visit your application:
- http://localhost:3000/admin - Open the admin panel in your browser. On first login, you will be asked to create an admin user.
-
Seed the database (optional):
- Click on the “Seed DB” button in the Admin panel home page to create some starter pages.
- This step is recommended for those not familiar with Payload CMS.
- If seeding was successfull, you will see some new content on the homepage http://localhost:3000/
- You can now visit the admin panel pages collection to edit the new demo pages http://localhost:3000/admin/collections/pages
-
Change all secrets (optional but recommended):
- Open your .env file and change all secrets. Create some random string for all these secrets:
PAYLOAD_SECRET
,PAYLOAD_PUBLIC_DRAFT_SECRET
,NEXT_PRIVATE_DRAFT_SECRET
,REVALIDATION_KEY
,NEXT_PRIVATE_REVALIDATION_KEY
,CRON_SECRET
- Open your .env file and change all secrets. Create some random string for all these secrets: