Dashboard Architecture
React 19 + MUI + Redux Toolkit internal admin panel. Built with Nx monorepo tooling and Vite bundler. Includes wagmi + RainbowKit for on-chain operations (wallet-mint and bridge).
Tech Stack
- React 19 with TypeScript
- Material UI (MUI) for components and theming (dark/light mode)
- Redux Toolkit for state management (10 store slices)
- Nx monorepo tooling
- Vite bundler
- wagmi + RainbowKit for Web3 wallet connectivity
Project Structure
Code
Sidebar Navigation
The sidebar label "Configuracion" groups wallet CRUD pages. URL paths remain /wallets/... for backward compatibility.
CRUD vs Operations Pattern
| Type | Sidebar Section | Purpose | Example |
|---|---|---|---|
| CRUD | Configuracion | Create, edit, delete wallets and configurations | /wallets/minting, /wallets/bridge |
| Operations | Operaciones | Execute actions, view on-chain info, transaction history | /operations/minting, /operations/bridge |
Exception: OpsToken CRUD lives under /operations/tokens because tokens are reference entities, not wallets.
Store Pattern
Each store slice follows a consistent structure:
Code
The slice is registered in stores/reducers.ts (AppState type + reducers map) and re-exported from stores/index.ts.
Web3 Integration
Used for two features:
- Wallet Mint -- Mint tokens via Safe multisig or EOA through WalletConnect
- Bridge -- Bridge tokens cross-chain via Safe or EOA
Provider stack:
Code
RainbowKitThemeWrapper synchronizes RainbowKit's theme with the app's dark/light mode via useThemeMode().
The ConnectButton is rendered globally in top-bar.tsx with compact props.
{% hint style="warning" %}
Do not use useWaitForTransactionReceipt for wallet-mint or bridge flows. Safe multisig returns a safeTxHash that never appears on-chain until the signing threshold is met.
Do not use useSwitchChain() for Safe wallets. They do not support wallet_switchEthereumChain. Instead, show an Alert asking the user to connect on the correct network.
{% endhint %}
Environment Variables
| Variable | Description | Notes |
|---|---|---|
VITE_API_URL | Backend API base URL | Runtime config |
VITE_WALLET_CONNECT_PROJECT_ID | WalletConnect Cloud project ID | Build-time only -- Vite embeds VITE_* at build. Must be set as GitHub Secret in deploy workflow, not Doppler. |
The dashboard deploys via GitHub Actions to S3 + CloudFront. Doppler is used only for the backend. The WalletConnect project ID is public by design (equivalent to a Stripe publishable key) -- allowlist the domain in cloud.reown.com to prevent quota abuse.