DesignMint Medusa Monorepo Setup
This repository contains two separate projects:
admin/
- Medusa Admin Dashboardstorefront/
- Frontend Storefront UI
🚀 Quick Start
Option 1: Manual Setup
Prerequisites
Node.js (v18 or later)
PostgreSQL database server
Redis server
🧰 1. Environment Setup
Copy environment template files:
Update the
.env
files with your PostgreSQL and Redis connection details:In
admin/.env
:
🧰 2. Initial Setup
Run this once to install dependencies and build both projects:
This command runs:
npm install --legacy-peer-deps
in bothadmin/
andstorefront/
Builds both projects
Runs database migrations for the admin
3. Running the Projects
Open two separate terminals:
📦 Terminal 1: Start Admin
Admin will be available at: http://localhost:9000
⚠️ Important: After the admin backend is running, you need to:
Go to Settings in the admin panel
Copy the publishable API key
Update the
NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY
instorefront/.env
🛍️ Terminal 2: Start Storefront
Storefront will be available at: http://localhost:8000 (Port may vary depending on config.)
Note: If this setup seems too complex, consider using Option 2 (Docker setup) below which handles all dependencies automatically.
Option 2: Docker Setup
Docker provides an easier way to set up the entire project with all dependencies.
Prerequisites
🐳 1. Docker Setup
Run this command to start all services with Docker:
This will:
Set up PostgreSQL database
Set up Redis
Build and start the Medusa admin backend
Build and start the storefront
2. Accessing the Services
Once Docker Compose has finished startup:
Admin Dashboard: http://localhost:9000
Storefront: http://localhost:8000
PostgreSQL: Available on
localhost:5432
User:
postgres
Password:
postgres
Database:
medusa-docker
Redis: Available on
localhost:6379
3. Stopping the Services
To stop all services:
To stop and remove volumes (will delete database data):
Scripts
npm run deploy
Installs and builds both admin & storefront
npm run setup-admin
Setup, install & build admin; run migrations
npm run start-admin
Starts admin server
npm run setup-storefront
Setup, install & build storefront
npm run start-storefront
Starts storefront server
Notes
No background processes are used in this setup — run servers in separate terminals (when not using Docker).
When using Docker, all services are managed automatically.
The Docker setup includes persistent volumes for the database and node_modules.
Contributing
Feel free to open issues or PRs if you'd like to improve or extend this setup!
License
Important Licensing Notice
Last updated