Next.js marketing site, merchant dashboard, public payment pages, wallet integration, webhook settings, and embeddable widget.
The frontend follows the Stargate design prompt kit: dark fintech hero, B2B navigation, transactions, payment links, wallets, webhooks, team controls, developer docs, hosted checkout, and the widget SDK.
cp .env.local.example .env.local
npm install
npm run devThe payment flow supports Freighter and Albedo wallets. To test wallet connection locally:
- Install the Freighter browser extension.
- Open Freighter, create or import a wallet, and switch the network to Testnet (Settings → Network → Testnet).
- Fund your testnet account using Stellar Friendbot or the Stellar Laboratory.
- To receive USDC on testnet, add a trustline for the testnet USDC asset:
- Asset code:
USDC - Issuer:
GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
- Asset code:
- Start the dev server (
npm run dev) and open a payment page (/pay/<invoice-id>). - Click Connect Freighter — the extension will prompt for access and then sign the payment transaction.
Albedo works in-browser without an extension. Select Albedo on the wallet selector and follow the popup prompts. Use the same testnet USDC issuer above when adding a trustline.
- Testnet accounts reset periodically; re-fund with Friendbot if your balance disappears.
- Set
NEXT_PUBLIC_STELLAR_NETWORK=testnetin.env.localto ensure transactions are submitted to the test network. - Use the Stellar Expert testnet explorer to inspect transactions.
npm run typecheck
npm run lint
npm test
npm run build
npm run build:widgetThe from-scratch product prompt kit lives at ../docs/stargate-product-build-prompts.md.
cp .env.production.example .env.production
npm run build
npm run build:widgetvercel.json contains the production build command, global security headers, hosted-checkout frame policy, and widget rewrite used by the deployment workflow.
Production deploys require these GitHub secrets on dreamgeneX/stargate-frontend:
VERCEL_TOKENVERCEL_ORG_IDVERCEL_PROJECT_ID
Production URLs should be stored as GitHub repository variables:
NEXT_PUBLIC_APP_URLNEXT_PUBLIC_API_URL
The frontend application is configured via the following environment variables:
| Variable | Type | Default | Usage / Description |
|---|---|---|---|
NEXT_PUBLIC_API_URL |
string (URL) |
http://localhost:3001 |
Base API URL for frontend interactions. Used in api.ts for general API calls and sse.ts to establish payment confirmation streams. |
NEXT_PUBLIC_APP_URL |
string (URL) |
http://localhost:3000 |
The public-facing domain URL of the frontend console. Used in developers/page.tsx to generate webhook endpoints, copyable integration scripts, and SDK configuration details. |
NEXT_PUBLIC_STELLAR_NETWORK |
'testnet' | 'mainnet' |
testnet |
Specifies the default target Stellar network environment. Used in transaction signing configurations, Horizon endpoints construction, and fallback parameters. |
Note: Never put secrets or private keys in these variables. All variables prefixed with
NEXT_PUBLIC_are bundled into the client-side code and exposed to the browser.
For detailed integration and styling guides, refer to the following documentation:
- Widget SDK & Event Schema — Event schemas (
STARGATE_LOADED,STARGATE_PAID,STARGATE_ERROR),postMessagedetails, and embedding code. - Theming & Branding Customisation Guide — Complete walkthrough on how to override CSS variables, customize brand colors, support dark mode, and customize fonts for the hosted checkout page.
MIT