Accommodation Extraction Package
Purpose
This document defines the minimum credible accommodation extraction package based on current code truth.
It does claim accommodation is already extracted.
Resolving locale, route permissions, and workspace projection.
Current scope: Guest
Category: 10_normative | Version: v1.0.0
Owner: DOCUMENT_CUSTODIAN | Review cycle: 90 days
Approval authority: GOVERNANCE_ADMIN
Documentation portal is read-only. Editing and mutation endpoints are disabled.
Kvary platform is originally created in Georgian. Where a Georgian version exists, Georgian is authoritative for platform UI, documentation, and legal interpretation.
Translations into other languages are provided for convenience. Some records may originate in other languages and carry their own source or legal locale for a specific flow, but where a Georgian version is available, the Georgian version prevails for platform-level wording and interpretation.
Metadata incomplete: Document ID, Version, Status, Owner Role, Last Review Date, Next Review Date, Change Log
This document defines the minimum credible accommodation extraction package based on current code truth.
It does claim accommodation is already extracted.
It distinguishes between:
svc-tenders shell| Path | Why it belongs in the extracted runtime | Notes |
| --- | --- | --- |
| services/svc-tenders/src/accommodation/contracts.ts | Accommodation-owned request/response/support contract surface | Route-facing types already live here. |
| services/svc-tenders/src/accommodation/validation.ts | Accommodation-owned payload validation | Draft/update/booking/quote validation is already domain-local. |
| services/svc-tenders/src/accommodation/domain.ts | Accommodation aggregate and mutation rules | Durable listing/booking lifecycle ownership is here. |
| services/svc-tenders/src/accommodation/projections.ts | Accommodation projection maintenance | Needed by write model and preferred reads. |
| services/svc-tenders/src/accommodation/commandHandlers.ts | Accommodation listing + booking write model | Real backend mutation surface. |
| services/svc-tenders/src/accommodation/readModel.ts | Preferred public/detail/booking read repository | Real active read path for listings, quote inputs, and bookings. |
| services/svc-tenders/src/accommodation/ownerReadRepository.ts | Preferred owner listing reads | Real owner-facing read path. |
| services/svc-tenders/src/accommodation/quote.ts | Accommodation-local quote logic | Active route behavior, not generic shell logic. |
| services/svc-tenders/src/routes/registerAccommodationRoutes.ts | Accommodation route registration | Already depends on accommodation-owned handlers/repositories. |
| services/svc-tenders/src/routes/support/accommodationRouteSupport.ts | Accommodation-local route support | Keeps mutation mapping and public payload shaping local. |
| services/svc-tenders/migrations/0041_accommodation_write_model.sql | Canonical write/projection schema start for real accommodation runtime | Strongest move-first migration. |
| services/svc-tenders/migrations/0044_add_details_json_to_views.sql | Accommodation view/read-model enrichment | Accommodation-specific follow-up migration. |
| services/svc-tenders/migrations/0045_change_accommodation_id_to_text.sql | Accommodation schema adjustment for listing/booking IDs | Accommodation-specific and needed by active runtime truth. |
| Path | Shared verdict | Notes |
| --- | --- | --- |
| services/api/src/routes/accommodationsServiceTarget.ts | keep shared | Gateway seam owner for ACCOMMODATIONS_SERVICE_URL ?? TENDERS_SERVICE_URL. |
| services/api/src/routes/accommodations.ts | keep shared | Public gateway proxy façade stays at API layer. |
| services/api/src/routes/accommodation-listings.ts | keep shared | Mutation gateway façade. |
| services/api/src/routes/accommodation-bookings.ts | keep shared | Booking gateway façade. |
| services/api/src/routes/my-accommodation-bookings.ts | keep shared | Authenticated booking-read gateway façade. |
| services/api/src/routes/owner-accommodation-listings.ts | keep shared | Owner-listing gateway façade. |
| services/api/src/routes/owner-accommodation-reservations.ts | keep shared | Owner-reservation gateway façade. |
| shared /auth/me principal resolution contract | keep shared | Shared auth/identity backbone dependency, not accommodation domain ownership. |
| bearer token verification + shared JWT secret contract | keep shared for now | Same extraction pattern as ICPI: shared ingress contract, copied runtime adapter if needed. |
| Path | Why it stays temporarily | Notes |
| --- | --- | --- |
| services/svc-tenders/src/server.ts accommodation wiring | current host remains active | Old host stays until copy-first runtime parity exists. |
| services/svc-tenders/src/routes/support/detailExtractionSupport.ts | still shared with vacancy support | Small helper can be copied into extracted runtime later, but it is not accommodation-only today. |
| services/svc-tenders/src/http/authTypes.ts | current type home is shell-local | A local runtime copy or narrower shared package can come later. |
| services/svc-tenders/src/repository.ts accommodation compatibility methods | older callers still hosted here | No active accommodation route depends on them, but root hosting still exists. |
| services/svc-tenders/migrations/0046_seed_accommodation_data.sql | dev/demo seed decision not yet separated from runtime ownership | Useful fixture, but not proof of canonical runtime migration ownership. |
| Path | Why it is residue | Notes |
| --- | --- | --- |
| services/svc-tenders/src/accommodation/compatibilityReadRepository.ts | legacy accommodations catalog compatibility path | Not the preferred route-time public read path anymore. |
| services/svc-tenders/migrations/0005_vacancies_accommodations.sql | mixed legacy vacancy + accommodation compatibility schema | Too mixed to treat as clean extracted accommodation ownership. |
| services/svc-tenders/migrations/0006_accommodations_detail_payload.sql | legacy compatibility catalog follow-up | Still tied to old accommodations truth. |
| Path | Why it is unresolved | Notes |
| --- | --- | --- |
| services/svc-tenders/migrations/0042_vacancy_accommodation_context.sql | mixed vacancy + accommodation schema change | Cannot move cleanly with accommodation alone yet. |
| services/svc-tenders/migrations/0043_vacancy_accommodation_declaration_details.sql | mixed accommodation + declaration detail shape | Cross-domain ownership still mixed. |
| local outbox_events usage from services/svc-tenders/src/accommodation/commandHandlers.ts | event infrastructure still hosted in svc-tenders assumptions | Real, but not yet an extracted external event contract. |
| root compatibility hosting in services/svc-tenders/src/repository.ts | older accommodation callers still routed through mixed root repository | Needs caller reduction or explicit compatibility retention decision later. |
services/svc-tenders/src/accommodation/compatibilityReadRepository.ts0005, 0006, 0042, and 0043detailExtractionSupport.ts still serves both vacancy and accommodation route supportservices/svc-tenders/src/repository.ts still exists for older consumerssvc-tenders accommodation host as rollback until parity is proven