How simonbuehler/sunandmoon_backend works
Main Components
a) Frontend Layer:
• Located in the /src directory
• Contains React components (ConfigEditor, QueryEditor)
• Handles user interface and configuration
• Plugin registration and type definitions
b) Backend Layer:
• Located in the /pkg directory
• Contains the core data source implementation
• Models for settings and data structures
• Handles astronomical calculations using Suncalc library
c) External Dependencies:
• Grafana Platform
• Suncalc Go Library
• Frontend dependencies (React, etc.)
[Grafana UI] --> [Plugin Frontend Components]
• ConfigEditor
• QueryEditor
• Type Definitions
[Plugin Backend]
• Data Source Implementation
• Settings Management
• Astronomical Calculations
[Suncalc Library] --> [Plugin Backend]
[Grafana Backend] <--> [Plugin Backend]
Important Relationships to Highlight
• Configuration flow from ConfigEditor to backend settings
• Query flow from QueryEditor through the backend to calculations
• Demonstrate integration points with Grafana platform
Technical Details
• TypeScript/React frontend architecture
• Go backend implementation
• Plugin initialization and lifecycle
• Data flow for different types of astronomical calculations
Deployment Context
• How the plugin integrates within Grafana's plugin system
• Configuration management (provisioning)
• Demonstrate how public dashboard support is achieved
• Backend calculation handling
• Public dashboard support
• Astronomical data processing pipeline
• Configuration management for geographical coordinates
This architecture should be represented in a way that emphasizes the plugin's main selling point: moving calculations to the backend for public dashboard compatibility while maintaining all the astronomical calculation capabilities of the original frontend-only version.