{"id":23412800,"url":"https://github.com/codingcodax/payloadcms-website","last_synced_at":"2025-10-24T23:07:43.500Z","repository":{"id":267349272,"uuid":"900971240","full_name":"codingcodax/payloadcms-website","owner":"codingcodax","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-09T20:03:39.000Z","size":1453,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T09:06:12.375Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://payloadcms-website-six.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codingcodax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-09T20:03:26.000Z","updated_at":"2024-12-09T20:10:59.000Z","dependencies_parsed_at":"2024-12-09T21:20:30.627Z","dependency_job_id":"3005ff9e-104d-47de-abc4-ca5b8ccdc00b","html_url":"https://github.com/codingcodax/payloadcms-website","commit_stats":null,"previous_names":["codingcodax/payloadcms-website"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingcodax%2Fpayloadcms-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingcodax%2Fpayloadcms-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingcodax%2Fpayloadcms-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingcodax%2Fpayloadcms-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codingcodax","download_url":"https://codeload.github.com/codingcodax/payloadcms-website/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974732,"owners_count":21026742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-22T18:18:38.027Z","updated_at":"2025-10-24T23:07:43.429Z","avatar_url":"https://github.com/codingcodax.png","language":"TypeScript","readme":"# Payload Website Template\n\nThis is the official [Payload Website Template](https://github.com/payloadcms/payload/blob/main/templates/website). Use it to power websites, blogs, or portfolios from small to enterprise. This repo includes a fully-working backend, enterprise-grade admin panel, and a beautifully designed, production-ready website.\n\nThis template is right for you if you are working on:\n\n- A personal or enterprise-grade website, blog, or portfolio\n- A content publishing platform with a fully featured publication workflow\n- Exploring the capabilities of Payload\n\nCore features:\n\n- [Pre-configured Payload Config](#how-it-works)\n- [Authentication](#users-authentication)\n- [Access Control](#access-control)\n- [Layout Builder](#layout-builder)\n- [Draft Preview](#draft-preview)\n- [Live Preview](#live-preview)\n- [Redirects](#redirects)\n- [SEO](#seo)\n- [Website](#website)\n\n## Quick Start\n\nTo spin up this example locally, follow these steps:\n\n### Clone\n\nIf you have not done so already, you need to have standalone copy of this repo on your machine. If you've already cloned this repo, skip to [Development](#development).\n\n#### Method 1 (recommended)\n\nGo to Payload Cloud and [clone this template](https://payloadcms.com/new/clone/website). This will create a new repository on your GitHub account with this template's code which you can then clone to your own machine.\n\n#### Method 2\n\nUse the `create-payload-app` CLI to clone this template directly to your machine:\n\n```bash\npnpx create-payload-app my-project -t website\n```\n\n#### Method 3\n\nUse the `git` CLI to clone this template directly to your machine:\n\n```bash\ngit clone -n --depth=1 --filter=tree:0 https://github.com/payloadcms/payload my-project \u0026\u0026 cd my-project \u0026\u0026 git sparse-checkout set --no-cone templates/website \u0026\u0026 git checkout \u0026\u0026 rm -rf .git \u0026\u0026 git init \u0026\u0026 git add . \u0026\u0026 git mv -f templates/website/{.,}* . \u0026\u0026 git add . \u0026\u0026 git commit -m \"Initial commit\"\n```\n\n### Development\n\n1. First [clone the repo](#clone) if you have not done so already\n1. `cd my-project \u0026\u0026 cp .env.example .env` to copy the example environment variables\n1. `pnpm install \u0026\u0026 pnpm dev` to install dependencies and start the dev server\n1. open `http://localhost:3000` to open the app in your browser\n\nThat'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](#production) once you're ready to build and serve your app, and [Deployment](#deployment) when you're ready to go live.\n\n## How it works\n\nThe Payload config is tailored specifically to the needs of most websites. It is pre-configured in the following ways:\n\n### Collections\n\nSee the [Collections](https://payloadcms.com/docs/configuration/collections) docs for details on how to extend this functionality.\n\n- #### Users (Authentication)\n\n  Users are auth-enabled collections that have access to the admin panel and unpublished content. See [Access Control](#access-control) for more details.\n\n  For additional help, see the official [Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth) or the [Authentication](https://payloadcms.com/docs/authentication/overview#authentication-overview) docs.\n\n- #### Posts\n\n  Posts are used to generated blog posts, news articles, or any other type of content that is published over time. All posts are layout builder enabled so you can generate unique layouts for each post using layout-building blocks, see [Layout Builder](#layout-builder) for more details. Posts are also draft-enabled so you can preview them before publishing them to your website, see [Draft Preview](#draft-preview) for more details.\n\n- #### Pages\n\n  All pages are layout builder enabled so you can generate unique layouts for each page using layout-building blocks, see [Layout Builder](#layout-builder) for more details. Pages are also draft-enabled so you can preview them before publishing them to your website, see [Draft Preview](#draft-preview) for more details.\n\n- #### Media\n\n  This is the uploads enabled collection used by pages, posts, and projects to contain media like images, videos, downloads, and other assets. It features pre-configured sizes, focal point and manual resizing to help you manage your pictures.\n\n- #### Categories\n\n  A taxonomy used to group posts together. Categories can be nested inside of one another, for example \"News \u003e Technology\". See the official [Payload Nested Docs Plugin](https://payloadcms.com/docs/plugins/nested-docs) for more details.\n\n### Globals\n\nSee the [Globals](https://payloadcms.com/docs/configuration/globals) docs for details on how to extend this functionality.\n\n- `Header`\n\n  The data required by the header on your front-end like nav links.\n\n- `Footer`\n\n  Same as above but for the footer of your site.\n\n## Access control\n\nBasic access control is setup to limit access to various content based based on publishing status.\n\n- `users`: Users can access the admin panel and create or edit content.\n- `posts`: Everyone can access published posts, but only users can create, update, or delete them.\n- `pages`: Everyone can access published pages, but only users can create, update, or delete them.\n\nFor more details on how to extend this functionality, see the [Payload Access Control](https://payloadcms.com/docs/access-control/overview#access-control) docs.\n\n## Layout Builder\n\nCreate unique page layouts for any type of content using a powerful layout builder. This template comes pre-configured with the following layout building blocks:\n\n- Hero\n- Content\n- Media\n- Call To Action\n- Archive\n\nEach block is fully designed and built into the front-end website that comes with this template. See [Website](#website) for more details.\n\n## Lexical editor\n\nA deep editorial experience that allows complete freedom to focus just on writing content without breaking out of the flow with support for Payload blocks, media, links and other features provided out of the box. See [Lexical](https://payloadcms.com/docs/lexical/overview) docs.\n\n## Draft Preview\n\nAll posts and pages are draft-enabled so you can preview them before publishing them to your website. To do this, these collections use [Versions](https://payloadcms.com/docs/configuration/collections#versions) with `drafts` set to `true`. This means that when you create a new post, project, or page, it will be saved as a draft and will not be visible on your website until you publish it. This also means that you can preview your draft before publishing it to your website. To do this, we automatically format a custom URL which redirects to your front-end to securely fetch the draft version of your content.\n\nSince the front-end of this template is statically generated, this also means that pages, posts, and projects will need to be regenerated as changes are made to published documents. To do this, we use an `afterChange` hook to regenerate the front-end when a document has changed and its `_status` is `published`.\n\nFor more details on how to extend this functionality, see the official [Draft Preview Example](https://github.com/payloadcms/payload/tree/examples/draft-preview).\n\n## Live preview\n\nIn addition to draft previews you can also enable live preview to view your end resulting page as you're editing content with full support for SSR rendering. See [Live preview docs](https://payloadcms.com/docs/live-preview/overview) for more details.\n\n## SEO\n\nThis template comes pre-configured with the official [Payload SEO Plugin](https://payloadcms.com/docs/plugins/seo) for complete SEO control from the admin panel. All SEO data is fully integrated into the front-end website that comes with this template. See [Website](#website) for more details.\n\n## Search\n\nThis template also pre-configured with the official [Payload Saerch Plugin](https://payloadcms.com/docs/plugins/search) to showcase how SSR search features can easily be implemented into Next.js with Payload. See [Website](#website) for more details.\n\n## Redirects\n\nIf you are migrating an existing site or moving content to a new URL, you can use the `redirects` collection to create a proper redirect from old URLs to new ones. This will ensure that proper request status codes are returned to search engines and that your users are not left with a broken link. This template comes pre-configured with the official [Payload Redirects Plugin](https://payloadcms.com/docs/plugins/redirects) for complete redirect control from the admin panel. All redirects are fully integrated into the front-end website that comes with this template. See [Website](#website) for more details.\n\n## Website\n\nThis template includes a beautifully designed, production-ready front-end built with the [Next.js App Router](https://nextjs.org), served right alongside your Payload app in a instance. This makes it so that you can deploy both your backend and website where you need it.\n\nCore features:\n\n- [Next.js App Router](https://nextjs.org)\n- [TypeScript](https://www.typescriptlang.org)\n- [React Hook Form](https://react-hook-form.com)\n- [Payload Admin Bar](https://github.com/payloadcms/payload-admin-bar)\n- [TailwindCSS styling](https://tailwindcss.com/)\n- [shadcn/ui components](https://ui.shadcn.com/)\n- User Accounts and Authentication\n- Fully featured blog\n- Publication workflow\n- Dark mode\n- Pre-made layout building blocks\n- SEO\n- Search\n- Redirects\n- Live preview\n\n### Cache\n\nAlthough Next.js includes a robust set of caching strategies out of the box, Payload Cloud proxies and caches all files through Cloudflare using the [Official Cloud Plugin](https://www.npmjs.com/package/@payloadcms/payload-cloud). This means that Next.js caching is not needed and is disabled by default. If you are hosting your app outside of Payload Cloud, you can easily reenable the Next.js caching mechanisms by removing the `no-store` directive from all fetch requests in `./src/app/_api` and then removing all instances of `export const dynamic = 'force-dynamic'` from pages files, such as `./src/app/(pages)/[slug]/page.tsx`. For more details, see the official [Next.js Caching Docs](https://nextjs.org/docs/app/building-your-application/caching).\n\n## Development\n\nTo spin up this example locally, follow the [Quick Start](#quick-start). Then [Seed](#seed) the database with a few pages, posts, and projects.\n\n### Docker\n\nAlternatively, you can use [Docker](https://www.docker.com) to spin up this template locally. To do so, follow these steps:\n\n1. Follow [steps 1 and 2 from above](#development), the docker-compose file will automatically use the `.env` file in your project root\n1. Next run `docker-compose up`\n1. Follow [steps 4 and 5 from above](#development) to login and create your first admin user\n\nThat's it! The Docker instance will help you get up and running quickly while also standardizing the development environment across your teams.\n\n### Seed\n\nTo seed the database with a few pages, posts, and projects you can click the 'seed database' link from the admin panel.\n\nThe seed script will also create a demo user for demonstration purposes only:\n\n- Demo Author\n  - Email: `demo-author@payloadcms.com`\n  - Password: `password`\n\n\u003e NOTICE: seeding the database is destructive because it drops your current database to populate a fresh one from the seed template. Only run this command if you are starting a new project or can afford to lose your current data.\n\n## Production\n\nTo run Payload in production, you need to build and start the Admin panel. To do so, follow these steps:\n\n1. Invoke the `next build` script by running `pnpm build` or `npm run build` in your project root. This creates a `.next` directory with a production-ready admin bundle.\n1. Finally run `pnpm start` or `npm run start` to run Node in production and serve Payload from the `.build` directory.\n1. When you're ready to go live, see Deployment below for more details.\n\n### Deploying to Payload Cloud\n\nThe easiest way to deploy your project is to use [Payload Cloud](https://payloadcms.com/new/import), a one-click hosting solution to deploy production-ready instances of your Payload apps directly from your GitHub repo.\n\n### Deploying to Vercel\n\nThis template can also be deployed to Vercel for free. You can get started by choosing the Vercel DB adapter during the setup of the template or by manually installing and configuring it:\n\n```bash\npnpm add @payloadcms/db-vercel-postgres\n```\n\n```ts\n// payload.config.ts\nimport { vercelPostgresAdapter } from '@payloadcms/db-vercel-postgres'\n\nexport default buildConfig({\n  // ...\n  db: vercelPostgresAdapter({\n    pool: {\n      connectionString: process.env.POSTGRES_URL || '',\n    },\n  }),\n  // ...\n```\n\nWe also support Vercel's blob storage:\n\n```bash\npnpm add @payloadcms/storage-vercel-blob\n```\n\n```ts\n// payload.config.ts\nimport { vercelBlobStorage } from '@payloadcms/storage-vercel-blob'\n\nexport default buildConfig({\n  // ...\n  plugins: [\n    vercelBlobStorage({\n      collections: {\n        [Media.slug]: true,\n      },\n      token: process.env.BLOB_READ_WRITE_TOKEN || '',\n    }),\n  ],\n  // ...\n```\n\nThere is also a simplified [one click deploy](https://github.com/payloadcms/payload/tree/templates/with-vercel-postgres) to Vercel should you need it.\n\n### Self-hosting\n\nBefore deploying your app, you need to:\n\n1. Ensure your app builds and serves in production. See [Production](#production) for more details.\n2. You can then deploy Payload as you would any other Node.js or Next.js application either directly on a VPS, DigitalOcean's Apps Platform, via Coolify or more. More guides coming soon.\n\nYou can also deploy your app manually, check out the [deployment documentation](https://payloadcms.com/docs/production/deployment) for full details.\n\n## Questions\n\nIf you have any issues or questions, reach out to us on [Discord](https://discord.com/invite/payload) or start a [GitHub discussion](https://github.com/payloadcms/payload/discussions).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingcodax%2Fpayloadcms-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodingcodax%2Fpayloadcms-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingcodax%2Fpayloadcms-website/lists"}