How pterodactyl/wings works
Main Components
a. Core Components:
• HTTP API Server (router package)
• SFTP Server (sftp package)
• Docker Environment Manager (environment/docker package)
• Server Manager (server package)
• File System Handler (server/filesystem package)
• Backup System (server/backup package)
• Transfer System (server/transfer package)
• WebSocket Handler (router/websocket package)
b. External Integrations:
• Docker Engine
• Panel Communication Interface
• S3 Storage (for backups)
• Local File System
Component Relationships
• ┌─────────────────┐
• Panel API │
• ┬────────┘
• ▼
┌─────────────┐ ┌──────────────┐
• SFTP │◄───────────────────┤ │
• Server │ │ │
• ┘ │ Wings │
• Core │
┌─────────────┐ │ │──────────┐
• WebSocket │◄───────────────────┤ │ │
• Server │ └──────┬───────┘ │
• ┘ │ │
• ▼ ▼
• ┌─────────────────┐ ┌────────────────┐
• Docker Engine │ │ File System │
• ┘ └────────────────┘
Important Architectural Elements to Highlight
a. Service Layer:
• HTTP API endpoints (router package)
• WebSocket handlers for real-time communication
• SFTP server for file management
b. Core Processing:
• Server management and lifecycle control
• Docker container orchestration
• Resource monitoring and statistics collection
c. Storage Layer:
• Local filesystem operations
• Backup management (local and S3)
• Transfer system for server migrations
Implementation Details
• The modular nature of the system (separate packages for different functionalities)
• The event-driven architecture (events package)
• The separation of concerns between server management and container orchestration
• The multiple communication protocols (HTTP, WebSocket, SFTP)
Infrastructure Layer (Docker Engine, S3)
Remember to maintain a balance between showing enough detail to understand the system's architecture while keeping it clean and readable. Focus on the major components and their interactions rather than implementation details.