React-based web interface for DAppNode administration and package management
The Admin UI is a modern React application that provides the graphical user interface for DAppNode management. It connects to the DAppManager backend API to offer a comprehensive dashboard for installing packages, monitoring system health, configuring blockchain nodes, and managing all aspects of a DAppNode installation.
- Package Management: Browse, install, update, and configure DAppNode packages
- System Dashboard: Real-time monitoring of system resources and health
- Blockchain Node Management: Configure and monitor Ethereum execution/consensus clients
- Staking Interface: Validator key management and staking configuration
- Network Administration: VPN, port forwarding, and network configuration
- System Settings: User accounts, notifications, and system preferences
- Responsive Design: Optimized for desktop and mobile devices
- Frontend Framework: React 18 with TypeScript
- Build Tool: Vite for fast development and optimized builds
- State Management: Redux Toolkit with RTK Query
- Routing: React Router v6
- UI Components: React Bootstrap with custom styling
- Styling: SCSS with Bootstrap 4 theming
- Real-time Updates: Socket.IO client for live data
- Data Fetching: SWR for efficient API calls and caching
src/
├── components/ # Reusable UI components
├── pages/ # Route-based page components
├── hooks/ # Custom React hooks
├── api/ # API client and data fetching
├── services/ # Business logic and utilities
├── store.ts # Redux store configuration
├── types.ts # TypeScript type definitions
└── utils/ # Utility functions
- Dashboard: System overview with real-time stats
- Packages: Browse and manage installed/available packages
- System: Host management, updates, and configuration
- Stakers: Ethereum staking and validator management
- Network: VPN, networking, and connectivity settings
- Support: Diagnostics, logs, and troubleshooting tools
- Node.js 20.x
- Yarn Berry (4.7.0+)
- DAppManager backend running (for full functionality)
# Install dependencies
yarn install
# Start development server with mock backend
yarn mock-standalone
# Start development server connected to real DAppManager
yarn start
# Start mock server (separate terminal)
yarn server-mockyarn start # Connect to real DAppManager API
yarn mock # Development with mock backend at localhost:5000
yarn mock-standalone # Development with embedded mocks
yarn build # Production build
yarn server-mock # Start mock API server
yarn dev # Build in watch mode- Standalone Development: Use
yarn mock-standalonefor UI-only development - Backend Integration: Use
yarn mockwith mock server for API testing - Full Integration: Use
yarn startconnected to real DAppManager
The mock backend provides realistic API responses for development without requiring a full DAppNode setup.
The Admin UI communicates with the DAppManager backend through:
- REST API: Standard HTTP requests for CRUD operations
- WebSocket: Real-time updates via Socket.IO
- SWR: Efficient data fetching with caching and revalidation
// Typed API client with SWR integration
const api = useApi.packageGet({ dnpName: "bitcoin.dnp.dappnode.eth" });
// Real-time subscription
useSubscription("chainData", (data) => {
// Handle real-time blockchain data updates
});- Base Framework: Bootstrap 4 with custom DAppNode theme
- Color System: Defined in
src/dappnode_colors.scss - Typography: Custom font stack with system fallbacks
- Dark/Light Mode: Automatic theme switching support
- Responsive Design: Mobile-first approach with Bootstrap grid
# Run all tests
yarn test
# Type checking for mock server
yarn server-mock:check-typesThe testing strategy includes:
- Component testing with React Testing Library
- API integration testing with mock responses
- Type checking for TypeScript code
- End-to-end testing scenarios
yarn buildCreates optimized production bundle in build/ directory with:
- Code splitting and lazy loading
- Asset optimization and compression
- Source maps for debugging
- Service worker for offline functionality
- Vite: Modern build tool with HMR
- TypeScript: Strict type checking
- SCSS: Advanced styling with variables and mixins
- Asset Optimization: Images, fonts, and static resources
The Admin UI supports several configuration modes:
- Production: Connected to DAppManager backend
- Mock: Development with mock API server
- Standalone: Self-contained with embedded mocks
- Test: Automated testing environment
Environment variables:
VITE_APP_API_URL: Backend API URLVITE_APP_MOCK: Enable mock modeVITE_APP_API_TEST: Test mode configuration
- Install packages from DAppStore or IPFS
- Update and remove installed packages
- Configure package settings and environment variables
- View package logs and metrics
- Real-time CPU, memory, and disk usage
- Network statistics and connectivity status
- Docker container health and status
- System logs and diagnostics
- Ethereum execution/consensus client setup
- Validator key import and management
- Staking rewards and performance tracking
- Multi-network support (Mainnet, Gnosis, etc.)
- OpenVPN configuration and credentials
- Port forwarding and UPnP setup
- Static IP and DNS configuration
- Network diagnostics and troubleshooting
When contributing to the Admin UI:
- Follow React and TypeScript best practices
- Use existing component patterns and styling
- Maintain responsive design principles
- Add proper TypeScript types for new features
- Test with both mock and real backends
- Follow the existing code organization structure
- Use functional components with hooks
- Prefer TypeScript strict mode
- Follow existing naming conventions
- Use SCSS modules for component-specific styles
Maintainers:
- @pablomendezroyo - Lead Developer
- @GiselleNessi - Frontend Developer
- @dappnodedev - Core Team
Issues: Please report UI issues in the main DNP_DAPPMANAGER repository