This repository contains a manually configured setup for a Next.js project integrated with Payload CMS. It includes multilingual support using next-intl, a MongoDB database connection, and Payload's rich text editor. The project is designed to serve as a starting point for building a CMS-powered web application.
To run this project, ensure you have the following installed:
- Node.js: Version 18 or higher
- npm: Version 8 or higher
- MongoDB: A running MongoDB instance
- Sharp: Ensure the
sharplibrary is installed correctly on your system (required for image processing)
Create a .env file in the root directory of the project and define the following variables:
PAYLOAD_SECRET: A secure string used as the Payload CMS secret.MONGODB_URI: The connection string for your MongoDB database.
- npm install
- npm run dev
- npm install
- npm run build
- npm run start
The project uses Payload CMS for managing content. Collections and configurations are defined in the app/(payload)/_collections directory.
The project supports multiple languages (en and it) using next-intl. Language files are located in lib/i18n/locales/{lang}.json.
REST endpoints are available under /api/[...slug].
Payload's Lexical Rich Text Editor is integrated for content editing.
Global styles are defined in app\(app)\_style\globals.css.