refactor: establish feature application service layout

This commit is contained in:
leefer
2026-07-29 18:00:19 +08:00
parent 367fe71fbf
commit b0cbd25f64
13 changed files with 432 additions and 329 deletions
@@ -0,0 +1,28 @@
# Stage 10: Feature Application Service Layout
Date: 2026-07-29
## Result
- Created the governed `backend/features/<feature>` source boundary.
- Moved alert behavior into the alerts feature.
- Moved trade-journal behavior into the review feature.
- Moved strategy-tracking behavior into the screener feature.
- Changed the application container to import feature-owned services directly.
- Reduced the former top-level service modules to compatibility exports, preserving existing
imports without maintaining duplicate implementations.
- Added dependency tests that prevent feature services from importing HTTP delivery code or
concrete market-provider adapters.
## Template
Each migrated feature owns its application behavior and depends on repository or gateway
ports. HTTP delivery and background jobs may invoke the service, but neither may become the
owner of its rules. The same layout is now available for the remaining market, account,
Mentor, Wentian, and screener services.
## Compatibility
No route, response shape, persisted data, service method, or top-level import path changes in
this stage. Compatibility exports are removed only after all internal and external callers
use the feature packages.