../shiraoki repository. Tuturuuu does not own Shiraoki commerce records.
Tuturuuu owns the external-project binding, CMS configuration, launch gate,
central login handoff, and app-token access used by Shiraoki admin/account
surfaces.
Ownership Boundary
Keep the data split explicit:- Shopify owns products, variants, inventory availability, cart checkout URLs, payment completion, customer addresses, and order history.
- Shiraoki owns the storefront runtime, local server helpers, route transitions, cart UI, product gallery, account center, and owner admin workflow.
- Tuturuuu owns CMS configuration, workspace binding, external app registration, app-token exchange, launch-gate content, navigation, editorial sections, and shopper-only data that is not naturally Shopify-owned.
Platform Adapter
The platform adapter ID isshiraoki.
The adapter is registered in:
apps/web/src/lib/external-projects/constants.tsapps/web/src/lib/external-projects/fixtures.tsapps/cms/src/features/cms-studio/constants.tspackages/types/src/supabase.tsapps/database/supabase/migrations/20260517141000_add_shiraoki_external_project_adapter.sql
shiraoki-main.
Workspace bindings must point at a canonical project whose adapter is
shiraoki, or app-token exchanges for Shiraoki external-project scopes will
be rejected.
CMS Collections
Shiraoki’s default CMS collection slugs are:site-config: brand name and portable storefront identitylaunch-gate: password screen state, copy, and early-access passphrasenavigation: storefront nav labels and hrefseditorial-sections: minimal home-page supporting sectionsshopify-settings: active Shopify presentation settings, such as featured collection handle
apps/web and apps/cms so the
root platform console and standalone CMS app agree on adapter defaults.
External App Registration
Register Shiraoki from the Infrastructure external-app registry before using live auth:- Create external app ID
shiraoki. - Add every allowed Shiraoki origin, for example
http://localhost:3000, staging origins, and the production storefront domain. - Allow only the scopes Shiraoki needs. For admin/CMS setup use
external-projects:*; for preview or read-only storefront access preferexternal-projects:read. - Issue an app secret and store it in Shiraoki as
TUTURUUU_APP_SECRET.
Auth Flow
Shiraoki sends users toapps/web login with a return URL pointing back to
/verify-token?nextUrl=... on the Shiraoki origin.
After login, apps/web validates that the return origin belongs to the
registered Shiraoki external app and adds a short-lived cross-app token to the
return URL. Shiraoki then calls:
appId: "shiraoki", the app secret, the handoff token, requested scopes,
and the bound workspace ID when external-project scopes are requested.
The exchange succeeds only when:
- the Shiraoki app secret is valid
- the cross-app token targets
shiraoki - the workspace has external projects enabled
- the workspace binding’s canonical adapter is
shiraoki - the user has the permission required by the requested external-project scope
403 with code: "PENDING_WORKSPACE_INVITE", the normalized
workspaceId, and an invitationUrl. Shiraoki should route the user to that
URL, or show an action that opens it, before displaying generic no-access copy.
After the invitation is accepted, Shiraoki should retry the exchange; normal
workspace and external-project permission checks still apply.
Shiraoki should store the returned bearer token in its own HttpOnly session
cookie and call Tuturuuu APIs with that token. Do not give Shiraoki production
Supabase service-role credentials.
Environment
Shiraoki expects these runtime variables:Local Development
From the Shiraoki repo:Operational Checks
After platform adapter changes, run focused checks first:bun check from the platform root before landing the change when the
worktree is not blocked by unrelated dirty files.