What problem does it solve?
Implementing complex business logic, orchestrating multiple data operations, and managing granular authorization can lead to tangled code and security vulnerabilities. This skill provides patterns for clean, secure, and transactional business logic.
Core Features & Use Cases
- Business Logic Orchestration: Coordinate multiple repository operations to implement complex features and workflows, ensuring coherent application behavior.
- OpenFGA Authorization: Implement robust, relationship-based access control by checking permissions (not roles) via OpenFGA, centralizing and simplifying security.
- Transactional Integrity: Ensure data consistency with explicit rollback mechanisms for multi-step operations, preventing partial updates and data corruption.
- Use Case: Implement a new "transfer wealth" feature. You'll orchestrate updates across wealth and council repositories, ensuring the user has
can_create_wealth permission via OpenFGA, and that the entire operation rolls back if any step fails, guaranteeing data integrity.
Quick Start
Implement a service method to update a user's trust score, ensuring it first checks if the acting user has can_award_trust permission via OpenFGA.