CHULIYING
Energy platform architecture
A multi-module energy BI platform where I lead the frontend team. The business changes faster than a release cycle, so pages are resolved from configuration, and the AI assistant is authorized before any model runs. Company project; names and data are omitted.
01Resolve the page from config
The backend-for-frontend serves menu and layout config, so one page component renders any route in a four-level hierarchy and pages of the same kind share a template.
02Load blocks independently
Each card, chart, and table fetches its own data, so the page renders progressively instead of waiting for the slowest query.
03Two kinds of requests
Both go through the backend-for-frontend, never straight from the browser to a service.
Dashboard data
Data routes return what each block needs for the current view.
Assistant chat
One streaming path forwards the user's identity to the Rust agent runtime.
04Authorize before the model
The Rust agent runtime validates input, resolves the user's permissions, and narrows data tools; it fails closed when identity is unclear.
05Render safely
Streamed output is sanitized: only same-origin links and images render, and an expired session returns a recoverable 401.
Delivery & verification
Separate from the request path: every pull request is type-checked, linted, and tested in CI before it reaches an environment, and dashboards and the assistant ship through the same gates. With configuration-driven pages and AI-assisted development, a new dashboard page now takes about two days instead of two weeks.