Skip to content

IsKenKenYa/1Panel-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

270 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

1Panel Client Logo

1Panel Client

Version License

A cross-platform client for connecting to and managing one or more 1Panel servers.

ไธญๆ–‡ๆ–‡ๆกฃ | English


What It Is

  • A client for users who manage 1Panel servers from mobile or desktop
  • Built around multi-server switching, quick status reading, and common operations in one place
  • Designed for daily tasks such as checking server state, browsing files, managing containers, apps, and websites

Who It Is For

  • 1Panel users who need to manage more than one server
  • Operators who want fast access to status and common actions away from the browser
  • Early adopters who want to try new client workflows and share feedback

What You Can Do

This client provides comprehensive management capabilities for 1Panel servers with 100% API coverage (34 modules, 425+ endpoints):

Core Management (8 Main Modules)

  • Dashboard: Real-time system monitoring with CPU, memory, disk, and network I/O metrics
  • File Management: Complete file operations including browse, edit, upload/download, recycle bin, transfer manager, favorites, and mount points
  • Container Management: Full Docker lifecycle management with containers, images, compose orchestration, networks, and volumes
  • Application Management: App store integration with installation, updates, and lifecycle management
  • Website Management: Complete website operations including SSL certificates, domain management, routing rules, and configuration center
  • AI Management: Ollama model management, AI agent configuration, GPU monitoring, and domain binding
  • Database Management: Full support for MySQL/MariaDB, PostgreSQL, and Redis with backup and user management
  • Settings: System configuration, security settings, snapshots, and panel updates

Advanced Operations (14 Additional Modules)

  • Firewall Management: Rules, IP whitelist, and port management
  • Backup & Restore: Backup accounts, records, and complete recovery operations
  • Cronjob Management: Scheduled tasks with execution history and logs
  • Runtime Management: PHP extensions/configuration, Node modules/scripts, and Supervisor process management
  • SSH Management: SSH settings, certificates, logs, and session management
  • Process Management: System process monitoring and control
  • Host Management: Host assets and system information
  • Command Management: Command execution and history
  • Script Library: Script management and execution
  • Log Center: System logs and task log viewing
  • Toolbox: Device management, disk operations, ClamAV, Fail2ban, and FTP
  • OpenResty: Configuration management and source editing
  • Monitoring: Real-time metrics with chart visualization
  • Terminal: SSH terminal access

System Features

  • Multi-server switching and management
  • Unified logging system with privacy protection (automatic IP masking)
  • Complete internationalization (Chinese/English)
  • Mobile-optimized interface with tablet support
  • Secure authentication with 1Panel API key integration

First-Time Setup (Important: API Configuration)

