Use this skill whenever the user discusses application architecture, clean architecture, separating business logic from UI, or cross-platform/WASM-based development. It enforces the 'Headless Core & Passive View' pattern, ensuring that the 'Core' (Business Logic) is platform-agnostic and the 'View' (UI) is a 'Humble Object' that only reflects state.
95
Quality
93%
Does it follow best practices?
Impact
99%
1.13xAverage score across 5 eval scenarios
The system administrators need a way to view the latest system logs in their dashboard. The logs are stored in a database and contain a mix of information, including user actions, system events, and some potentially sensitive technical details like internal API keys.
We need to implement a feature that fetches and displays the last 5 logs for the admin.
The security requirements are paramount here. We must ensure that the UI never has direct access to the database or any sensitive information. The database connection and the logic for fetching and sanitizing the logs must be kept in the core application logic. The UI should only receive a "safe" version of the log data that is ready for display.
Please implement the backend logic to fetch and sanitize the logs, the bridge for data transport, and a placeholder for the log viewer UI.
The output should include: