How tahadashti-gd/fluxguard works
Main Components
• Core Engine: At the heart of FluxGuard is the FluxGuard.Core module, which contains:
• FLuxModules (e.g., FileExplorerModule, ManageAppsModule, PowerModule, SecurityModule, StatusModule, TelegramFileHandlerModule) that encapsulate discrete functionalities.
• Models (e.g., configuration and settings models) to represent data.
• Services (e.g., CommandHandler, ConfigService, LanguageService, LogService, SettingService, TelegramClientService, TelegramKeyboardService) that provide domain logic, handle communication with Telegram, manage logging, configuration, etc.
• Utilities for common helper functions (such as JSON element conversion and logging).
• Command Line Interface (CLI): Found under FluxGuard/CLI, it functions as the manual control interface to start, stop, and manage bot operations.
• Graphical User Interface (GUI): While somewhat less mature, the GUI project (in folder GUI) handles a more visual interaction (e.g., screenshot capturing) and possibly future advanced functionalities.
• Resources: Configuration files (config.json, setting.json) and language files enable customization (multilingual support) and secure operation.
• External Communication: Interaction with Telegram’s HTTPS API ensures secure command and control messaging.
Relationships and Interactions
– The CLI and (upcoming) GUI serve as external interfaces that make calls into the Core services.
– Within FluxGuard.Core, FLuxModules use the Services to execute commands, manage system state, and interact with the operating system.
– Config and Setting models are loaded via their respective services from the JSON files in Resources/Data.
– LanguageService interacts with language files to provide multi-language support for user operations.
– The TelegramClientService manages the secure data exchange between your system and Telegram’s Bot API.
– The CommandHandler orchestrates requests coming from either the Telegram interface (bot commands) or the CLI interface.
Architectural Patterns and Design Principles
– Modularity: Each core functionality is organized within its own module (the FLuxModules), which makes the system scalable and easier to maintain.
– Separation of Concerns: Clear boundaries exist between user interfaces (CLI/GUI), business logic (Core modules and Services), and configuration (Resources folder).
– Dependency Injection or Service Locator (likely via .NET conventions): Ensures that service classes (such as LogService and ConfigService) can be reused and replaced as needed without tight coupling.
Technologies and Frameworks
– The solution is based on .NET. The command and GUI projects reference and depend on FluxGuard.Core.
– It leverages Telegram’s HTTPS API for secure communications.
– JSON is extensively used for configuration and language resources.