Medusa all in nextjs #3805
-
hi i'm looking for a way to set up medusa all in next.js, i want to run the admin, backend and storefront to be in one Next.js project. I'm new to medusa and i took a look at the backend starter and i couldn't find out how all of it got integrated if another person has done similar thing please tell me |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
For now, you need to run Medusa on its own server. If you want a unified app, your best bet is to create a monorepo with https://turbo.build/repo (by the creators of Nextjs). |
Beta Was this translation helpful? Give feedback.
-
@samyarkd – we are working on modularizing Medusa's architecture and making our product portable to modern environments like Next.js functions as small isolated packages e.g. the entire Cart API bundled in We are still in the early stages of this work, so you won't be able to do much now, unfortunately. Though, you can read about this approach in our recent blogpost covering our Modules SDK. I recommend joining our Discord to stay up to date and keep an eye out for our releases. Though, I am happy to hear your request, as it validates the direction of our current product priorities. |
Beta Was this translation helpful? Give feedback.
-
someone created a template for medusajs with T3 stack, you can try it https://github.com/georgwittberger/t3-commerce-template |
Beta Was this translation helpful? Give feedback.
To give you an idea of what this modularization would look like, consider the following code snippet:
I can't guarantee, that this is what it will look like, but it will be pretty close.