multisite & remix integration?

default discord avatar
J0rdan
8 months ago
12

Any quick pointers where to look out foe integrating remix with payload.



I know there is a full example repro just wanted to get some quick feedback if somwthing like below is possible at the moment:



In the ideal world i would have:


1. Payload cms hosted on vps


2. Several small projects build in remix with integration of payload hosted on another vps.


3. Then certain routes would use payload to show the site content. Connecting them by site id or identifier.



1 central cms


Flexible way to assign me as admin and someone else as editor.



🙏

  • discord user avatar
    denolfe
    Payload Team
    8 months ago

    This is all possible if you configure your collections to have a relationship to

    siteId

    or similar, then query accordingly from each frontend



    Both of these links would be good for you to go over. Second one has a video.



    https://payloadcms.com/blog/build-your-own-rbac
    https://payloadcms.com/blog/access-control-overview
  • default discord avatar
    nonfungibletunji
    5 months ago

    What about remix integration, was it documented somewhere? @J0rdan

  • default discord avatar
    Eustachio
    5 months ago

    I'm working at the moment on a Remix app, I'm running payload and remix on the same linux server (Hetzner, similar to digital ocean), different folders and ports. I'm using the REST API to get the data from payload into remix. I haven't been able to integrate both in a way that I could use the payload local api. I could help you if this setup is what you're looking for.

  • default discord avatar
    J0rdan
    5 months ago

    Never looked at it i think there is example repro from thr team@if im right? Might need an update im not sure



    Im using chakra ui en some components to render my marketing / site hardcoded



    Im not in the position to dive deep into this atm but still would endorse and love to read about it. If one could integrate a central payload with custom components in chakrs then use some api or endpoint url in a renix app to losd rhe content from payload that would be amazing. Please share your efforts guys would be awesome 🙏



    Almost what i imagined the implementation look like anything you ran into? Had this benefits instead of hardcoding content with components into a site index route?

  • discord user avatar
    denolfe
    Payload Team
    5 months ago
  • default discord avatar
    dsod
    5 months ago

    Oh yeah, thanks @denolfe 🙂


    If you want to run multiple frontends on different server(s) than the payload instance, then the local api is not going to work. The project linked above is a monorepo with remix app, payload app and a express app. The express app serves both the remix and payload app, and passes the payload instance through remix context, which makes it available in to all loaders, actions and resource routes.

  • default discord avatar
    58bits
    5 months ago

    @dsod zomg - this is great. Exactly what we were looking for. I'm guessing using the local API would make showing previews a breeze as well.

  • default discord avatar
    dsod
    5 months ago

    Yeah I think so. Haven't gotten around to implementing this myself, but as long as payload returns the preview data, the dynamic page/blog route would simply show whatever Payload returned from the loader.

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.