$ show HUANGKUN-neutrino/solar-ai-gis-platform
This repository is a design portfolio and technical showcase for a solar photovoltaic GIS prospecting and forecasting platform. It does not contain a runnable application; instead, it provides architectural documentation (docs/ARCHITECTURE.md, docs/MODULES.md, docs/AI_FORECASTING.md) and three well-crafted code snippets that demonstrate the engineering patterns behind map-based lead identification, AI roof detection service, and PV generation forecasting. The snippets illustrate professional-level software design: input validation, security boundaries, model routing, fallback strategies, and business logic normalization. The repository serves as a reference for architects and engineers evaluating similar systems, but it is explicitly non-reusable for commercial purposes due to the license restrictions.
The LLM identified 3 files worth highlighting for reuse:
A FastAPI service for roof and PV detection that demonstrates secure image URL handling (whitelist, DNS resolution checks against private IPs), base64 image decoding, model runtime abstraction (YOLO11, U-Net, ONNX), detection post-processing (clamping, label normalization, confidence filtering), and business-oriented result summarization (pv_status, review_required). The RuntimeRegistry pattern allows decoupling model loading from the API layer, making this an easily reusable template for AI inference services.
A JavaScript module that orchestrates the full map-click identification workflow: coordinate normalization (WGS84/GCJ02), parallel calls to reverse geocoding, POI search, and vision AI, then combines results into a structured lead with a calculated score and priority. It demonstrates clean adapter pattern, Promise.allSettled usage, multi-factor scoring (distance, address overlap, contact availability, roof status), and a fallback chain. The logic is self-contained and could be extracted as a reusable service layer for any map-based lead generation system.
A photovoltaic generation forecasting pipeline that converts weather features, capacity, and calendar signals into daily energy and revenue forecasts. It implements a clean feature engineering stage (weather score, season encoding, daylight hours), model resolution with fallback chain (LightGBM, XGBoost, Transformer, formula), and confidence estimation. The pipeline is well-structured with dataclasses, type hints, validation, and a separate evaluation function (MAE, RMSE, MAPE). The pattern is reusable for any time-series forecasting system with multiple model backends.