2026-03-09 10:53:23 +08:00
|
|
|
# 🛠️ Technical Debt & Engineering Backlog
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
> **Vision**: Moving from a research script to a production SaaS.
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
---
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-09 10:53:23 +08:00
|
|
|
## 🏛️ System Health: 82%
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
```mermaid
|
|
|
|
|
pie title System Health & Tech Debt
|
2026-03-09 10:53:23 +08:00
|
|
|
"Stable Engine" : 82
|
|
|
|
|
"Entitlement/Payments Debt" : 8
|
|
|
|
|
"Test/Replay Debt" : 6
|
|
|
|
|
"Observability Debt" : 4
|
2026-03-06 19:16:48 +08:00
|
|
|
```
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-09 10:53:23 +08:00
|
|
|
The core weather engine and React dashboard runtime are now stable, but product-layer infrastructure debt is still material.
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
### Current Stable Modules
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
- [x] Multi-source Weather Aggregation
|
|
|
|
|
- [x] DEB Blending Algorithm
|
|
|
|
|
- [x] Proactive Telegram Alert Engine
|
|
|
|
|
- [x] Vercel Dashboard Infrastructure
|
2026-03-10 09:02:56 +08:00
|
|
|
- [x] React component-driven dashboard runtime
|
|
|
|
|
- [x] Internationalization (i18n) & Polymarket P0 Data Merge
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
---
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
## 🔴 High Priority: Immediate Focus
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
| Debt Item | Impact | Suggested Fix |
|
|
|
|
|
| :--------------------- | :-------------------------------------------------- | :--------------------------------------------------------------- |
|
|
|
|
|
| **Monolithic Bot** | `bot_listener.py` is hard to test and evolve. | Isolate UI interaction from business logic into `src/analysis`. |
|
|
|
|
|
| **Subscription Store** | No persistent record of who has paid. | Migrate from in-memory user checks to **Supabase/PostgreSQL**. |
|
|
|
|
|
| **Alert Transparency** | Operators cannot easily audit "why" an alert fired. | Add an `Evidence` metadata block to all internal alert payloads. |
|
2026-03-10 09:02:56 +08:00
|
|
|
| **Entitlement Guard** | Dashboard routes are public by default. | Add JWT/session gating in Next.js middleware + backend checks. |
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
---
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
## 🟡 Medium Priority: Quality of Life
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-10 09:02:56 +08:00
|
|
|
| Debt Item | Impact | Suggested Fix |
|
|
|
|
|
| :------------------------- | :-------------------------------------------------- | :--------------------------------------------------------------------------- |
|
|
|
|
|
| **Hard-coded Thresholds** | Modification requires code changes (e.g., 5s CD). | Extract all business constants into a structured `config.yaml`. |
|
|
|
|
|
| **Simulation Harness** | No way to "replay" a rainy day to test alert logic. | Build a `ReplayEngine` using `data/daily_records.json`. |
|
|
|
|
|
| **Backend Naming** | Artifacts of "market price" logic remain in naming. | Systematic refactor of variable names to reflect weather-intelligence focus. |
|
|
|
|
|
| **Chart Regression Tests** | UI relies on custom Chart.js lifecycles. | Add snapshot + interaction tests for chart datasets and legends. |
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
---
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
## 🟢 Low Priority: Optimization
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
| Debt Item | Impact | Suggested Fix |
|
|
|
|
|
| :------------------------- | :---------------------------------------------- | :------------------------------------------------------------- |
|
|
|
|
|
| **Serverless Cold Starts** | Initial Vercel API calls can be slow. | Implement edge-cache or warming cron for major city endpoints. |
|
|
|
|
|
| **Local SQLite Files** | Not compatible with Vercel's ephemeral storage. | Full transition to a remote DB (Supabase/Redis). |
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
---
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
## 🗓️ Next Milestones
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
1. **DB Integration**: Connect Supabase to `src/database/db_manager.py`.
|
2026-03-09 10:53:23 +08:00
|
|
|
2. **Entitlement Layer**: Enforce paid-access middleware on dashboard and API proxy routes.
|
|
|
|
|
3. **Alert Transparency**: Append logic metrics (slope, lead delta, advection factors) to push payloads.
|
|
|
|
|
4. **Replay & QA**: Add deterministic replay tests for map/panel/modal interaction regressions.
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
---
|
2026-03-04 02:35:35 +08:00
|
|
|
|
2026-03-10 09:02:56 +08:00
|
|
|
**📅 Last Updated**: 2026-03-10
|