Donor and NGO web app for StreamGive, a recurring/streaming donation platform for verified NGOs on Stellar.
- Next.js (App Router), React, TypeScript
- Tailwind CSS
cp .env.example .env
npm install
npm run dev # http://localhost:3001 — 3000 is taken by streamgive-backend
Vercel (recommended) — Next.js's own platform, effectively zero-config:
connect the repo, set the NEXT_PUBLIC_* env vars from .env.example in
the project settings, deploy. No Dockerfile involved.
Docker (self-hosting):
docker build -t streamgive-frontend .
docker run -p 3001:3001 --env-file .env streamgive-frontend
The image uses Next's standalone output — a minimal self-contained
server, not the full node_modules — and runs as a non-root user. Note
that NEXT_PUBLIC_* vars are baked in at build time, not read at
container startup — rebuild the image after changing any of them, an
--env-file at docker run alone won't pick up new values.
Either way, /embed/* is deliberately exempt from the X-Frame-Options
header the app sets everywhere else (see src/middleware.ts) — that
route exists specifically to be iframed on NGOs' own sites.
Port already in use
npm run dev binds to 3001 (3000 is reserved for streamgive-backend).
If 3001 is also taken, stop whatever's holding it or pass a different
port: npm run dev -- -p 3002.
Wallet won't connect
- Make sure a Stellar wallet extension (e.g. Freighter) is installed and unlocked in the browser you're testing with.
- The wallet must be set to the same network the app expects —
NEXT_PUBLIC_NETWORK_PASSPHRASEin.env(testnet by default). - If
connect()silently fails or hangs, check the browser console —StellarWalletsKit's auth modal surfaces most errors there rather than in the UI. - A stale session after switching wallets/accounts usually clears up with
a hard refresh; the app re-checks
getAddress()on load.
API unreachable / requests failing
NEXT_PUBLIC_API_URL(in.env, defaulthttp://localhost:3000) must point at a runningstreamgive-backendinstance — this app has no API of its own.NEXT_PUBLIC_*vars are read at build time in production (see Deployment below), so changing.envrequires a dev-server restart (or a rebuild, in Docker) to take effect.- A CORS error in the console usually means the backend isn't configured to allow this app's origin — that's a backend-side fix, not frontend.
Contract calls failing (donations, withdrawals, NGO registry)
NEXT_PUBLIC_DONATION_VAULT_CONTRACT_IDandNEXT_PUBLIC_NGO_REGISTRY_CONTRACT_IDmust be filled in fromstreamgive-contracts/deployments.jsonfor the network you're using — they're blank in.env.example.NEXT_PUBLIC_SOROBAN_RPC_URLmust point at an RPC endpoint for that same network; a mismatched network/RPC/contract-ID combination typically fails with an XDR or "contract not found" style error rather than a clear message.
Env changes not taking effect
Next.js inlines NEXT_PUBLIC_* vars at build time. Restart npm run dev
after editing .env; in Docker, rebuild the image rather than swapping
--env-file on an existing image.
- streamgive-contracts — Soroban smart contracts
- streamgive-backend — indexer & API
- streamgive-docs — documentation
See CONTRIBUTING.md for the accessibility checklist to run through before adding new interactive UI.
Early development.
Apache-2.0 — see LICENSE.