https://github.com/vendure-ecommerce/examples
https://github.com/vendure-ecommerce/examples
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/vendure-ecommerce/examples
- Owner: vendure-ecommerce
- Created: 2025-08-14T07:39:38.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2025-08-21T12:03:00.000Z (about 2 months ago)
- Last Synced: 2025-08-21T12:23:59.677Z (about 2 months ago)
- Language: MDX
- Size: 878 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Vendure Examples
A collection of portable Vendure configurations and examples that can be copied to any Vendure project.## Quick Start
```bash
# Install dependencies
npm install# Create a new example
npm run create-example my-feature# Build the example
npm run build --workspace=my-feature# Run the example (optional)
npm run dev:server --workspace=my-feature
```## How It Works
### 1. Main Store
The `store/` directory contains a standard Vendure installation created with `npx @vendure/create`. This serves as the base configuration that all examples inherit from.### 2. Examples
Examples are self-contained Vendure projects in the `examples/` directory. Each example:
- Contains a complete, portable `vendure-config.ts`
- Includes all necessary dependencies
- Can be copied to any Vendure project### 3. Portability
Every example's `vendure-config.ts` is **fully portable**:```bash
# Copy any example config to your project
cp examples/my-feature/src/vendure-config.ts my-vendure-project/src/# Copy custom plugins too (if any)
cp -r examples/my-feature/src/plugins my-vendure-project/src/
```## Commands
| Command | Description |
|---------|-------------|
| `npm run create-example ` | Create a new example |
| `npm run list:examples` | List all examples |
| `npm run dev:server --workspace=` | Run example in development |
| `npm run build --workspace=` | Build example |## Example Structure
When you create an example, you get:
```
examples/my-feature/
├── src/
│ ├── vendure-config.ts # ← Main config (copy this to your project)
│ ├── plugins/ # ← Custom plugins (if any)
│ ├── index.ts # Server entry point
│ └── index-worker.ts # Worker entry point
├── package.json # Complete dependencies
└── README.md # Usage instructions
```## Development Workflow
1. **Create**: `npm run create-example payment-gateway`
2. **Develop**: Edit `examples/payment-gateway/src/vendure-config.ts`
3. **Test**: Build and run the example
4. **Share**: Copy the config to any Vendure project