React + Vite dApp for StackPay — create & share payment requests, pay with a Stellar wallet, and track status in real time.
The user-facing app for StackPay. It talks to the deployed Soroban contract (stackpay-contracts) and the stackpay-backend API.
- Features
- Tech stack
- Getting started
- Configuration
- Project structure
- Wallet connect
- Pages & flows
- Styling
- Testing
- Production build
- Contributing
- License
- 🔐 Stellar wallet login (Freighter, Albedo) — non-custodial.
- ➕ Create a request — payee (you), asset, amount, memo; get a shareable link.
- 🔗 Request page — anyone with the link can pay from their wallet.
- 📊 Live status — Open / Paid / Cancelled with real-time updates.
- 🧾 Payment proof — on-chain
Paidstatus = receipt. - 🌐 Testnet / Mainnet toggle.
React 18 + TypeScript · Vite · Tailwind CSS · @stellar/stellar-sdk + @stellar/freighter-api · TanStack Query · Socket.IO client · React Router · Zod.
git clone https://github.com/Stack-Rocks/stackpay-frontend.git
cd stackpay-frontend
cp .env.example .env
npm install
npm run devOpen http://localhost:5173.
See .env.example:
| Variable | Description |
|---|---|
VITE_API_URL |
Backend API base. |
VITE_RPC_URL |
Soroban RPC endpoint. |
VITE_NETWORK |
testnet | mainnet. |
VITE_CONTRACT_PAYMENT |
PaymentRequest contract id. |
src/
+-- main.tsx # entry
+-- App.tsx # router + providers
+-- lib/stellar.ts # wallet connect + tx helpers
+-- lib/api.ts # backend REST client
+-- hooks/useWallet.ts # wallet state
+-- hooks/useRequests.ts# queries + live updates
+-- components/ # Navbar, RequestCard, CreateForm, PayButton
+-- pages/ # Dashboard, Create, Request
import { connectFreighter } from "./lib/stellar";
const pubkey = await connectFreighter(); // prompts Freighter- Dashboard — your requests (as payee) + received totals.
- Create — form to make a request; shows the shareable link.
- Request — public page: pay button + live status.
Tailwind with a custom theme (tailwind.config.js) using Stack-Rocks' slate/amber palette. Responsive + accessible.
npm run test # vitest + RTL
npm run test:e2e # playwright (wallet mocked)npm run build && npm run previewDeploy dist/ to any static host (Vercel, Netlify, GitHub Pages, IPFS).
Part of the Stellar Wave Program on Drips. Look for Stellar Wave / Good first issue. Run npm run lint && npm run build && npm run test before a PR.
MIT.