A Next.js storefront for gear and equipment rentals, built on top of a Medusa backend that uses the Medusa Booking System Plugin.
This README provides quick installation and setup instructions so you can have both the Medusa backend (with booking) and this starter running locally.
These steps assume a fresh environment. Adapt paths and names as needed for your setup.
Before installing the starter, make sure you have:
- Node.js v20+ (LTS) – recommended by the Medusa docs.
- Git
- PostgreSQL installed and running
- Package manager –
pnpm,yarn, ornpm
You should also be familiar with the official Medusa installation flow:
https://docs.medusajs.com/learn/installation
Follow the Medusa docs to create a new Medusa project (backend + admin).
From the directory where you keep your projects, run one of the following:
yarn dlx create-medusa-app@latest my-medusa-store
# or
npx create-medusa-app@latest my-medusa-store --use-yarnpnpm dlx create-medusa-app@latest my-medusa-store
# or
npx create-medusa-app@latest my-medusa-store --use-pnpmnpx create-medusa-app@latest my-medusa-storeReplace my-medusa-store with your desired project name.
When prompted, you can skip installing the Medusa Next.js starter storefront (this gear rental starter will be your storefront).
After installation, your Medusa app will live in a folder like:
/home/you/projects/my-medusa-storeFrom now on, run commands inside your Medusa project directory, e.g.:
cd /home/you/projects/my-medusa-storenpm install @rsc-labs/medusa-booking-system
# or
yarn add @rsc-labs/medusa-booking-system
# or
pnpm add @rsc-labs/medusa-booking-systemOpen medusa-config.ts in your Medusa backend and add the plugin to the plugins array:
import { defineConfig } from "@medusajs/framework";
export default defineConfig({
// ... your existing config
plugins: [
// ... your existing plugins/modules
{
resolve: "@rsc-labs/medusa-booking-system",
options: {},
},
],
});Generate migrations for the booking module:
npx medusa db:generate bookingModuleThen apply the migrations:
npx medusa db:migrateThe starter expects the Medusa backend to be available at:
http://localhost:9000
If you change the URL or port, you must update both:
- Medusa backend
medusa-config.tsHTTP/CORS configuration (see Medusa docs). - The storefront environment variables (see section 6. Configure the Gear Rental Starter).
You also need a publishable API key on the Medusa backend:
- Start the Medusa backend (see next section).
- Open the Medusa Admin at
http://localhost:9000/app. - Log in and create a Publishable API Key assigned to the sales channel used by this storefront.
- Copy the key value (starts with
pk_...).
You will use this value as NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY in the storefront .env.
From your Medusa backend directory (e.g. my-medusa-store):
npm run dev
# or
yarn dev
# or
pnpm devBy default this starts:
- Medusa server at
http://localhost:9000 - Medusa admin at
http://localhost:9000/app
Leave this process running while you use the gear rental starter.
Now set up this Next.js project as the storefront that talks to your Medusa backend.
From the directory where you keep your projects:
git clone https://github.com/RSC-Labs/medusa-gear-rental-starter medusa-gear-rental-starter
cd medusa-gear-rental-starterpnpm install
# or
yarn install
# or
npm installThis project includes a .env.example file. Use it as a base:
cp .env.example .envThen open .env and ensure the values match your Medusa backend:
MEDUSA_BACKEND_URL=http://localhost:9000
NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY=pk_your_publishable_key_hereMEDUSA_BACKEND_URLmust point to your running Medusa server.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEYmust be a valid publishable key from the Medusa admin.
Note:
next.config.tsis already configured to load images fromhttp://localhost:9000. If your backend runs elsewhere, updatenext.config.tsand.envaccordingly.
With the .env configured and dependencies installed, start the Next.js dev server:
npm run dev
# or
yarn dev
# or
pnpm devBy default this runs at:
- Storefront:
http://localhost:3000
Make sure your Medusa backend (with the booking plugin) is also running at the same time on http://localhost:9000.
If the starter cannot reach Medusa, you’ll see errors like:
"Unable to load catalog. Please check that the Medusa backend is running."
In that case, verify:
- The Medusa dev server is running on
http://localhost:9000. - CORS settings in
medusa-config.tsallow requests fromhttp://localhost:3000. MEDUSA_BACKEND_URLandNEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEYin.envare correct.
- Install Medusa using
create-medusa-appas per the docs. - Add the Booking System plugin to the Medusa backend: install the package, register it in
medusa-config.ts, generate and run DB migrations. - Start the Medusa backend on
http://localhost:9000. - Create a Publishable API Key in the Medusa admin.
- Clone this Gear Rental Starter, install dependencies, and set up
.envwith the backend URL and publishable key. - Run the Next.js dev server on
http://localhost:3000. - Open
http://localhost:3000and start testing the gear rental experience backed by your Medusa booking system.
For more details on Medusa installation and configuration, see the official docs:
https://docs.medusajs.com/learn/installation
