Case studies
Technical case studies from stockflow.
Each case study focuses on one technical decision and its evidence.
- feature Dynamic Module-Based Navigation The FE sidebar is built from the BE response so the menu always reflects the current user's role and module access.
- feature Role-Based Access Control - Module-Level Granularity mst_modules + role_module pivot + module:xxx middleware - CRUD-level granularity without hardcoded role checks.
- challenge Stock Movement Integrity - Race-Safe & Audit Chain lockForUpdate + immutable movement_logs + delta-based recompute for stock consistency.
- feature Grouped Reporting - Consistent Aggregation report-grouped endpoint with filters consistent with the raw report, so the FE does not need two parsers.
- challenge Test Database Safety - Guard Before RefreshDatabase TestCase guard validates APP_ENV and DB_DATABASE before RefreshDatabase wipes the DB.
- security Security Hardening - Formula Injection, Self-Delete, Last-Admin Four targeted security patches and one custom exception handler for consistent JSON responses.