MorphSwift is a mobile-first crypto point-of-sale stack for merchants: a static POS frontend, an Express API, and an on-chain gateway contract for stablecoin checkouts on Morph.
| Path | Purpose |
|---|---|
frontend/ |
Merchant POS UI (terminal, checkout, ledger, onboarding) |
server/ |
REST API, JSON store, quote/checkout/withdrawal flows |
contracts/ |
MorphSwiftGateway Solidity contract |
- Frontend implementation — pages, modules, styling, and PWA behavior
- Integration guide — API, auth, checkout lifecycle, webhooks, and deployment wiring
cd server
npm install
cp .env.example .env
npm run devThe API listens on http://localhost:4000 by default. Health check: GET http://localhost:4000/health.
Serve the frontend/ directory with any static file server, for example:
npx serve frontend -p 3000Open http://localhost:3000/onboarding.html. In development, frontend/config.js points API calls at http://localhost:4000/api.
- Onboarding — merchant signs in (demo UI or
POST /api/auth/session). - Terminal — enter a fiat amount and start a charge.
- Checkout — customer scans a QR code; payment is confirmed via polling or webhook.
- Ledger — view balance, history, and withdrawals.
- Fiat: USD, PHP, SGD, MYR, IDR, THB, VND (and NGN in the terminal demo UI)
- Stablecoins: USDC, USDT
- Settlement target: Morph network (configurable in store settings)
See LICENSE.
There is an optional Next.js app scaffold under frontend/ to run a React-based frontend that mirrors the static pages. To run it:
cd frontend
npm install
npm run devIt serves the same UI routes at /onboarding, /terminal, /checkout, /ledger, and /sender and reuses the static assets in frontend/public.