Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/medusajs/medusa-express-nextjs
One-page checkout flow
https://github.com/medusajs/medusa-express-nextjs
Last synced: about 2 months ago
JSON representation
One-page checkout flow
- Host: GitHub
- URL: https://github.com/medusajs/medusa-express-nextjs
- Owner: medusajs
- Created: 2022-01-09T12:26:08.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-10T08:12:29.000Z (over 2 years ago)
- Last Synced: 2024-11-02T19:34:16.920Z (2 months ago)
- Language: JavaScript
- Size: 667 KB
- Stars: 68
- Watchers: 6
- Forks: 23
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-medusajs - Nextjs Medusa express
README
Medusa Express
Medusa is an open-source headless commerce engine that enables developers to create amazing digital commerce experiences.
## Built with
### [Medusa](https://www.medusajs.com): Commerce engine
### [Next.js](https://nextjs.org/): React framework
### [Stripe](https://stripe.com/en-gb-dk): Payment provider
### [Medusa React](https://github.com/medusajs/medusa/tree/master/packages/medusa-react): Hooks and components for Medusa
**Prerequisites**: To use Medusa Express, you need a Medusa server. Check out [medusa-starter-default](https://github.com/medusajs/medusa-starter-default) for a quick setup.
## 🚀 Get started!
### Deploy in 5 minutes
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/medusajs/medusa-express-nextjs)
### 1. Create your Medusa Express project
#### Use npx and select medusa.express (recommended)
```zsh
npx create-medusa-app@latest
```#### Use git clone
```zsh
git clone --depth=1 https://github.com/medusajs/medusa-express-nextjs medusa-express
```### 2. Navigate to project and install dependencies
```zsh
cd
yarn
# or
npm install
```### 3. Link your Medusa server
In your project, you should have a `.env.template` file with the following content:
```shell
NEXT_PUBLIC_MEDUSA_BACKEND_URL=http://localhost:9000
```Copy the template into a file used for local development:
```zsh
mv .env.template .env.local
```Add Stripe API key as environment variable to complete orders:
```zsh
# Stripe key is required for completing orders
NEXT_PUBLIC_STRIPE_API_KEY=pk_test_...
```Your Medusa server runs locally on port 9000 by default. Make sure to update the above environment variable, if you've changed the port.
### 4. Try it out!
Start up both your Medusa server and Medusa Express and try it out!
Medusa Express is running at `http://localhost:8000`!
> **Important**: Medusa Express requires existing product. Either seed your Medusa server with some dummy products, or create your own through Medusa Admin.