Introduction
Overview of the Admin Portal.
Created: 1/4/2026
Admin Portal
The Admin Portal is a secure, internal dashboard designed for managing the users, wallets, and configuration of the main Cubed application. It serves as a control center for administrators to oversee platform activity and user data.
Key Purposes
- User Management: View user details, verify identities, and manage permissions.
- Wallet Administration: Inspect connected wallets and balances.
- Secure Access: Protected via Privy authentication with a strict allowlist to ensure only authorized personnel can access the dashboard.
- Dual-Instance Architecture: The Admin Portal uses its own Privy App ID for login, separate from the main application's user data, ensuring a clear separation of concerns.
Tech Stack
- Framework: Next.js (App Router)
- Styling: Tailwind CSS & Shadcn UI
- Authentication: Privy (Email OTP & Wallet)
- Data Fetching: Privy Server API
- State Management: TanStack Query (React Query)
Performance Optimization
The Admin Portal leverages TanStack Query for efficient data management and caching:
- Smart Caching: Blockchain and API data is cached to reduce redundant network requests
- Background Refetching: Data automatically refreshes in the background to stay up-to-date
- Optimistic Updates: UI updates immediately while changes sync with the blockchain
- Query Invalidation: Automatic cache invalidation ensures data consistency after mutations
This approach significantly improves performance when viewing gigs, contracts, and disputes by minimizing direct blockchain calls and providing instant UI feedback.
