Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Feature ID: PF-74 Status: 📋 Specification Spec: PF-74-organization-url-routing.md Last Updated: 2026-03-24

Overview

PF-74 adds path-based organization routing (/o/:orgSlug/*), slug-to-org resolution via useOrgBySlug, OrgSlugRoute layout, and the orgPath(slug, path) utility for deep links. It consumes pf_organizations.slug (PF-01/PF-50) and integrates with OrganizationContext (PF-01). No new database tables or RLS changes.

PF-95 coordination: tenant subdomain canonical redirects

When PF-95 ships, PF-74 implements the Canonical redirect matrix (rules R1–R5) so that eligible orgs (subdomain set, subdomain_verified, prefer_subdomain_redirect) are moved from the primary app host to the tenant subdomain host while preserving /o/:slug/... paths and query strings. Eligibility and full rules are normative in the PF-95 spec and PF-95 Integration. Implementation layer (middleware, edge config, or client-first redirect) is a PF-74 implementation choice; default status code 308 unless product standardizes otherwise.

Integration Points (from Spec)

PointTypeDocument / Spec
PF-01 (Organizations)Direct PF dependencypf_organizations.slug, OrganizationContext.setCurrentOrganization
PF-50 (Tenant Provisioning)Data dependencySlug produced/validated by PF-50; PF-74 consumes; orgPath in src/platform/organizations/slug.ts
PF-10 (Notifications)Downstream consumer (optional)Deep links may use orgPath(slug, path) from @/platform/organizations
PF-81 (Multi-Tenant Host & URL Strategy)Strategy overviewPF-81 Integration — path routing is primary mechanism
React Router DOMLibraryuseParams, useNavigate, <Route>, <Outlet> — layout route at /o/:orgSlug
Vercel (SPA)HostingNo changes; existing catch-all rewrite handles path-based routing
Canonical URL policyPlatform docSlug URLs are canonical; no redirect to flat path. Host canonicalization in PF-77.

Platform Layer / Event / API Contracts

  • Platform layer: @/platform/organizations exports useOrgBySlug, useCurrentOrgSlug, useOrgPath, orgPath, and OrgSlugRoute. Downstream (PF-10, PF-50) may call orgPath(slug, path) for link generation.
  • Event contracts: None.
  • API contracts: None (frontend-only routing and hooks).