WorkStay Extraction Prep Map
Purpose
This document records the current extraction-preparation truth for the future accommodation-worker platform that may later become a standalone WorkStay-style runtime.
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 records the current extraction-preparation truth for the future accommodation-worker platform that may later become a standalone WorkStay-style runtime.
It does not claim that a unified WorkStay backend already exists.
It distinguishes between:
Labels used here:
VERIFIEDINFERREDUNVERIFIEDREALMIXEDUI-FIRSTSHELLMISSING| Surface | Current location | Classification | Ownership | Notes |
| --- | --- | --- | --- | --- |
| Accommodation listing write model | services/svc-tenders/src/accommodation/commandHandlers.ts | VERIFIED REAL | accommodation-owned, temporary-hosted-in-svc-tenders | Durable create / update / publish / unpublish flow over accommodation_listings. |
| Accommodation public listing/detail read model | services/svc-tenders/src/accommodation/readModel.ts | VERIFIED REAL | accommodation-owned, temporary-hosted-in-svc-tenders | Active route-time public reads use projection-backed listing/detail views. |
| Accommodation owner listing reads | services/svc-tenders/src/accommodation/ownerReadRepository.ts | VERIFIED REAL | accommodation-owned, temporary-hosted-in-svc-tenders | Owner listing reads are real but intentionally asymmetric from public reads. |
| Accommodation booking / reservation write model | services/svc-tenders/src/accommodation/commandHandlers.ts | VERIFIED REAL | accommodation-owned, temporary-hosted-in-svc-tenders | Booking request / confirm / reject / cancel are durable domain writes. |
| Accommodation booking / reservation reads | services/svc-tenders/src/accommodation/readModel.ts | VERIFIED REAL | accommodation-owned, temporary-hosted-in-svc-tenders | my-accommodation-bookings and owner reservation reads are active preferred reads, not compatibility stubs. |
| Accommodation public compatibility catalog | services/svc-tenders/src/accommodation/compatibilityReadRepository.ts | VERIFIED MIXED | legacy compatibility residue inside future WorkStay candidate surface | Reads legacy accommodations table for older root-repository consumers. |
| Accommodation route module | services/svc-tenders/src/routes/registerAccommodationRoutes.ts | VERIFIED REAL | accommodation-owned, temporary-hosted-in-svc-tenders | Active HTTP registration already uses dedicated command/read repositories instead of root repository methods. |
| Accommodation route support | services/svc-tenders/src/routes/support/accommodationRouteSupport.ts | VERIFIED REAL | accommodation-owned with shared shell ingress | Local mutation mapping + public payload shaping live here; auth/parser ingress still comes from shell. |
| Surface | Current location | Classification | Ownership | Notes |
| --- | --- | --- | --- | --- |
| Vacancy posting write model | services/svc-tenders/src/vacancy/commandHandlers.ts | VERIFIED REAL | vacancy/worker-owned, temporary-hosted-in-svc-tenders | Durable posting draft / update / publish / close / reopen writes over vacancy_postings. |
| Vacancy application write model | services/svc-tenders/src/vacancy/commandHandlers.ts | VERIFIED REAL | vacancy/worker-owned, temporary-hosted-in-svc-tenders | Durable submit / shortlist / reject / accept / withdraw flow over vacancy_applications. |
| Vacancy preferred read model | services/svc-tenders/src/vacancy/readRepository.ts | VERIFIED MIXED | vacancy/worker-owned, temporary-hosted-in-svc-tenders | Active route-time reads are here, but public discovery still unions projection-backed rows with legacy vacancies fallback. |
| Vacancy application compatibility reads | services/svc-tenders/src/vacancy/compatibilityApplicationRepository.ts | VERIFIED MIXED | legacy compatibility residue | Thin wrapper around preferred vacancy reads for older root-repository surfaces. |
| Vacancy public / owner compatibility reads | services/svc-tenders/src/vacancy/compatibilityReadRepository.ts | VERIFIED MIXED | legacy compatibility residue | Compatibility hosting still exists, but active route-time reads do not depend on it. |
| Vacancy route module | services/svc-tenders/src/routes/registerVacancyRoutes.ts | VERIFIED REAL | vacancy/worker-owned, temporary-hosted-in-svc-tenders | Active HTTP registration already depends on dedicated command handlers and preferred read repository. |
| Vacancy route support | services/svc-tenders/src/routes/support/vacancyRouteSupport.ts | VERIFIED REAL | vacancy/worker-owned with shared shell ingress | Capability checks and mutation-error mapping are local; auth/parser ingress remains shell-shared. |
| Surface | Classification | Ownership | Notes |
| --- | --- | --- | --- |
| Accommodation booking writes | VERIFIED REAL | accommodation-owned | Durable and active through AccommodationCommandHandlers. |
| Accommodation booking reads | VERIFIED REAL | accommodation-owned | Uses AccommodationReadRepository, not fake placeholder arrays anymore. |
| Vacancy applications | VERIFIED REAL | vacancy/worker-owned | Durable applicant + owner review flow. |
| Unified stay-work recommendation / assignment backend | VERIFIED MISSING | future WorkStay-candidate-owned | No durable backend boundary found that combines bookings and worker placement into one service contract. |
| Surface | Current location | Classification | Ownership | Notes |
| --- | --- | --- | --- | --- |
| Accommodation catalog nearby vacancy previews | apps/web/src/features/domains/accommodationCatalog.ts | VERIFIED UI-FIRST | future WorkStay-candidate-owned, currently UI-first | Nearby vacancy previews are assembled in frontend catalog helpers, not from backend WorkStay contracts. |
| Vacancy catalog accommodation and transport options | apps/web/src/features/domains/vacancyCatalog.ts | VERIFIED UI-FIRST | future WorkStay-candidate-owned, currently UI-first | Catalog includes accommodation/transport options and policy text, but this is frontend fallback/catalog composition. |
| Workforce portal | apps/web/src/app/[locale]/(portal)/workforce/page.tsx | VERIFIED UI-FIRST | ambiguous future WorkStay-candidate-owned | Page is explicitly backed by frontend mock data and presented as read-only structural input. |
| Map layers for vacancies / accommodations / workforce | apps/web/src/features/map/layers/vacanciesLayer.ts, apps/web/src/features/map/layers/accommodationsLayer.ts, apps/web/src/features/map/layers/workforceLayer.ts | VERIFIED UI-FIRST | future WorkStay-candidate-owned, currently UI-first | All three layers point at frontend mock datasets, not backend spatial APIs. |
| Transport-nearby linkage | apps/web/src/app/[locale]/(portal)/transport/page.tsx | VERIFIED MISSING for WorkStay backend | shared-Kvary / future logistics, not current WorkStay backend | Current transport page is auction/logistics oriented, not accommodation-worker backend logic. |
| Sabre-style travel expansion | no real code found in inspected backend surfaces | VERIFIED MISSING | future platform intent only | No present backend contract or module should be treated as current travel ownership. |
svc-tenders| Hosting point | Classification | Notes |
| --- | --- | --- |
| services/svc-tenders/src/server.ts route composition | VERIFIED SHELL | Vacancy/accommodation route modules are injected from the mixed service shell. |
| services/svc-tenders/src/repository.ts compatibility hosting | VERIFIED MIXED | Root repository still hosts compatibility residue for vacancy/accommodation reads. |
| shared shell auth ingress passed through route support | VERIFIED SHELL | requireServiceAuth, requireActivePrincipal, and parser helpers are still shell-owned. |
| local projection event log in outbox_events | VERIFIED MIXED | Real for vacancy/accommodation, but still hosted inside svc-tenders runtime assumptions and not yet a clean standalone event boundary. |
These dependencies look acceptable to remain shared even after future WorkStay extraction:
services/apiThese do not justify keeping accommodation/vacancy permanently inside svc-tenders.
The following combined platform surface is strategically plausible, but not yet unified in code:
| Future combined surface | Current truth | Notes | | --- | --- | --- | | accommodation discovery + owner listing management | partly ready | Real backend exists, but public compatibility residue and gateway asymmetry remain. | | vacancy discovery + posting/application lifecycle | partly ready | Real backend exists, but public vacancy discovery still has dual truth. | | booking + application operator flows | mostly ready | Both are durable and route-backed today, though still separate domain modules. | | nearby stay ↔ nearby work intelligence | not ready | Mostly frontend catalog/mock composition today. | | workforce discovery / supply register | not ready | Current page is mock-backed and lacks backend ownership. | | travel integration seam | not ready | No current backend contract or implementation found in inspected surfaces. |
The smallest credible extraction-prep package is not yet a single runtime. It is a candidate package made of real modules plus explicit “stay for now” residue.
services/svc-tenders/src/vacancy/readRepository.tsservices/svc-tenders/src/vacancy/commandHandlers.tsservices/svc-tenders/src/vacancy/projections.tsservices/svc-tenders/src/vacancy/validation.tsservices/svc-tenders/src/accommodation/readModel.tsservices/svc-tenders/src/accommodation/ownerReadRepository.tsservices/svc-tenders/src/accommodation/commandHandlers.tsservices/svc-tenders/src/accommodation/projections.tsservices/svc-tenders/src/accommodation/validation.tsservices/svc-tenders/src/routes/registerVacancyRoutes.tsservices/svc-tenders/src/routes/registerAccommodationRoutes.tsservices/svc-tenders/src/routes/support/vacancyRouteSupport.tsservices/svc-tenders/src/routes/support/accommodationRouteSupport.tsservices/svc-tenders/src/repository.tsservices/svc-tenders/src/vacancy/compatibilityReadRepository.tsservices/svc-tenders/src/vacancy/compatibilityApplicationRepository.tsservices/svc-tenders/src/accommodation/compatibilityReadRepository.tsservices/svc-tenders/src/server.ts| Blocker | Severity | Type | Why it blocks extraction | Next reduction step |
| --- | --- | --- | --- | --- |
| Dual public vacancy truth (vacancy_postings_view + vacancies fallback) | HIGH | code+infra | Public discovery is still mixed, so extracted vacancy service would inherit legacy fallback decisions immediately. | Decide whether to converge public vacancy reads onto projections or explicitly preserve legacy fallback behind a named compatibility seam. |
| Accommodation compatibility residue in root repository | MEDIUM | code-only | Active routes are cleaner than root hosting, but legacy catalog reads still keep the ownership story mixed. | Move accommodation contracts away from root compatibility hosting or retire old consumers. |
| Incomplete accommodation gateway seam | HIGH | code+infra | Public reads and owner reads can target ACCOMMODATIONS_SERVICE_URL, but booking/listing mutations and my-accommodation-bookings still proxy only to TENDERS_SERVICE_URL. | Give accommodation mutation and booking routes the same explicit env seam as public/owner reads. |
| No unified WorkStay contracts | MEDIUM | code-only | Vacancy and accommodation are still separate route/repository contracts with no combined package boundary. | Extract domain-local contracts or package boundaries for accommodation and vacancy first. |
| UI-first nearby stay/work and workforce surfaces | MEDIUM | code-only | Future WorkStay intelligence surface does not yet have backend ownership. | Decide whether those features are deferred or need a first backend contract before extraction. |
| Root repository compatibility dependence | MEDIUM | code-only | Older callers still reach vacancy/accommodation through TendersRepository. | Inventory and reduce remaining root compatibility callers before extraction execution. |
| Local outbox_events usage without clear external event contract | MEDIUM | code+infra | Projection/event flow is real but service-local, not yet a clean shared event seam. | Decide whether WorkStay keeps this as local projection infrastructure or exposes explicit integration events later. |
| Web/service fallback type duplication | LOW | code-only | The web app keeps fallback domain catalogs and corresponding view types beside backend contracts. | Document which frontend types are UI fallback only versus future shared domain contracts. |
Recommended next direction is:
That sequence is safer than inventing a unified platform abstraction before current code truth is stable.