Repository navigation
Closed
8 / 88 of 8 issues completedClosed
8 / 88 of 8 issues completed
Copy link
Labels
- Developer -Torrust Improvement ExperienceAPIRelated to the Tracker APICode Cleanup / RefactoringTidying and Making NeatEPICContains several subissues
Description
Goal
Progressively migrate all remaining REST API contexts (health_check, whitelist, auth_key, stats) from direct tracker-internal wiring to the contract-first layered architecture (protocol → application → runtime-adapter → axum transport), following the pattern validated by #1930 (SI-33) PoC.
Why This Is Needed
#1930 validated the contract-first architecture with a single endpoint (torrent detail). The remaining contexts still have the old coupling:
- Axum handlers call tracker internals directly (
tracker-core,udp-core,http-core,udp-server). - DTO/response types are defined locally in the Axum server, not in
rest-api-protocol. - No port traits or use-case services exist for these contexts.
- The forbidden dependency edges (
axum-rest-api-server → tracker-coreetc.) still exist for non-torrent contexts.
Migrating all contexts to the new architecture will:
- Allow removing 7+ internal crate dependencies from
axum-rest-api-server. - Make each context testable at the application layer without Axum.
- Provide a clear path toward a tracker-agnostic REST API standard.
- Complete the architectural vision started by SI-33.
Sub-issues
- SI-1: Migrate
health_checkcontext - SI-2: Migrate
whitelistcontext - SI-3: Migrate
auth_keycontext - SI-4: Migrate
statscontext - SI-5: Deprecate
rest-api-coreand remove from workspace - SI-6: Introduce
ApiClient— a high-level typed client over protocol DTOs
Migration Order
- SI-1 — health_check (small, no tracker deps)
- SI-2 — whitelist (medium, only
tracker-core) - SI-3 — auth_key (medium,
tracker-core+clock) - SI-4 — stats (large, 5+ crate deps, 28-field DTO, Prometheus)
- SI-5 — deprecate
rest-api-core(cleanup after all contexts migrated) - SI-6 — introduce
ApiClient(typed wrapper overApiHttpClient)
Success Criteria
- All 10 non-torrent Axum handler functions dispatch through application use-case services.
- All response DTOs live in
rest-api-protocol; none are defined locally in Axum server. - All direct
tracker-core,udp-core,http-core,udp-server,rest-api-core,swarm-coordination-registryimports are removed fromaxum-rest-api-server. deny.tomllayer bans enforce the new dependency rules.- Pre-commit and pre-push checks pass.
- Integration tests continue to pass without behavioural changes.
Sub-issues
Collapse Sub-issuesSub-issues
Loading 8 sub-issues
Metadata
Metadata
Assignees
Labels
- Developer -Torrust Improvement ExperienceAPIRelated to the Tracker APICode Cleanup / RefactoringTidying and Making NeatEPICContains several subissues
Activity
docs(1938): add EPIC and sub-issue specs for REST API contract-first …
Merge #1936: feat(rest-api): adopt contract-first REST API architectu…
Merge #1946: feat(rest-api-protocol): migrate health_check context to…
Merge #1947: feat(rest-api-application): migrate whitelist context to…
4 remaining items
Merge #1960: chore(docs): close SI-1 through SI-5 issue specs and upd…
josecelano commentedon Jul 13, 2026
All sub-issues completed.
chore(issues): archive closed issue specs torrust#1447, torrust#1459, t…
Merge #1984: chore(issues): archive 10 closed issue specs from docs/i…
docs(issues): [torrust#1669] sync EPIC spec with current workspace state
Merge #2441: docs(issues): [#1669] sync EPIC spec with current worksp…
docs(issues): [torrust#2446] add issue specification for torrust#2446
docs(issues): [torrust#2446] add issue specification for torrust#2446
Merge #2447: docs(issues): [#2446] add issue specification for #2446
docs(issues): [torrust#2446] add 2026-10-06 workspace coupling report
docs(issues): [torrust#2446] add 2026-10-06 workspace coupling report
docs(issues): [torrust#2446] add 2026-10-06 workspace coupling report
Merge #2462: docs(issues): [#2446] establish the workspace baseline a…