rpuls / medusajs-2.0-for-railway-boilerplate

Monorepo including medusajs 2.0 backend and storefront
25 stars 32 forks source link

Medusa logo Railway logo

Prebaked medusajs 2.0 monorepo (backend + postgres + redis + storefront)
one-click deploy on railway!

Need help?
Step by step deploy guide, and video instructions

Combine Medusa's modules for your commerce backend with the newest Next.js 14 features for a performant storefront.

PRs welcome! Discord Chat Follow @medusajs

## About this boilerplate This boilerplate is a monorepo consisting of the officially released MedusaJS 2.0 backend and storefront application. It is a pre-configured, ready-to-deploy solution, modified for seamless deployment on [railway.app](https://railway.app?referralCode=-Yg50p). Updated: to `version 2.0.1` 🥳 ## Preconfigured 3rd party integrations - Resend email integration [setup video](https://youtu.be/pbdZm26YDpE?si=LQTHWeZMLD4w3Ahw) - special thanks to [aleciavogel](https://github.com/aleciavogel) for Resend notification service, and eact-email implementation! [README](backend/src/modules/email-notifications/README.md) - Stripe payment service: [setup video](https://youtu.be/dcSOpIzc1Og) # /backend ### local setup Video instructions: https://youtu.be/PPxenu7IjGM - Install dependencies using either: - `npm i` - `pnpm install` (now supported!) - Rename `.env.template` -> `.env` - To connect to your online database from your local machine, copy the `DATABASE_URL` value auto-generated on Railway and add it to your `.env` file. ### requirements - **postgres database** (will be automatically generated if using railway template) - **redis** (will be automatically generated if using railway template) ### commands `cd backend/` `npm run dev` or `pnpm dev` will start the backend (and admin dashboard frontend on `localhost:9000/app`) in development mode. `pnpm build && pnpm start` will compile the project and run from compiled source. This can be useful for reproducing issues on your cloud instance. # /storefront ### local setup Video instructions: https://youtu.be/PPxenu7IjGM Install dependencies `npm i` Rename `.env.local.template` -> `.env.local` ### requirements - A running backend on port 9000 is required to fetch product data and other information needed to build Next.js pages. ### commands `cd storefront/` `npm run dev` will run the storefront on uncompiled code, with hot-reloading as files are saved with changes. ## Useful resources - 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

A template by,
FUNKYTON logo