Aucune description

yusuf 173760e393 feat: update docker compose so it uses values from .env il y a 4 semaines
docs 2890a87a46 feat: add db:push script and api.hanoman.co.id to trusted origins il y a 1 mois
src ab7dff742a feat: change client collection's category il y a 1 mois
tests b2905e803f feat: add contact email feature il y a 2 mois
.dockerignore 7e38aaf58b feat: harden security and dockerized postgres setup il y a 1 mois
.env.example 13f132b9f9 feat: update cors * csrf il y a 1 mois
.gitignore 281ea3da04 chore: update gitignore il y a 1 mois
.npmrc 6bec8f8e90 feat: initial commit il y a 3 mois
.prettierrc.json 6bec8f8e90 feat: initial commit il y a 3 mois
.yarnrc 6bec8f8e90 feat: initial commit il y a 3 mois
AGENTS.md 6bec8f8e90 feat: initial commit il y a 3 mois
API_DOCUMENTATION.md ab7dff742a feat: change client collection's category il y a 1 mois
Dockerfile eb53a788cf chore: stabilize docker workflow for WSL2 and production-like builds il y a 1 mois
GALLERY_API_DOCUMENTATION.md 0a5c6226ca feat: added gallery collections il y a 3 mois
README.md b2905e803f feat: add contact email feature il y a 2 mois
TODO-PROD.txt 7d77ba54bf fix: seeding script error il y a 1 mois
docker-compose.yml 173760e393 feat: update docker compose so it uses values from .env il y a 4 semaines
eslint.config.mjs 6bec8f8e90 feat: initial commit il y a 3 mois
next.config.mjs eb53a788cf chore: stabilize docker workflow for WSL2 and production-like builds il y a 1 mois
package-lock.json b2905e803f feat: add contact email feature il y a 2 mois
package.json 2890a87a46 feat: add db:push script and api.hanoman.co.id to trusted origins il y a 1 mois
playwright.config.ts 4e589ddebd chores: change port to 3001 il y a 3 mois
pnpm-lock.yaml 515f723fb1 feat: author/posts/gallery seed, local media, Docker media mount il y a 1 mois
test.env 6bec8f8e90 feat: initial commit il y a 3 mois
tsconfig.json 6bec8f8e90 feat: initial commit il y a 3 mois
vitest.config.mts 6bec8f8e90 feat: initial commit il y a 3 mois
vitest.setup.ts 6bec8f8e90 feat: initial commit il y a 3 mois

README.md

Payload Blank Template

This template comes configured with the bare minimum to get started on anything you need.

Quick start

This template can be deployed directly from our Cloud hosting and it will setup MongoDB and cloud S3 object storage for media.

Quick Start - local setup

To spin up this template locally, follow these steps:

Clone

After you click the Deploy button above, you'll want to have standalone copy of this repo on your machine. If you've already cloned this repo, skip to Development.

Development

  1. First clone the repo if you have not done so already
  2. cd my-project && cp .env.example .env to copy the example environment variables. You'll need to add the MONGODB_URL from your Cloud project to your .env if you want to use S3 storage and the MongoDB database that was created for you.

  3. pnpm install && pnpm dev to install dependencies and start the dev server

  4. open http://localhost:3000 to 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. Then check out Production once you're ready to build and serve your app, and Deployment when you're ready to go live.

Docker (Optional)

If you prefer to use Docker for local development instead of a local MongoDB instance, the provided docker-compose.yml file can be used.

To do so, follow these steps:

  • Modify the MONGODB_URL in your .env file to mongodb://127.0.0.1/<dbname>
  • Modify the docker-compose.yml file's MONGODB_URL to match the above <dbname>
  • Run docker-compose up to start the database, optionally pass -d to run in the background.

How it works

The Payload config is tailored specifically to the needs of most websites. It is pre-configured in the following ways:

Collections

See the Collections docs for details on how to extend this functionality.

  • #### Users (Authentication)

Users are auth-enabled collections that have access to the admin panel.

For additional help, see the official Auth Example or the Authentication docs.

  • #### Media

This is the uploads enabled collection. It features pre-configured sizes, focal point and manual resizing to help you manage your pictures.

Docker

Alternatively, you can use Docker to spin up this template locally. To do so, follow these steps:

  1. Follow steps 1 and 2 from above, the docker-compose file will automatically use the .env file in your project root
  2. Next run docker-compose up
  3. 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.

Questions

If you have any issues or questions, reach out to us on Discord or start a GitHub discussion.

Contact Endpoint

This project exposes POST /api/contact for the frontend Contact Us form.

Required payload

  • name (string, required)
  • email (string, required, valid email format)
  • phone (string, optional)
  • message (string, required)

The endpoint trims all string fields and validates required values before sending an email to your internal team.

Environment variables

Set these variables to enable contact email delivery:

  • CONTACT_TO_EMAIL - destination email for incoming contact messages
  • FRONTEND_ORIGIN - allowed frontend origin for CORS (for cross-origin requests)
  • SMTP_HOST
  • SMTP_PORT
  • SMTP_SECURE (true or false)
  • SMTP_USER
  • SMTP_PASS
  • SMTP_FROM_EMAIL (optional, falls back to SMTP_USER)