$ show primeZdev/whale-panel
Whale Panel is a comprehensive admin dashboard system for managing X-UI panels with role-based access control (SuperAdmin and Admin roles). The application features a FastAPI backend with SQLite database, a React/TypeScript frontend, and a Telegram bot for VPN reseller functionality. It provides unified management of multiple panel types (3x-ui, Marzban, Guard, Tx-ui) including user management, traffic monitoring, and system statistics. The architecture follows a monolithic design with clear separation between API services, business logic, and presentation layers.
The LLM identified 4 files worth highlighting for reuse:
Implements a smart API client for Marzban panels with class-level token caching to prevent redundant authentications. Demonstrates non-obvious skill in optimizing API usage by caching tokens at the class level when multiple instances share credentials, reducing unnecessary login requests while maintaining thread safety.
Provides a robust caching mechanism for fetching advertisements from GitHub with TTL-based expiration and automatic fallback to default values on network errors. Shows excellent error handling practices and self-contained design that could be easily extracted for any project requiring similar remote data caching with fallback behavior.
Well-designed Axios instance setup with request and response interceptors for automatic JWT token attachment and 401 unauthorized handling. Demonstrates clean separation of concerns by encapsulating API configuration, making it highly reusable across different frontend applications requiring authenticated API communication.
Collection of pure utility functions for converting between traffic units (bytes, KB, MB, GB, TB) with proper formatting. Represents a highly reusable, zero-dependency component that solves a common problem in applications dealing with data transfer measurements, demonstrating attention to detail in edge case handling (zero values) and precision.