GoodWallet V2 is a multi-chain, multi-protocol crypto wallet built on Next.js 16. It spans EVM chains plus Solana, Bitcoin, Dogecoin and XRP, with token management via Alchemy, cross-chain swaps via Li.Fi, prediction-market trading via Polymarket, and WalletConnect (Reown) connectivity. It centers on the GoodDollar (G$) UBI ecosystem.
- Multi-Chain Support EVM (Ethereum, Fuse, Celo, Polygon, BNB Chain, Optimism, Base, XDC) plus Solana, Bitcoin, Dogecoin, and XRP
- Token Management Alchemy-based balance tracking, send/receive, QR code transactions, gasless mode
- Swaps Cross-chain and same-chain swaps via Li.Fi (EVM, Solana, Bitcoin providers)
- Predictions / Trading Polymarket prediction markets with on-chain trading and live charts
- GoodDollar Ecosystem UBI claims, identity/whitelisting, faucet, referrals
- Authentication Web3Auth/Torus (Google, Facebook, Private Key) and Auth0 passwordless
- Monitoring & Analytics Sentry for error tracking, Amplitude for user analytics
- Frontend: Next.js 16 App Router, React 19, TypeScript
- Blockchain: Ethers.js + Viem, bitcoinjs-lib, gill/Solana, xrpl, Alchemy, custom RPCs
- State Management: Valtio, SWR
- Database: Drizzle ORM over Neon (Postgres) and PGlite (local token cache)
- Styling: Tailwind CSS, CSS Modules
- Swaps & Bridging: Li.Fi SDK v4
- Multi-chain Data: Alchemy, Tatum
- Connectivity: WalletConnect v2 via Reown WalletKit
- Predictions: Polymarket CLOB / builder-relayer clients
- Authentication: Web3Auth/Torus social logins, Auth0 passwordless (hCaptcha)
- Analytics: Sentry, Amplitude
- Wallet Infrastructure Multi-chain balances, token management, gas estimation, gasless transactions
- UI Components Drawers, modals, toasts, QR scanner, charts, reusable forms
- GoodDollar UBI claims, identity verification, multi-chain G$ support
- Project Structure
/src/app(App Router,[locale]routes,/api),/src/sections(feature flows: Home, Send, Receive, Swap, Predictions, GoodDollar, Login, WalletConnect, Qr, Options),/src/chain,/src/tokens,/src/stores,/src/hooks,/src/components,/src/ui
- Biome (lint + format), Lefthook (git hooks)
- Vitest for tests
- Drizzle Kit for schema/migrations
- TypeScript for type safety
- PWA Capabilities: installable on mobile and desktop
- Internationalization: i18n routing with
[locale]directories - Cross-Browser & Cross-Platform: consistent experience on major browsers
-
Node.js 22+
-
Yarn 4.x
-
A configured environment file. Copy
.env.exampleto.env.development(or.env.production) and fill in real values:cp .env.example .env.development
.env.developmentand.env.productionare gitignored — never commit real secrets. Variables prefixedNEXT_PUBLIC_are inlined into the client bundle and must be treated as public; everything else is server-only.
To install dependencies, run:
yarn installTo start the development server (runs drizzle-kit push, then next dev):
yarn devOther scripts: yarn build, yarn start, yarn test, yarn lint.
Then open http://localhost:3000 in your browser