To use 1Panel Client, you must enable API access on your 1Panel server:

  1. Enable API & Get Key: Log into your 1Panel Web dashboard. Go to Panel Settings -> API Interface (้ขๆฟ่ฎพ็ฝฎ -> API ๆŽฅๅฃ). Toggle the API switch to Enable. Copy your API Key.
  2. Configure IP Whitelist: In the same API settings section, you must add allowed IPs. If you are using a mobile device where your IP changes frequently, add 0.0.0.0/0 to allow all IP addresses. If you have a static IP or VPN, add that specific IP.
  3. Install the Client: Install the 1Panel Client app on your device.
  4. Add Server: Open the app, add a new server by entering your 1Panel server URL (e.g., https://panel.example.com:port) and the API Key you copied.
  5. Connect: Test the connection and save. You can now manage your server natively!

Release Channels

  • debug-* tags publish internal alpha APKs for development verification.
  • beta-* tags publish public preview APKs for feedback collection.
  • pre-release-* tags publish candidate APKs before stable release.
  • release-* tags are reserved for stable releases from main.
  • Automatic in-app updates are not available in these channels yet.
  • The official feedback channel is GitHub Issues:

Recent Updates

0.6.0

  • Added terminal workbench, runtime session, and WebSocket transport layers for longer-lived terminal workflows.
  • Added the Windows native host bridge, capability whitelist, and tray integration for the desktop track.
  • Added adaptive shell routing and server-aware navigation so module switching stays inside the shared shell.
  • Added unified API response parsing and exception handling to reduce duplicated network error logic.
  • Improved files, databases, websites, logs, monitoring, settings, and security flows across the app.
  • Updated iOS and macOS project configuration to keep the native platform track moving forward.

This release is still part of the debug channel and should be validated on the target platform before production use.

๐Ÿ› ๏ธ Technology Stack

  • Framework: Flutter 3.16+ with Material Design 3
  • Networking: Dio HTTP Client with comprehensive error handling and retry mechanism
  • State Management: Provider pattern
  • Authentication: MD5 token-based authentication (1Panel-specific)
  • Storage: Flutter Secure Storage + SharedPreferences
  • Internationalization: Built-in Flutter i18n (English/Chinese)
  • Logging: Unified logging system with privacy protection (IP masking)

Development Standards

  • Authoritative standards: AGENTS.md (hard rules for architecture, file size, testing)
  • File size limits: 1000 LOC hard cap for all code files (excluding docs and generated files)
  • Pre-commit baseline:
    • flutter analyze (mandatory)
    • dart run test/scripts/test_runner.dart unit (mandatory)
    • dart run test/scripts/test_runner.dart integration (when touching API/network)
    • dart run test/scripts/test_runner.dart ui (when touching UI)
  • Architecture: One-way dependencies: Presentation -> State -> Service/Repository -> API/Infra
  • Logging: Use appLogger from lib/core/services/logger/logger_service.dart, never print() or debugPrint()

๐ŸŒ Network Architecture

This project uses a comprehensive Dio-based networking architecture with complete 1Panel V2 API integration after extensive verification:

๐ŸŽฏ API Implementation Status: Production Ready (425+ Endpoints)

After comprehensive analysis and implementation of the 1Panel V2 API, this project provides complete coverage of all documented V2 endpoints. Based on the official V2 OpenAPI specification with 429 API endpoints and multiple verification rounds:

Implemented API Clients (34 files)

  • โœ… AI Management - ai_v2.dart
  • โœ… App Management - app_v2.dart
  • โœ… Authentication - auth_v2.dart
  • โœ… Backup Management - backup_account_v2.dart
  • โœ… Command Management - command_v2.dart
  • โœ… Container Management - container_v2.dart, compose_v2.dart
  • โœ… Cronjob Management - cronjob_v2.dart
  • โœ… Dashboard Management - dashboard_v2.dart
  • โœ… Database Management - database_v2.dart
  • โœ… Disk Management - disk_management_v2.dart
  • โœ… Docker Management - docker_v2.dart
  • โœ… File Management - file_v2.dart
  • โœ… Firewall Management - firewall_v2.dart
  • โœ… Host Management - host_v2.dart, host_tool_v2.dart
  • โœ… Logs Management - logs_v2.dart
  • โœ… Monitoring Management - monitor_v2.dart
  • โœ… OpenResty Management - openresty_v2.dart
  • โœ… Process Management - process_v2.dart
  • โœ… Runtime Management - runtime_v2.dart
  • โœ… Script Library - script_library_v2.dart
  • โœ… Settings Management - setting_v2.dart
  • โœ… Snapshot Management - snapshot_v2.dart
  • โœ… SSH Management - ssh_v2.dart
  • โœ… SSL Management - ssl_v2.dart
  • โœ… System Group Management - system_group_v2.dart
  • โœ… Task Log Management - task_log_v2.dart
  • โœ… Terminal Management - terminal_v2.dart
  • โœ… Toolbox Management - toolbox_v2.dart
  • โœ… Update Management - update_v2.dart
  • โœ… User Management - user_v2.dart
  • โœ… Website Management - website_v2.dart, website_group_v2.dart

Core Components

  • DioClient: Unified HTTP client with automatic retry and error handling
  • Interceptors:
    • Authentication: 1Panel-specific MD5 token generation
      • MD5 hash: MD5("1panel" + apiKey + timestamp) (matches server implementation)
      • Automatic timestamp and signature headers (1Panel-Token, 1Panel-Timestamp)
    • Logging (Debug mode only)
    • Retry mechanism with exponential backoff
    • Error handling with custom exception types
  • API Client Management: Centralized client management for multiple servers
  • Type Safety: Strong-typed data models with comprehensive API integration

๐Ÿ” Verification Status: Complete (4 Comprehensive Rounds)

  • โœ… Round 1: Initial API implementation and authentication architecture
  • โœ… Round 2: Deep module analysis and gap identification
  • โœ… Round 3: Final integrity verification - Production ready status confirmed
  • โœ… Round 4: OpenAPI V2 specification analysis with 100% coverage verification
  • โœ… Current Status: All 34 API modules implemented with 60+ data models

Network Features

  • โœ… Automatic Retry: Configurable retry with exponential backoff
  • โœ… Error Handling: Unified exception handling with custom types
  • โœ… Logging: Comprehensive request/response logging with privacy protection
  • โœ… 1Panel Authentication: Server-compatible MD5 token generation with proper headers
  • โœ… API Path Management: Automatic /api/v2 prefix handling for all endpoints
  • โœ… Constants Management: Unified API configuration and path management
  • โœ… Complete Type Safety: All 425+ endpoints with strongly-typed models
  • โœ… Unified Architecture: Consistent patterns across all API clients
  • โœ… Build Integration: Automated code generation for models and serialization
  • โœ… Timeout Management: Configurable timeouts for all operations
  • โœ… Multi-server Support: Manage multiple 1Panel instances
  • โœ… Complete V2 API Coverage: All documented endpoints across 34 V2 API modules
  • โœ… Strong-Typed Models: 60+ comprehensive data model files with JSON serialization
  • โœ… Privacy Protection: Automatic public IP masking in logs

API Integration Status

โœ… Complete Implementation Overview

Total Coverage: 425+ API endpoints across all functional areas from official 1Panel V2 documentation

API Files: 34 total modules with complete implementation Data Models: 60+ comprehensive model files covering all functional areas with JSON serialization Code Quality: All files follow strict LOC limits (โ‰ค1000 LOC hard cap)

โœ… Complete API Implementation (All 34 modules)

  • AI Management: Complete Ollama model integration and GPU monitoring
  • Application Management: Full app store integration and lifecycle management
  • Authentication: Login, logout, and session management
  • Backup Management: Complete backup operations and recovery functionality
  • Command Management: Command execution and management
  • Container Management: Full Docker container, image, and compose management
  • Cronjob Management: Scheduled tasks with execution logs and statistics
  • Dashboard Management: System dashboard and overview
  • Database Management: Complete database operations with strong typing
  • Disk Management: Disk operations and management
  • Docker Management: Docker service and integration management
  • File Management: Comprehensive file operations and transfer capabilities
  • Firewall Management: Complete firewall rules and port management
  • Host Management: Complete host monitoring and system management
  • Logs Management: System logging and analysis
  • Monitoring Management: System metrics and alert management
  • OpenResty Management: OpenResty configuration and management
  • Process Management: Process monitoring and control
  • Runtime Management: Complete runtime environment management
  • Script Library: Script management and execution
  • Settings Management: System configuration and snapshot management
  • Snapshot Management: System backup snapshots and recovery
  • SSH Management: SSH configuration and key management
  • SSL Management: SSL certificate lifecycle and ACME integration
  • System Group Management: Complete system user and group management
  • Task Log Management: Task execution logs and history
  • Terminal Management: SSH session and command execution
  • Toolbox Management: System tools and utilities
  • Update Management: System update and upgrade management
  • User Management: Authentication, roles, and permissions
  • Website Management: Full website, domain, SSL, and proxy management

๐Ÿ”ง Architecture Highlights

Complete Data Model Coverage (60+ files):

  • common_models.dart - Shared models (OperateByID, PageResult, etc.)
  • ai_models.dart - AI and Ollama management models
  • app_models.dart, app_config_models.dart, app_store_models.dart - Application management
  • auth_models.dart - Authentication and session models
  • backup_account_models.dart, backup_models.dart, backup_request_models.dart - Backup operations
  • command_models.dart - Command execution models
  • container_models.dart, container_extension_models.dart - Container lifecycle and resources
  • cronjob_models.dart + 4 related files - Complete cronjob management
  • dashboard_models.dart - Dashboard and overview models
  • database_models.dart, database_option_models.dart - Database management with enums
  • disk_management_models.dart - Disk operations models
  • docker_models.dart - Docker service models
  • file_models.dart, file_transfer_models.dart - File operations and transfers
  • firewall_models.dart - Firewall rules and port management
  • host_models.dart + 3 related files - Complete host management
  • logs_models.dart - Comprehensive logging system models
  • monitoring_models.dart - System metrics and alerts
  • openresty_models.dart - OpenResty configuration models
  • process_models.dart + 2 related files - Process management
  • runtime_models.dart - Runtime environment models
  • script_library_models.dart - Script management models
  • security_models.dart - Security scanning and access control
  • setting_models.dart - System configuration models
  • snapshot_models.dart - Backup snapshot models
  • ssh_*.dart (4 files) - Complete SSH management
  • ssl_models.dart - SSL certificate and ACME models
  • system_group_models.dart - System group management
  • task_log_models.dart - Task execution logs
  • terminal_models.dart - Terminal and SSH session models
  • toolbox_models.dart, tool_models.dart - System tools
  • update_models.dart, upgrade_models.dart - Update management
  • user_models.dart - User authentication and roles
  • website_models.dart, website_group_models.dart - Website management
  • Plus specialized subdirectories: ai/, file/, runtime/ for complex models

Consistent Patterns:

  • All APIs use ApiConstants.buildApiPath() for /api/v2 prefix
  • Strong-typed request/response models with Equatable
  • Unified error handling and response parsing
  • Consistent parameter naming and documentation
  • Standardized async/await patterns

๐Ÿ“‹ Prerequisites

  • Flutter 3.16+ or later
  • Dart 3.6+
  • Access to a 1Panel server with API access enabled

๐Ÿš€ Getting Started

  1. Clone the repository

    git clone <repository-url>
    cd 1Panel-Client
  2. Install dependencies

    flutter pub get
  3. Configure your 1Panel server

    • Add server configuration in the app settings
    • Ensure API access is enabled on your 1Panel server
    • Get your API key from the 1Panel admin panel (Settings โ†’ API Interface)
    • Authentication: Uses API Key + Timestamp (MD5 token), no username/password required
      • Token format: MD5("1panel" + apiKey + timestamp)
      • Headers: 1Panel-Token and 1Panel-Timestamp
  4. Run the application

    # Debug mode
    flutter run
    
    # Release mode
    flutter run --release

๐Ÿ“ฑ Platform Support

  • โœ… Android: Full support
  • โœ… iOS: Full support
  • โœ… Web: Supported (with limitations)
  • โœ… Windows: Supported (with limitations)
  • โœ… macOS: Supported (with limitations)

๐Ÿ—๏ธ Project Structure

lib/
โ”œโ”€โ”€ api/v2/              # Type-safe API clients (1Panel V2 APIs) - 34 modules
โ”‚   โ”œโ”€โ”€ ai_v2.dart       # AI management API โœ…
โ”‚   โ”œโ”€โ”€ app_v2.dart      # Application management API โœ…
โ”‚   โ”œโ”€โ”€ auth_v2.dart     # Authentication API โœ…
โ”‚   โ”œโ”€โ”€ backup_account_v2.dart  # Backup account API โœ…
โ”‚   โ”œโ”€โ”€ command_v2.dart         # Command management API โœ…
โ”‚   โ”œโ”€โ”€ compose_v2.dart         # Docker Compose API โœ…
โ”‚   โ”œโ”€โ”€ container_v2.dart       # Container management API โœ…
โ”‚   โ”œโ”€โ”€ cronjob_v2.dart         # Cronjob management API โœ…
โ”‚   โ”œโ”€โ”€ dashboard_v2.dart       # Dashboard API โœ…
โ”‚   โ”œโ”€โ”€ database_v2.dart        # Database management API โœ…
โ”‚   โ”œโ”€โ”€ disk_management_v2.dart # Disk management API โœ…
โ”‚   โ”œโ”€โ”€ docker_v2.dart          # Docker service API โœ…
โ”‚   โ”œโ”€โ”€ file_v2.dart            # File management API โœ…
โ”‚   โ”œโ”€โ”€ firewall_v2.dart        # Firewall management API โœ…
โ”‚   โ”œโ”€โ”€ host_v2.dart            # Host management API โœ…
โ”‚   โ”œโ”€โ”€ host_tool_v2.dart       # Host tools API โœ…
โ”‚   โ”œโ”€โ”€ logs_v2.dart            # Logging system API โœ…
โ”‚   โ”œโ”€โ”€ monitor_v2.dart         # Monitoring API โœ…
โ”‚   โ”œโ”€โ”€ openresty_v2.dart       # OpenResty API โœ…
โ”‚   โ”œโ”€โ”€ process_v2.dart         # Process management API โœ…
โ”‚   โ”œโ”€โ”€ runtime_v2.dart         # Runtime management API โœ…
โ”‚   โ”œโ”€โ”€ script_library_v2.dart  # Script library API โœ…
โ”‚   โ”œโ”€โ”€ setting_v2.dart         # Settings API โœ…
โ”‚   โ”œโ”€โ”€ snapshot_v2.dart        # Snapshot API โœ…
โ”‚   โ”œโ”€โ”€ ssh_v2.dart             # SSH management API โœ…
โ”‚   โ”œโ”€โ”€ ssl_v2.dart             # SSL management API โœ…
โ”‚   โ”œโ”€โ”€ system_group_v2.dart    # System group API โœ…
โ”‚   โ”œโ”€โ”€ task_log_v2.dart        # Task log API โœ…
โ”‚   โ”œโ”€โ”€ terminal_v2.dart        # Terminal API โœ…
โ”‚   โ”œโ”€โ”€ toolbox_v2.dart         # Toolbox API โœ…
โ”‚   โ”œโ”€โ”€ update_v2.dart          # Update management API โœ…
โ”‚   โ”œโ”€โ”€ user_v2.dart            # User management API โœ…
โ”‚   โ”œโ”€โ”€ website_v2.dart         # Website management API โœ…
โ”‚   โ””โ”€โ”€ website_group_v2.dart   # Website group API โœ…
โ”œโ”€โ”€ core/                # Core functionality
โ”‚   โ”œโ”€โ”€ config/         # Application configuration
โ”‚   โ”‚   โ”œโ”€โ”€ api_constants.dart    # API constants and paths โœ…
โ”‚   โ”‚   โ”œโ”€โ”€ api_config.dart       # API configuration management โœ…
โ”‚   โ”‚   โ””โ”€โ”€ logger_config.dart    # Logger configuration โœ…
โ”‚   โ”œโ”€โ”€ network/        # Networking layer
โ”‚   โ”‚   โ”œโ”€โ”€ dio_client.dart       # Dio HTTP client wrapper โœ…
โ”‚   โ”‚   โ”œโ”€โ”€ network_exceptions.dart # Custom exception types โœ…
โ”‚   โ”‚   โ””โ”€โ”€ interceptors/         # Request interceptors
โ”‚   โ”‚       โ”œโ”€โ”€ auth_interceptor.dart   # 1Panel authentication โœ…
โ”‚   โ”‚       โ”œโ”€โ”€ logging_interceptor.dart # Request/response logging โœ…
โ”‚   โ”‚       โ”œโ”€โ”€ retry_interceptor.dart   # Automatic retry โœ…
โ”‚   โ”‚       โ””โ”€โ”€ business_response_interceptor.dart # Business logic handling โœ…
โ”‚   โ”œโ”€โ”€ services/       # Core services
โ”‚   โ”‚   โ””โ”€โ”€ logger/
โ”‚   โ”‚       โ”œโ”€โ”€ logger_service.dart  # Unified logging with IP masking โœ…
โ”‚   โ”‚       โ”œโ”€โ”€ log_file_manager_service.dart # Log file management โœ…
โ”‚   โ”‚       โ””โ”€โ”€ log_preferences_service.dart  # Log preferences โœ…
โ”‚   โ””โ”€โ”€ i18n/           # Internationalization
โ”‚       โ””โ”€โ”€ app_localizations.dart   # Localizations โœ…
โ”œโ”€โ”€ data/               # Data layer
โ”‚   โ””โ”€โ”€ models/         # Strong-typed data models (60+ files)
โ”‚       โ”œโ”€โ”€ common_models.dart       # Shared models โœ…
โ”‚       โ”œโ”€โ”€ ai_models.dart           # AI management models โœ…
โ”‚       โ”œโ”€โ”€ app_models.dart          # Application models โœ…
โ”‚       โ”œโ”€โ”€ auth_models.dart         # Authentication models โœ…
โ”‚       โ”œโ”€โ”€ backup_account_models.dart # Backup models โœ…
โ”‚       โ”œโ”€โ”€ container_models.dart    # Container models โœ…
โ”‚       โ”œโ”€โ”€ cronjob_models.dart      # Cronjob models โœ…
โ”‚       โ”œโ”€โ”€ dashboard_models.dart    # Dashboard models โœ…
โ”‚       โ”œโ”€โ”€ database_models.dart     # Database models โœ…
โ”‚       โ”œโ”€โ”€ file_models.dart         # File management models โœ…
โ”‚       โ”œโ”€โ”€ host_models.dart         # Host management models โœ…
โ”‚       โ”œโ”€โ”€ logs_models.dart         # Logging system models โœ…
โ”‚       โ”œโ”€โ”€ system_group_models.dart # System group models โœ…
โ”‚       โ””โ”€โ”€ ... (50+ other model files) # Complete model coverage
โ”œโ”€โ”€ features/           # Feature modules
โ”‚   โ”œโ”€โ”€ ai/             # AI management feature
โ”‚   โ”œโ”€โ”€ dashboard/      # Dashboard feature
โ”‚   โ””โ”€โ”€ settings/       # Settings feature
โ”œโ”€โ”€ pages/              # UI pages
โ”‚   โ”œโ”€โ”€ server/         # Server configuration pages
โ”‚   โ””โ”€โ”€ settings/       # Settings pages
โ”œโ”€โ”€ shared/             # Shared components
โ”‚   โ””โ”€โ”€ widgets/        # Reusable UI components
โ”‚       โ””โ”€โ”€ app_card.dart           # Material Design card
โ””โ”€โ”€ main.dart           # Application entry point

๐Ÿ”ง Development

Common Commands

# Install dependencies
flutter pub get

# Run the app in debug mode
flutter run

# Run the app in release mode
flutter run --release

# Run tests
flutter test

# Analyze code for issues
flutter analyze

# Build for production
flutter build apk --release
flutter build appbundle

Code Generation

The project uses Retrofit for type-safe API clients. After modifying API definitions, run:

flutter packages pub run build_runner build

Logging

The app uses a comprehensive logging system with appLogger. Logs are:

  • Filtered by build mode (verbose in debug, minimal in release)
  • Categorized by package for easy filtering
  • Structured with proper formatting and context

๐Ÿ“ Development Notes

Network Requests

All network requests go through the modern DioClient with:

  • Automatic retry (3 attempts with exponential backoff)
  • Error handling with custom exception types
  • Request logging (debug mode only)
  • 1Panel Server Authentication with automatic MD5 token generation and signature verification
  • API Path Management with automatic /api/v2 prefix handling

API Integration

The app integrates with 1Panel V2 API using:

  • Type-safe clients generated by Retrofit
  • 1Panel-Specific Authentication:
    • MD5 hash generation: MD5("1panel" + apiKey + timestamp) (matches server implementation)
    • Automatic timestamp and signature headers (1Panel-Token, 1Panel-Timestamp)
    • Dynamic token refresh and validation
    • API Path Prefix: All endpoints use /api/v2 prefix
  • Comprehensive error handling for network issues
  • Multi-server support for managing multiple 1Panel instances

1Panel Authentication Flow

  1. Request Preparation: Each API request automatically includes:

    • 1Panel-Token: MD5 hash of ("1panel" + apiKey + timestamp)
    • 1Panel-Timestamp: Current timestamp in seconds (server requirement)
    • Content-Type: application/json
    • Accept: application/json
    • User-Agent: 1Panel-Flutter-App/1.0.0
  2. MD5 Token Generation (matching server-side implementation):

    // Server expects: MD5("1panel" + apiKey + timestamp)
    final authString = '1panel$apiKey$timestamp';
    final token = md5.convert(utf8.encode(authString)).toString();
  3. API Path Structure: All endpoints use /api/v2 prefix:

    // Example: /api/v2/ai/ollama/model
    final fullPath = '/api/v2$endpoint';
  4. Automatic Header Injection: All required headers are automatically added to every request

Code Quality

  • No print statements: Uses the unified logging system
  • Type safety: Retrofit-generated API clients
  • Error handling: Comprehensive exception handling
  • Testing: Mockito for testing network operations
  • Code organization: Clean architecture with clear separation of concerns

๐Ÿ“„ Documentation

User Documentation

API Documentation

Development Documentation

๐Ÿค Contributing

  1. Follow the established code conventions
  2. Use the unified logging system (no print statements)
  3. Write tests for new features
  4. Update documentation as needed
  5. Follow the clean architecture principles

๐Ÿ“„ License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).

License: GPL v3

What does GPL-3.0 mean?

  • โœ… Free to use - Use this software for any purpose
  • โœ… Free to study - Access and study the source code
  • โœ… Free to share - Redistribute copies of the software
  • โœ… Free to modify - Modify and distribute your modifications
  • โš ๏ธ Must disclose source - If you distribute this software or derivatives, you must provide the source code
  • โš ๏ธ Same license - Derivative works must be licensed under GPL-3.0
  • โš ๏ธ State changes - You must document changes you make to the software

See LICENSE for the full license text.

๐Ÿ”— Related Projects

About

๐Ÿ“ฑ 1Panel ็ฌฌไธ‰ๆ–นๅ…จๅนณๅฐๅฎขๆˆท็ซฏ (Flutter) | ๐Ÿ–ฅ๏ธ Unofficial 1Panel multi-platform client with free multi-server support (OpenAPI)

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors