ResortWise Platform Architecture¶
A high-level map of the platform: what the repositories are, how the services fit together,
which quality gates guard every change, and how anything gets deployed. Kept intentionally
concise — deep detail lives in each feature's specs/<nnn>-*/ and in the ADR log
(adr/).
Repository topology¶
The platform is a multi-repo (not a monorepo — see ADR-0004). Each repo is independently built and deployed; they share contracts, not source trees.
| Repository | Purpose | Stack |
|---|---|---|
resortwise-specs |
Specs, constitution, ADRs, docs (this repo) | Markdown, Speckit |
resortwise-shared |
Shared primitives: TenantId, Money, event envelope, RFC 7807 types, auth primitives |
Kotlin library |
resortwise-services-core |
Multi-tenancy, security, org, audit, docs, UDF, tasks | Kotlin / Spring Boot |
resortwise-services-pms |
PMS: Reservations, Front Desk, Owner Rental, Sales→PMS bridge | Kotlin / Spring Boot |
resortwise-services-finance |
Dues, Loans, Funding, Commissions, Flywire | Kotlin / Spring Boot |
resortwise-services-sales |
Tours & Sales: Config, Marketing, Leads, Tours, Contracts, In-House | Kotlin / Spring Boot |
resortwise-apps |
Staff web (ops console), Owner Connect, Housekeeping/Guest/OPC Connect | Next.js / React / TS |
resortwise-infra |
Terraform, Kubernetes, CI/CD pipelines, gateway config | HCL / YAML |
Runtime shape¶
Browser (ops console, connect portals)
│ HTTPS
┌─────▼─────┐
│ Kong API │ edge security (WAF, rate limit), version routing,
│ gateway │ CORS, tenant/JWT introspection (spec 024–028)
└─────┬─────┘
┌───────────┼───────────────┬───────────────┐
┌────▼────┐ ┌────▼────┐ ┌──────▼──────┐ ┌──────▼──────┐
│ core │ │ pms │ │ finance │ │ sales │ Spring Boot services
└────┬────┘ └────┬────┘ └──────┬──────┘ └──────┬──────┘ (JDK 21, Kotlin 1.9)
└───────────┴────────┬───────┴────────────────┘
┌──────▼──────┐
│ SQL Server │ registry DB (rw_*) + per-tenant data stores
└─────────────┘
- Multi-tenancy is resolved at the edge/filter layer: a tenant context header (or JWT
subject) selects the tenant; the registry database (
rw_tenant*) maps tenants to their data-store bindings. Core owns the registry; other services consume tenant context. - Shared primitives (
resortwise-shared) are consumed by every service, never re-implemented — see ADR-0002. - API versioning is in the URI path (
/api/v1/...); the gateway can route versions/pools (spec 027). Contract changes are policed by the breaking-change gate — see ADR-0003.
Quality gates (enforced in CI, not by memory)¶
Every PR must pass, per the Constitution:
| Gate | Where | What it blocks |
|---|---|---|
| Breaking-change (spec 017) | services CI (oasdiff vs api-spec/*.baseline.json) |
an incompatible public API change without a version bump |
| OpenAPI regen (spec 109 / RW-760) | services CI integration stage | a committed api-spec that has gone stale versus the code |
| Contract-drift (spec 109 / RW-753) | apps CI (pnpm gen:api-types + git diff) |
the frontend's generated types drifting from the published contract |
| Coverage ratchet (spec 109 / RW-755) | JaCoCo (backend) + Vitest v8 (frontend) | coverage regressing below the current floor |
| Cross-service smoke (spec 109 / RW-754) | apps CI (compose) / kind (local) | an integration break in sign-in → tenant-list |
| Security policy (spec 106) | infra CI (checkov, tfsec) | insecure IaC merging |
| Deployment parity (RW-700) | infra CI (terraform/parity) |
a resource deployed to one target but not declared for the other |
| Shared-usage (spec 108 / RW-761) | services CI static scan | a service re-declaring a shared primitive locally |
Deployment model¶
All deploys go through Terraform — local (kind) and cloud (EKS) alike; never kubectl,
helm, deck, or kind by hand. See ADR-0001.
- Local:
scripts/local.sh stackapplies the kind cluster + services + gateway; hosts resolve under*.resortwise.local. - Cloud: Azure DevOps pipelines build images (bootJar → Docker, Next → Docker), push to
ECR, and
terraform applyto thedevenvironment on EKS. Deploy is opt-in on greenmain. - Parity: every deployable is declared for both targets (
terraform/parity/manifest.yaml) so local and cloud cannot silently diverge.
Where to go next¶
- Contributing workflow & local setup →
CONTRIBUTING.mdat the repository root - Decisions and their rationale →
adr/ - Dependency automation →
dependency-automation.md - Per-feature detail →
specs/<nnn>-<slug>/in this repo