$ show Tong89/smartNode
SmartNode is a satellite relay simulation platform for space-based data backhaul, combining a Flask REST API backend with a Vue 3 frontend that visualizes satellite constellations on a Cesium 3D globe. It simulates LEO/MEO/GEO satellites, ground stations, and relay links, processing data transmission requests with configurable QoS, security, and value profiles. The backend implements orbital propagation (SGP4/TLE, Keplerian elements), ITU-R link budget models (rain attenuation, gaseous absorption, laser ISL), and scheduling strategies (GreedyMaxRate, QoS-aware admission control, handover with hysteresis). Results are persisted in SQLite and an append-only event log, with real-time updates pushed via SSE. The platform includes a full observability stack (Prometheus, Grafana, OpenTelemetry), containerized deployment, and extensive testing (unit, integration, property-based, golden regression, load). While primarily an application, it incorporates significant data/research components in orbital mechanics, communications, and scheduling algorithms, making it a hybrid but application-dominant project.
The LLM identified 6 files worth highlighting for reuse:
Implements a sliding window rate limiter with zero external dependencies, supporting per-client and global limits. Uses a fixed-size deque of timestamps for O(1) window decimation and provides a decorator and class-based interface. Easily extractable for any Flask or WSGI application.
Standardizes all API responses into a consistent envelope with fields: code, data, message, request_id, and timestamp. Includes a helper function to generate success/error envelopes and handles traceback capture for internal errors. Can be reused in any REST API to enforce a uniform response format.
Provides a unified error handling mechanism for the Flask app, including custom exception classes, a global error handler, and sanitization of error messages to avoid leaking internal details. Supports structured logging and different error levels. Independently usable in any Flask project.
Implements satellite link budget calculations following ITU-R recommendations (P.838, P.618) for rain attenuation, gaseous absorption, and free-space path loss. Includes modulation selection based on Eb/N0 thresholds, C/N0 calculation, and Shannon capacity. Self-contained module that can be extracted for any satellite communications simulation.
Implements a handover controller for satellite link switching with hysteresis thresholds, minimum dwell time, and cooldown periods. Uses a state machine pattern to avoid ping-pong effects. Contains configurable parameters and a clean interface for integration into any scheduling system.
A Vue 3 composable that manages light/dark theme toggling with CSS custom properties, persistent storage in localStorage, and reactive binding. Provides a simple toggle function and a computed isDark property. Can be extracted directly into any Vue 3 project for theme switching.