Prebaked medusajs 2.0 monorepo (backend + postgres + redis + +storefront)
one-click deploy on railway!
Combine Medusa's modules for your commerce backend with the newest Next.js 14 features for a performant storefront.
This boilerplate is a monorepo consisting of snapshot of newly released medusajs 2.0 (preview) backend and storefront app created with npx create-medusa-app@preview
September 2024. Modified to be plug n' play deployable on railway.app!
Updated: to version 2.0.10
Please change the value of environtment variables: COOCKIE_SECRET
and JWT_SECRET
.
Video instructions: https://youtu.be/PPxenu7IjGM
- Install dependencies
npm i
oryarn
- Rename
.env.template
->.env
- To connect to your online database, from local; copy the
DATABASE_URL
value that have been auto generated on railway, and add to your.env
- postgres database (will be automatically generated if using railway template)
- redis (will be automatically generated if using railway template)
cd backend/
npm run build
or yarn build
will compile app.
npm run start
or yarn start
will start the backend server, needed for the storefront
npm run dev
or yarn dev
will start backend (and admin dasboard frontend) - in development mode
Video instructions: https://youtu.be/PPxenu7IjGM
intall dependencies npm i
or yarn
Rename .env.local.template
-> .env.local
- running backend
npm run start
- needed to fetch products data and more, to build nextjs pages.
cd storefront/
npm run build
or yarn build
will build the nextjs app - remember to start backend app prior to running this command.
npm run start
or yarn start
will serve the frontend web shop.
npm run dev
or yarn dev
will run on uncompiled code, and hot-reload as files saved with changes
- How to setup credit card payment with Stripe payment module: https://youtu.be/dcSOpIzc1Og
- https://funkyton.com/medusajs-2-0-is-finally-here/#succuessfully-deployed-whats-next