- Overview
- Features
- Tech Stack
- Multi-Chain Support
- Getting Started
- Project Structure
- Configuration
- API Integration
- Authentication
- Development
- Deployment
- Contributing
The Paycrypt Admin Dashboard is a powerful Next.js application designed for administrators to manage and monitor the Paycrypt ecosystem across multiple blockchain networks. Built with modern Web3 technologies, it provides real-time insights into token operations, user activities, orders, and cross-chain transactions.
- Multi-Chain Architecture: Seamlessly manage contracts across Base, Lisk, and Celo networks
- Real-Time Analytics: Live data visualization with interactive charts and metrics
- Secure Authentication: Email/password authentication with JWT token management
- Responsive Design: Mobile-first UI with dark mode support
- Web3 Integration: Full wallet connectivity via RainbowKit and Wagmi
- Email/password login system
- JWT token-based session management
- Protected routes with authentication guards
- Persistent authentication state
- Total trading volume across all chains
- Active users and token statistics
- Recent activity feed
- Chain-specific volume breakdown
- Interactive charts (bar, line, area, pie)
- View all orders across chains
- Filter by order status and chain
- Search and pagination
- Detailed order information with blockchain links
- List all deployed tokens
- Token details (name, symbol, total supply)
- Chain-specific filtering
- Direct links to block explorers
- User registry and statistics
- Order history per user
- Wallet address tracking
- Activity monitoring
- Administrative controls
- System configuration
- Chain management interface
The dashboard supports three blockchain networks:
| Chain | Chain ID | Explorer | Features |
|---|---|---|---|
| Base | 8453 | BaseScan | Primary network |
| Lisk | 1135 | Blockscout | Secondary network |
| Celo | 42220 | CeloScan | Secondary network |
- Chain Selector: Global dropdown to switch between networks
- Aggregated View: "All Chains" mode showing combined data
- Chain Filtering: Filter data by specific blockchain
- Chain Icons: Visual indicators for each network
- Persistent Selection: Chain preference saved in localStorage
- Next.js 15.5 - React framework with App Router
- React 19 - UI library
- TypeScript 5 - Type-safe development
- Wagmi - React Hooks for Ethereum
- RainbowKit - Wallet connection UI
- Viem - TypeScript Ethereum library
- Radix UI - Headless component primitives
- Tailwind CSS - Utility-first styling
- Recharts - Data visualization
- Lucide React - Icon library
- Sonner - Toast notifications
- TanStack Query - Async state management
- React Context - Global state (chain selection)
- ESLint - Code linting
- PostCSS - CSS processing
- pnpm - Package management
The dashboard integrates with three EVM-compatible blockchains:
// Base Network
Chain ID: 8453
Contract: 0x0574A0941Ca659D01CF7370E37492bd2DF43128d
RPC: https://mainnet.base.org
// Lisk Network
Chain ID: 1135
Contract: 0x7Ca0a469164655AF07d27cf4bdA5e77F36Ab820A
RPC: https://rpc.api.lisk.com
// Celo Network
Chain ID: 42220
Contract: 0xBC955DC38a13c2Cd8736DA1bC791514504202F9D
RPC: https://forno.celo.orgThe ChainContext provider manages the global chain state:
import { useChain } from '@/contexts/chain-context'
const { selectedChain, setSelectedChain, multiChainMode } = useChain()- Node.js: v18.17 or higher
- pnpm: v8.0 or higher
- Git: Latest version
-
Clone the repository
git clone https://github.com/Team-memevibe/Admin-board.git cd Admin-board -
Install dependencies
pnpm install
-
Set up environment variables
Create a
.env.localfile in the root directory:# Backend API URL NEXT_PUBLIC_BACKEND_API_URL=https://your-api-url.com # WalletConnect Project ID (get from https://cloud.walletconnect.com) NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id # Optional: Chain-specific RPC URLs NEXT_PUBLIC_BASE_RPC_URL=https://mainnet.base.org NEXT_PUBLIC_LISK_RPC_URL=https://rpc.api.lisk.com NEXT_PUBLIC_CELO_RPC_URL=https://forno.celo.org
-
Run the development server
pnpm dev
-
Open your browser
Navigate to http://localhost:3000
- Obtain admin credentials from your system administrator
- Login with your email and password
- Connect wallet (optional) via RainbowKit for Web3 features
- Select your preferred chain using the chain selector in the header
Admin-board/
βββ app/ # Next.js App Router
β βββ page.tsx # Login page
β βββ layout.tsx # Root layout
β βββ globals.css # Global styles
β βββ dashboard/ # Dashboard routes
β βββ layout.tsx # Dashboard layout with sidebar
β βββ overview/ # Overview page
β βββ orders/ # Orders management
β βββ all-orders/ # All orders view
β βββ tokens/ # Token management
β βββ users/ # User management
β βββ admin/ # Admin panel
β
βββ components/ # React components
β βββ app-sidebar.tsx # Navigation sidebar
β βββ auth-guard.tsx # Route protection
β βββ chain-selector.tsx # Chain switching component
β βββ theme-provider.tsx # Dark mode provider
β βββ web3-provider.tsx # Web3 configuration
β βββ ui/ # UI component library
β βββ button.tsx
β βββ card.tsx
β βββ chart.tsx
β βββ table.tsx
β βββ ...
β
βββ config/ # Configuration files
β βββ contract.ts # Multi-chain contract config
β
βββ contexts/ # React contexts
β βββ chain-context.tsx # Chain selection state
β
βββ hooks/ # Custom React hooks
β βββ use-mobile.tsx # Mobile detection
β
βββ lib/ # Utility libraries
β βββ api.ts # API client functions
β βββ auth.ts # Authentication utilities
β βββ utils.ts # Helper functions
β
βββ public/ # Static assets
βββ styles/ # Additional styles
β
βββ .env.local # Environment variables (create this)
βββ components.json # shadcn/ui configuration
βββ next.config.mjs # Next.js configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies
Smart contract addresses and chain configurations are defined in config/contract.ts:
export const CONTRACTS: Record<ChainKey, ChainConfig> = {
base: {
chainId: 8453,
name: 'Base',
address: '0x0574A0941Ca659D01CF7370E37492bd2DF43128d',
explorer: 'https://basescan.org',
},
// ... other chains
}getContractAddress(chainId)- Get contract address by chain IDgetContractAddressByKey(chainKey)- Get contract address by chain keygetExplorerUrl(chainId)- Get block explorer URLgetRPCUrl(chainId)- Get RPC endpoint URL
RainbowKit and Wagmi are configured in components/web3-provider.tsx with support for all three chains.
The dashboard communicates with a REST API backend:
// Base URL from environment
const BASE_URL = process.env.NEXT_PUBLIC_BACKEND_API_URL
// Example endpoints
GET /api/orders // All orders
GET /api/orders/user/:wallet // User-specific orders
GET /api/tokens // All tokens
GET /api/users // User registry
GET /api/stats // Dashboard statistics
POST /api/auth/login // Authentication// Fetch all orders
export async function getAllOrders()
// Fetch orders for a specific user
export async function getUserHistory(userAddress: string)
// Additional API functions...// Login and store JWT token
paycryptAPI.login(email, password)
// Check authentication status
paycryptAPI.isAuthenticated()
// Logout
paycryptAPI.logout()- Admin enters email and password on login page
- Credentials sent to
/api/auth/login - Backend validates and returns JWT token
- Token stored in
localStorage - Token included in subsequent API requests via
Authorizationheader - Protected routes check for valid token via
AuthGuard
All dashboard routes are protected by the AuthGuard component:
// app/dashboard/layout.tsx
import AuthGuard from '@/components/auth-guard'
export default function DashboardLayout({ children }) {
return <AuthGuard>{children}</AuthGuard>
}// Check if user is authenticated
if (paycryptAPI.isAuthenticated()) {
// User has valid token
}
// Logout and clear token
paycryptAPI.logout()
router.push('/')# Start development server
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm start
# Run linter
pnpm lint-
Create a new feature branch
git checkout -b feature/your-feature-name
-
Make your changes following TypeScript and ESLint guidelines
-
Test locally
pnpm dev
-
Build and verify
pnpm build
-
Commit and push
git add . git commit -m "feat: your feature description" git push origin feature/your-feature-name
- Use TypeScript for all new files
- Follow ESLint rules
- Use functional components with hooks
- Implement proper error handling
- Add comments for complex logic
- Keep components focused and reusable
# Add a new shadcn/ui component
npx shadcn-ui@latest add [component-name]-
Push to GitHub
git push origin main
-
Import to Vercel
- Go to vercel.com
- Import your GitHub repository
- Configure environment variables
- Deploy
-
Set Environment Variables in Vercel dashboard
NEXT_PUBLIC_BACKEND_API_URLNEXT_PUBLIC_WALLETCONNECT_PROJECT_ID
# Build the application
pnpm build
# Start production server
pnpm startFROM node:18-alpine
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN npm install -g pnpm && pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
EXPOSE 3000
CMD ["pnpm", "start"]- Fork the repository
- Create a feature branch
- Make your changes with clear commit messages
- Write or update tests if applicable
- Ensure all tests pass and build succeeds
- Submit a pull request with a detailed description
- Update the README.md with details of changes if needed
- Follow the existing code style and conventions
- Ensure your code builds without errors
- Request review from maintainers
- Use GitHub Issues for bug reports and feature requests
- Provide detailed information including:
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Environment details (OS, browser, Node version)
This project is private and proprietary. All rights reserved by Team Memevibe.
Team Memevibe
- Organization: Team-memevibe
- Repository: Admin-board
For questions, issues, or support requests:
- Open an issue on GitHub
- Contact the development team
- Check existing documentation in the
/docsfolder
- Built with Next.js
- UI components from shadcn/ui
- Web3 integration via Wagmi and RainbowKit
- Icons by Lucide
Made with β€οΈ by Team Memevibe