This article is my personal contribution to this thread on the community support channel of the official payload discord server: https://discord.com/channels/967097582721572934/1350714672411574323/1350714672411574323 about:
"How to use localApi from external project (import/export payload config)"
We discussed the following options:
Using this template as demo https://github.com/fusionary/turbo-payload
Someone pointed out the above solution was hard to implement using payload cloud as the hosting platform and instead suggested this other monorepo example: https://github.com/payloadcms/payload/tree/main/examples/remix and the following payload cloud deploy config: (here is is for reference)

After thoughts, we could have also explored a tRPC solution perhaps ? not covered here, but interested if anyone did this.
Now that initial context is setup, here I explored what seamed the cleanest solution to my problem: the turbo-payload template project. I had to refactor my multi-repo project in a monorepo, moving the payload config in a shared package.
I came from:
I aimed for a monorepo with:
packages/payload)apps/cms)apps/website)It was my first experience with monorepo, pnpm workspaces, turbo, and I have some difficulties migrating my project. I thought it might help someone else to keep track of all the things I had difficulties to understand, and the different issue I faced.