Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Should I use the Next + Payload setup?

default discord avatar
.wszlast year
3

Hi - i'm confused regarding the templates downloaded with

npx create-payload-app

blank

downloads the regular node express app


website

and

e-commerce

uses a serverless

payload

+

nextjs

setup


while the old node express setup has been archived

https://github.com/payloadcms/template-ecommerce

I understand the

website

and

e-commerce

templates contain the front-end


But as I'm still learning I want to keep payload and the front end separate to avoid additional confusion for now



So my question is : should I use the

nextjs

serverless setup?


I can still use it with a remote front-end right?



My aim is to host it on a VPS, not on vercel

  • discord user avatar
    seanzubrickas
    last year

    Hey

    @646271936460095508

    great question! If you simply want to use Payload as the backend and hook it up to your frontend of choice - I'd suggest you just start with the blank template. That will give you a compiled + packaged version of Payload.



    You can just run

    npx create-payload-app project-name -t blank

    and that will get you in a good spot to move forward. Give that a shot and let us know if you need anything else.

  • You could always boot up one of the other templates and just remove the nextjs code / only keep the payload stuff. The front ends rely on payload but payload does not rely on the frontend

  • default discord avatar
    .wszlast year

    thanks for the suggestions 👍


    I'm already running the blank standalone version which is working great


    As I'm slowly starting to grasp the advantages of using the next+payload template, I would like to migrate progressively by building the front end of from scratch, by using

    fetch()

    as usual and progressively implementing local api calls



    So I'd like to do what Jarrod suggested, but is there any downside to this method?


    I've read here and there on the discord that the next+payload template wasn't stable yet



    Also, can I make it work with the

    pages router

    instead of the

    app router

    ? I tried removing the

    /app dir

    inserting a single

    /pages/index.tsx

    hello world page but got overwhelmed with crashes and errors

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.