Extend npx create-payload-app with a frontend --template and/or --example #1466
Replies: 2 comments
-
All great suggestions @3m1l1a . We have work underway to get Payload into the Next.js examples repo. That PR should be opened shortly. Regarding additional functionality, we've discussed internally about having a differentiation between starters and full demos. I like your idea of optionally adding a front-end. However, I have concerns of how maintainable that would be in the long-term. In the meantime, we've open-sourced create-payload-app code here: https://github.com/payloadcms/create-payload-app. |
Beta Was this translation helpful? Give feedback.
-
Great to hear that Payload is on it's way into Next,js example repo. I do share your concerns @denolfe . It might be difficult to maintain in the long-term, there is a lot of frameworks and themes. Payload should probably stay with one framework. Some sort of community plugin system would probably be better for the rest. My main idea with the front-end was to have something like WordPress has with their official yearly themes. Which would add this alternatives to create-payload-app:
Wonderful! I'will start scaffolding Astro's official themes and think more about a sustainable sulution. |
Beta Was this translation helpful? Give feedback.
-
Question
Where is the source code for create-payload-app?
I'm interested in extending the scaffolding tool to include frontend frameworks and themes.
Frameworks
Next.js
create-next-app
Next do have official examples for connecting a headless cms, but not Payload yet.
official Next.js examples
Payload's nextjs-custom-server boilerplate
Astro.build
yarn create astro
Official Astro.build themes
Astro guide Payload CMS
Lambdo Labs Payload CMS and Astro template
Idea and request
Feature: extended help output with short flags and options
Feature: Scaffold a blank Payload and Nextjs typescript app
Welcome to Payload. Let's create a project!
✔ Choose project name › next-blank
✔ Choose project template › blank
✔ Choose project framework › nextjs
✔ Choose language › ts
✔ Enter MongoDB connection … mongodb://localhost/next-blank
Creating a new Payload app in /home/3m1l1a/dev/create-payload-app/next-blank
✔ Project directory created
✔ Dependencies installed
✔ .env file created
✔ Payload project successfully created
★ Launch Application:
- cd ./next-blank
-
yarn dev
ordocker-compose up
★ View Application:
- Next.js: http://localhost:3000
- Payload: http://localhost:3000/admin
- Mongo Express: http://localhost:8081
★ Read Documentation:
- Getting Started
- Configuration
Beta Was this translation helpful? Give feedback.
All reactions