svc-tenders Tender and Auction Route Boundary
Date: 2026-03-16 Sprint: Cleanup Sprint 09
Purpose
This document records the current route-shell shape inside services/svc-tenders/src/server.ts after Sprint 09.
The goal is route boundary clarity, not proof of final domain ownership.
VERIFIED extracted route modules
Tender routes
Responsibilities:
- public tender list/detail reads
- tender submit
- account-scoped tender listing
- admin/internal tender list/detail
- review queue
- approve/reject transitions
- legacy tender event append compatibility endpoint
Tender declaration and evidence routes
Responsibilities:
- declaration draft create/update
- readiness check
- mark ready
- declare
- declaration evidence upload/list/download
Auction read routes
Responsibilities:
- public auction list/detail reads
- internal/admin auction list/detail reads
Auction declaration and output-allocation routes
Responsibilities:
- output allocation admin routes
- auction declaration draft/update/check/ready/declare
- auction declaration evidence upload/list/download
Important ownership note:
- This grouping is a route-shell clarity decision
- It is not proof that
output_allocationsare finally owned by the auction declaration domain - That ambiguity remains explicit in code comments and architecture docs
Other already-extracted route modules still active
- Vacancy:
services/svc-tenders/src/routes/registerVacancyRoutes.ts - Accommodation:
services/svc-tenders/src/routes/registerAccommodationRoutes.ts - ICPI:
services/svc-tenders/src/routes/registerIcpiRoutes.ts - Butkhuzi:
services/svc-tenders/src/routes/registerButkhuziRoutes.ts - KES:
services/svc-tenders/src/routes/registerKesRoutes.ts
What remains in server.ts
Current file:
Remaining responsibilities:
- service bootstrap
- config + pool wiring
- repository/read-model/handler instantiation
- shared auth gate
- shared request parsing helpers
- shared upload helper
- declaration capability helper functions
- portal/detail mapping helpers
/health
Verdict:
- Status:
VERIFIED - System state:
REAL - Boundary state: thinner than before, but still a mixed service shell
Why this matters
Before Sprint 09, server.ts still embedded large tender and auction route clusters directly.
After Sprint 09:
- tender route ownership is visible
- tender declaration/evidence route ownership is visible
- auction read route ownership is visible
- auction declaration/output-allocation route ownership is visible
That makes future extraction prep safer because route groups can now be reasoned about independently.
What this does not claim
This document does not claim:
- that auctions are extraction-ready
- that declaration persistence is fully isolated
- that output allocations have a final owner
- that KES belongs to tenders long-term
Recommended next route-shell step
If Sprint 10 continues route-shell cleanup, the safest next move is:
- extract shared route-support helpers from
server.ts - keep public paths stable
- avoid forcing unresolved ownership decisions into route names