- Nextjs 13
- React 18
- TypeScript
- Node 20 (use NVM to manage node versions)
- Payload CMS
- Framer Motion
- Lucide Icons
Here are the steps you need to follow to install the dependencies.
pnpm installSetup your environment variables with a database name and a password.
Now you just need to create the database with docker or use directly your local database. Thats up to you.
./start-database.shYou can start the project on the local server
pnpm run devIt’ll start the template on localhost:3000.
As Payload 3.0 has some conflicts with Next.js version 13.4.13 and higher, we need to properly initialize Payload before trying to access the local API.
import { getPayload } from 'payload'
import config from 'payload.config'
const payload = await getPayload({ config })-
The
pagesdirectory contains all the pages of the project with app routing, as each file in this directory corresponds to a page. -
The
componentsdirectory contains all the components used in the project. -
The
publicdirectory contains all the static files used in the project like images. -
The
collectionsdirectory defines the schemas for the collections that will be managed in the Paylode dashboard.- After creating a new collection, don't forget to add it to the
collectionsarray in thepayload.config.jsfile.
- After creating a new collection, don't forget to add it to the