Skip to content

Multi platform e-commerce development using React Native + Next.js + Medusa.js

License

Notifications You must be signed in to change notification settings

bidah/universal-medusa

Repository files navigation

Universal Medusa ⚛️ Multi platform e-commerce development

Support: Got questions about the project, need more comprehensive support, or want to move into production using Universal Medusa? Please reach out by booking a meeting.


Build cross platforms e-commerce apps with Medusa.js that gets you the best of web and native mobile using Next.js and Expo.

You get a starter codebase with a complete e-commerce app that runs on both mobile and web. You get code reuse with shared screens, components, modules, providers, style system using Nativewind, unified navigation with Solito and Expo Router and much, much more.

📄 Docs: https://dub.sh/universalmedusa


Motivation

When developing robust ecommerce your app product tend to ship slower and slower when it grows in functionality and team size. That's always the case on a thriving project. With that in mind Universal medusa empowers what Medusa.js already gives you. More dev tooling to power up your ecom development with easy and sacability in mind.

Getting Started

Get started by running the following to create a new project with a starter kit that consists of a:

  • base monorepo structure ready to go.
  • base medusa frontend starter (port of medusa.js next.js starter)
  • base medusa backend starter
npx create-universal-medusa-app my-app

ℹ️ The starter is a port of Medusa.js Next.js starter. So you get all the same features out of the box. You get a Expo, Next and default Medusa backend in a monorepo

You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.

Start projects (mobile, web and Medusa.js backend)

ℹ️ yarn install already ran with the create-universal-medusa-app command

Run Expo client

Install the latest EAS CLI

EAS CLI is the command-line app that you will use to interact with EAS services from your terminal. To install it, run the command:

npm install -g eas-cli

Login to your expo account

eas login

Configure project for eas builds

Create your dev client to be run on your simulator

ℹ️ You need to rerun build whenever you add native dependencies to your expo project

eas build --profile development-simulator --platform ios

then start your dev client

yarn native

Run Next.js web app

yarn web

Run the medusa backend

ℹ️ If you have PostgreSQL installed on your machine, the database for Medusa backend is already created and configured for you when running npx create-universal-medusa-app

# First time only. You need to seed db
yarn medusa:seed

# then start the backend
yarn medusa