How openfactorioservermanager/factorio-server-manager works
Main Components
A. Frontend Layer:
• React-based UI (located in /ui directory)
• Key views: Console, Controls, Mods, Saves, User Management
• WebSocket client for real-time updates
• REST API client
B. Backend Layer:
• Go-based server (located in /src directory)
• WebSocket hub for real-time communication
• API handlers for different functionalities
• Authentication system
C. Core Functionality Layer:
• Factorio server management
• Save file management
• Mod management
• Configuration management
D. External Integrations:
• Factorio game server
• Factorio mod portal
• File system for saves and mods
[Frontend Layer]
• (WebSocket + REST API)
• v
[Backend Layer] <-----> [External Services]
• Factorio Game Server
• Factorio Mod Portal
• v
[File System]
• Saves
• Mods
• Configs
Key Relationships to Highlight
A. Client-Server Communication:
• REST API calls between UI and backend
• WebSocket connections for real-time updates
• Authentication flow
B. Server-Game Integration:
• RCON communication with Factorio server
• Server control mechanisms
• Log management
C. Data Flow:
• Mod management workflow
• Save file handling
• Configuration management
Important Architectural Patterns
• MVC-like pattern in the backend
• Component-based architecture in the React frontend
• WebSocket pub/sub system for real-time updates
• Resource-based API structure
Technical Details
A. Frontend:
• React components hierarchy
• API client structure
• WebSocket client implementation
B. Backend:
• Go API routes and handlers
• WebSocket hub implementation
• Authentication middleware
• Factorio server management logic