Go to file
tobias 82d5beaa90
All checks were successful
continuous-integration/drone/push Build is passing
Update README
2024-06-19 18:47:56 +02:00
.idea chore: improve editor configuration 2024-03-08 00:11:00 -05:00
.vscode chore: improve editor configuration 2024-03-08 00:11:00 -05:00
public chore: restyles start page (#114) 2024-04-15 16:19:08 -04:00
src chore: upgrade from beta.36 to beta.40 and remove dotenv dependency, which is now unnecessary 2024-06-03 22:55:55 -04:00
.dockerignore Optimize docker image size 2024-06-14 22:35:28 +02:00
.drone.yml Revert domain name 2024-06-17 23:37:01 +02:00
.env.local.example chore: rename .env.example to .env.local.example, discourage use of yarn v1 in the docs 2024-06-03 23:00:11 -04:00
.eslintrc.json Initial commit from Create Next App 2024-02-27 14:10:20 -05:00
.gitignore chore: improve .gitignore 2024-03-08 15:35:01 -05:00
.prettierrc.json chore: add .prettierrc.json 2024-03-10 01:46:54 -05:00
CHANGELOG.md chore: adds static files to public folder 2024-03-10 18:07:02 -04:00
docker-compose.prod.yml Correct uploads path 2024-06-19 16:31:27 +02:00
docker-compose.yml Re-add payload secret 2024-06-17 15:49:03 +02:00
docker-entrypoint.sh Add urlencoding for mongo_password 2024-06-19 12:08:41 +02:00
Dockerfile Add entrypoint to image, use it 2024-06-18 15:44:18 -06:00
next.config.mjs Get env variables correctly 2024-06-18 08:30:03 +02:00
package.json Optimize docker image size 2024-06-14 22:35:28 +02:00
payload-types.ts chore: upgrade payload packages 2024-05-10 09:18:12 -04:00
payload.config.ts chore: upgrade payload packages 2024-05-10 09:18:12 -04:00
pnpm-lock.yaml Optimize docker image size 2024-06-14 22:35:28 +02:00
README.md Update README 2024-06-19 18:47:56 +02:00
start-database.sh feat(postgres): add postgres docker script 2024-04-09 15:45:41 +03:00
tsconfig.json chore: bumps next canary 2024-04-27 12:03:41 -04:00
yarn.lock Create yarnlock 2024-06-16 16:39:12 +02:00

Nextload is a fork of the official payload 3 demo

Get started with nextload

Prerequisites:

node Using a version manager for installing node is recommended, see nvm or fnm

pnpm When node is installed, run corepack enable pnpm to install pnpm

docker Using the get docker script, run:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

Start developing

  1. Copy the environment variables

cp .env.local.example .env.example

  1. Install dependencies

pnpm install

  1. Run dev script

pnpm dev

Technical details

The app folder You'll see that Payload requires a few files to be present in your /app folder. There are files for the admin UI as well as files for all route handlers. We've consolidated all admin views into a single page.tsx and consolidated most of the REST endpoints into a single route.ts file for simplicity, but also for development performance. With this pattern, you only have to compile the admin UI / REST API / GraphQL API a single time - and from there, it will be lightning-fast.

The next.config.js withPayload function You'll see in the Next.js config that we have a withPayload function installed. This function is required for Payload to operate, and it ensures compatibility with packages that Payload needs such as drizzle-kit, sharp, pino, and mongodb.

Using a TypeScript alias to point to your Payload config In the tsconfig.json within this repo, you'll see that we have paths set up to point @payload-config to the Payload config, which is located in the root. You can put your config wherever you want. By default, the page.tsx files and route.ts files within the /app folder use this alias. In the future, we might make it optional to use paths - and by default, we might just hard-code relative path imports to the config. We would like to hear your feedback on this part. What do you prefer? Use paths or just use relative imports?