How sagarreddypatil/pspl_cms_gsesoftware works
Main Components
• CommandNet Components:
• cmdnet-v2-cli: A command-line interface utilizing the cmdnet library.
• cmdnet-v2-server: An HTTP API that uses the cmdnet library to expose command functionalities.
• SensorNet Components:
• sensornet-server-cpp: A C++ based server handling sensor data (with calibration, sensors, and UDP packet processing).
• sensornet-server: A TypeScript/Python-hybrid service providing data wiring, using WebSockets and interacting with InfluxDB.
• PSPieChart: A web-based mission control frontend application (built with React/TypeScript, Vite, Tailwind CSS) which integrates plugins for SensorNet and, eventually, CommandNet.
• PocketBase: A component for database/migration management, suggesting it may function as a backend for user or project data.
• Docker & CI/CD: Presence of Dockerfiles, docker-compose files, and GitHub workflows indicate containerization and continuous integration for deployment.
Out Relationships and Data Flow
• The Firmware subsystem runs on the embedded hardware, potentially sending commands and sensor readings.
• SensorNet servers (both C++ and Node/TypeScript based) handle UDP sensor data and route them via WebSockets, with InfluxDB (and possibly PocketBase) as the storage backend.
• The cmdnet components (CLI and HTTP API server) form the command/control side and expose operations over the network.
• PSPieChart interacts with the SensorNet services (and eventually with cmdnet-server) to display mission control information, charts, and provide user interaction.
• Docker orchestrates these services, each deployed in their containers, indicating clear “service boundaries”.
Architectural Patterns and Principles
• Microservices/Component-Based Architecture: Each major piece (cmdnet, sensornet, frontend, firmware) forms an independent service.
• Containerization: Use of Dockerfiles and docker-compose for managing dependencies and ensuring reproducibility.
• Separation of Concerns: Clear division between firmware, command control, sensor data routing, and web presentation.
• Integration through APIs and WebSockets: The backend services interact with frontends (PSPieChart) using standard web protocols.
Technologies and Frameworks
• Embedded/PlatformIO for firmware.
• Python (for cmdnet and its server, using Python 3.10+).
• Node.js and TypeScript in both the PSPieChart frontend and sensornet-server.
• Docker and docker-compose for containerization.
• InfluxDB (for time-series sensor data) and PocketBase (for additional data management).
• WebSockets for real-time data communication.
• Data flow from the firmware to the SensorNet servers.
• Command flows between cmdnet CLI and cmdnet server.
• Interaction between sensor servers and the frontend over WebSockets/HTTP.
• Docker orchestration controlling service startup across containers.
• Hardware/embedded components.
• Backend services (Python, C++ and Node services).
• Frontend/UI components.
• Infrastructure (Docker, InfluxDB, CI/CD pipelines).
Additional Clarifications
• To include any integration points with databases (InfluxDB, PocketBase) that are implied by migration files and related Docker settings.
• Recognize that while PSPieChart is the primary UI for the mission control software, it integrates plugins from SensorNet (and eventually cmdnet) – ensure this coupling is clearly depicted.