create-morapay-app
v0.1.2
Published
Scaffold a Morapay integration — Next.js, React, Express, or Python
Downloads
378
Maintainers
Readme
create-morapay-app
Scaffold a Morapay merchant integration.
Run the scaffolder with any JS package manager (only used to create the project):
npx create-morapay-app
# pnpm dlx create-morapay-app
# yarn dlx create-morapay-app
# bunx create-morapay-appAfter scaffolding, use each template’s own toolchain (npm/pnpm for Node apps; pip/venv for Python).
Templates
| # | Template | Toolchain after scaffold |
|---|----------|--------------------------|
| 1 | Next.js (fiat) | npm / pnpm / yarn / bun |
| 1 + wallet | Next.js (crypto) | + Dynamic/wagmi |
| 2 | React + Vite | npm / pnpm / yarn / bun + widget or redirect (fiat, no Dynamic) |
| 3 | Express | npm / pnpm / yarn / bun |
| 4 | Python + FastAPI | Python 3.11+ · pip · venv |
Prompts
- Project name
- Template — arrow-key selectable list (↑/↓ · enter · or 1–4)
- Next.js only: wallet / crypto mode (Yes/No selector)
- Install & run? — if Yes: copies
.env, installs deps, startsdev, opens the browser
Python template
Option 4 copies a FastAPI backend with morapay/signing.py and morapay/client.py. No npm dependencies in the generated app.
cd your-project
cp .env.example .env
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn app:app --reload --port 8080Reference copy also lives in sdk-examples/python-api.
Checkout link strategy (Next.js + React)
| Pattern | SDK | When |
|---------|-----|------|
| Catalog | products.ensureCheckoutLink(productId) | One reusable link per SKU |
| Invoice | products.link({ isOneTime: true }) | New link per order |
See each template README for ports and env vars.
