Declared runtime, framework, persistence, media, observability, testing, and delivery technologies
Guided views
Explore this system
Step through curated paths without changing the source diagram.
Beat
Next
ReadyChapter 01 / 01
Guided chapter
Diagram guideExplore this system
Inspecting compiled semantics
E ExportT ThemeS Style0 Reset+ Zoom in- Zoom outEsc Close
Find a node
⌕/
No matching nodes
Semantic passport
Verified source
Authored reach
Route probeChoose a start node
Pick two semantic nodes on the diagram
Choose the source, then the destination. Direction matters.
Semantic lensCompare system roles
Choose up to two semantic kinds. One reveals its real traffic; two compare only direct authored relationships.
Choose a kind to inspect its nodes and touching relationships.
Semantic radar
Building overview
Click nodeDrag to pan
Meeting Streamer lifecycle foundation
• Separate C++20/CMake process with Zoom SDK and hiredis; media playback remains pending. Offline simulation cannot register in live allocation. Monotonic ownership watchdog, versioned Redis commands, bounded delivery receipts and SDK lifecycle observations use only tfd:streamer coordination.
• Public SDK-off/Redis build variants use fake ports. A trusted develop-only job validates checksum-pinned private SDK input, non-root final-image loading/startup and native-image security. Live safety, approved SDK provenance, required plugins and remaining security review must be validated before completion; repository configuration alone is not deployment evidence.
Secure communications
• The existing NestJS Chat module owns HTTP commands, encrypted history and staff-only Socket.IO projections; /portal/chat uses the same React build with its own active UserProfile authorization surface.
• Chat infrastructure requires a runtime-scoped KMS key, shared Redis, a dedicated private versioned attachment bucket and GuardDuty scan tags. Socket business commands remain disabled while ADR 0059 full-duplex approval is proposed. The explicit CHAT_ATTACHMENT_SCAN_MODE=disabled exception is accepted only for Railway staging. Validated uploads retain ready_unscanned evidence and are publishable/downloadable only while that exception is active; other environments require clean scans and reject disabled configuration. Membership, checksum, format, size and immutable version controls remain enforced. Reconfirmation validates the original frozen version; withdrawing the exception blocks new links while previously signed downloads retain their two-minute expiry.
Application stack
• React and MUI provide the staff interface; getDisplayMedia and MediaRecorder create local movement lab clips with explicit browser consent; MotionBERT-Lite, ONNX Runtime Web WASM and iterative refinement run in a cancellable browser worker
• NestJS hosts the modular monolith and realtime gateway
• Prisma maps explicit PostgreSQL business schemas
Media stack
• C++ and Zoom Meeting SDK own capture
• Node, FFmpeg, and ffprobe own Zoom participant finalization plus bounded allowlisted AddPipe normalization
• AddPipe output is H.264 320x180/15 fps yuv420p with AAC 128 kbit/s and faststart
• Private S3 stores media outside Redis and the API; authenticated playback resolves stable video ids only
Engineering stack
• OpenTelemetry standardizes traces and metrics
• dependency-cruiser protects module boundaries
• Archify artifacts and repository docs publish through CI to Outline
• Legacy YouTube import retains pinned yt-dlp 2026.6.9, Python 3, Node 22, bgutil 2.0.0, FFmpeg, ephemeral Redis jobs and private S3 cleanup. The movement lab UI uses browser tab capture and no longer invokes these import routes.
Optional cloud motion capture
• tools/motion-capture-modal deploys a private CPU HTTP gateway and an on-demand NVIDIA L4 worker using Python 3.12, PyTorch 2.11, SAM 3D Body DINOv3 and MediaPipe for person bounding boxes.
• Delivery persists MotionCaptureJob in PostgreSQL and signs direct private S3 uploads/results, including a separate versioned mesh ZIP preserving topology, per-frame vertices and camera metadata. New jobs require both skeleton and mesh artifacts before readiness; legacy jobs remain readable without a mesh. Modal proxy credentials remain backend-only. The browser adapts MHR70 skeleton points to the existing Three.js bones/muscles rig; browser MediaPipe/MotionBERT remains selectable.
Message template catalog
• Notifications owns MessageTemplate catalog records for email, SMS and WhatsApp, with string channel identifiers and a validated capability registry.
• Settings exposes Message Templates beside Notification Settings. Active StaffUser access and independent message_templates:read/manage grants authorize every route.
• Templates use draft, active and archived states, revision-checked updates, declared variables, visual email authoring and sanitized sample previews. Completed-action audit contains safe metadata only; the catalog does not enqueue outbound messages.
• Notifications also owns revisioned EmailSignature profiles. A template may select one active profile or none; each profile supplies its own optional header and footer. A bounded declarative schema permits approved logos, plain text and HTTPS links.
• One composer builds template/VIP previews and HTML/text delivery. Reviewed signature id/name/revision and composed content freeze in EmailDelivery; enqueue locks and rechecks the active signature. Only the configured public asset origin may load images in the sandboxed preview.
Track authoring — ADR 0083
• Delivery owns TrackDefinition drafts and append-only TrackVersion publications. Nested stages, decisions, routes and training profiles share one typed definition between Structure and Flow.
• Clinical owns immutable TrackQuestionnaireVersion health questions/rules. Identity adapters require explicit Clinical grants; Delivery resolves only approved identity/outcome codes through the synchronous Clinical public facade.
• Publication freezes safe video and exact whole-class Program version references. Catalog/media archival is guarded under dependency locks. Program Runs, existing on-demand attendance and recording processes retain their ownership.
• Delivery now owns TrackParticipation pinned to a published TrackVersion and append-only VipDirectionAction evidence. The direction queue composes existing ProgramRunVip links with a narrow Identity public projection of active VIPs, breaks and experience assignments. VIP execution and camera capture are implemented by ADR 0086. ADR 0085 adds Delivery-owned immutable progression policy versions, participation-scoped reviews, PT votes and append-only actions. Identity exposes scoped Platinum/Diamond Director and active linked VIT eligibility through ProgressionIdentityService. Review windows use persisted timestamps and server-clock checks; no scheduler is needed. Director confirmation preserves a destination; ADR 0086 schedules and applies the effective participation transfer. ADR 0086 adds Delivery-owned ProgressionTransition, TrackProgress, TrackExecutionAction and TrackRecording. A bounded poll in the existing monolith applies due Director-authorized transfers under roster locks and publishes existing participation facts after commit. Active UserProfile ownership gates progressive portal activities and private media. Clinical portalForm/portalSave own TrackQuestionnaireResponse and immutable submitted clinical answers, returning route outcomes only. Browser media uploads directly to private S3 and is frozen through an ETag-conditional internal copy; no API media bytes or new runtime service.
• ADR 0091 reserves VIP Journey for the composed lifecycle of TrackParticipation and ProgramRunVip, without a duplicate ledger. Track entities map to existing Journey tables and columns; immutable snapshots, legacy progression discriminators and LaunchDarkly keys remain stable. Programs remain reusable and independent of Tracks.
• Service Funnel question contracts add checkbox selections and ordered rankings (bounded string arrays), rating/opinion scales (bounded integers), and long text with optional prompt descriptions. Delivery validates current-activity answers and published option membership; routing uses explicit contains/first_equals predicates and rejects overlapping automatic outcomes. Existing snapshots and identity/prerequisite checks remain unchanged. Backoffice direct video upload reuses the private Assets library upload/confirm contract and resolves a stable ProgramAsset before applying the step; no signed URL is stored in the workflow and no new runtime service is introduced.
• ADR 0083 connected-workflow amendment: schema 4 TrackVersion freezes an entry stage and per-output destination references. Quiz/Form finite-answer ports or existing checkpoint outcomes connect to stage ids or explicit Finish; Lessons keep one continuation. Delivery validates acyclicity, reachability, answer availability and complete connections, then preview and owned progressive execution traverse the same pinned graph after activity/recording/review gates. Existing route activities and Clinical outcomes retain their contracts; schemas 1–3 remain ordered. No second progress ledger, new runtime, event or context boundary is introduced.
• Schema 4 optionally stores bounded per-node canvas coordinates in workflow.positions. Revision-checked draft saves and immutable publications preserve this editorial layout; execution and authorization ignore coordinates. Missing positions use automatic layout and deleted blocks lose their saved coordinates.
• ADR 0107 adds explicit scoped staff restart/version-replacement commands. Delivery supersedes the prior TrackParticipation, preserving its pinned snapshot, answers, media and Clinical references, and creates a new owner-scoped cycle. Reset starts empty; published-version replacement preserves compatible answers, completions and recording provenance within one TrackDefinition; revision/request fences reject stale commands and duplicate resets. Delivery-owned TrackExecutionEvent records distinguish bounded advisory portal observations from confirmed execution actions; neither telemetry nor playback progress proves completion. Staff operational response/history reads preserve Clinical isolation. The user-approved November 10 amendment to ADR 0102 grants active administrator/global StaffUsers all resolved Service Funnel executions through Identity canManageAllTracks, including unlinked clients and unassigned participations; non-global reviewer assignment and Director membership scope remain required. No new runtime, provider or cross-context event is added.
• Identity's completed-action audit sanitizer accepts the current track resource label alongside historical journey records; sanitized reset/version-change staff facts remain recorded without response bodies.
• Service Funnel Forms and Video Quizzes may freeze optionPoints aligned with choice/checkbox answer labels: each is a nonnegative integer up to 1000000. Connected priority Decision score conditions explicitly select scored questionIds from common steps encountered on every path, compare their sum with equals/gte/lte and retain first-match/default behavior. Delivery derives the sum from valid answers in completed, encountered activities; skipped answers contribute zero and checkbox selections contribute each selected option once. Staff fictional testing and owner-authorized execution share this evaluator. No independently incremented total, Clinical rule change, migration or publication rewrite is introduced.
Server-side feature flags — ADR 0087
• FeatureFlagsModule is technical infrastructure in the monolith. One server-only LaunchDarkly Node SDK evaluates typed Booleans with 3 s startup and 750 ms decision limits; unavailable/error values return false. Optional isolated Redis persistence retains last-known rules across restarts; persisted rules have no freshness TTL.
• Canonical provider flags are chat, journeys, vip-progression, movement-lab, create-subscription and phase-team-communications, each with false default/off values. Billing groups renewal and creation screens without changing Identity/Integrations ownership. VIT type/roles are excluded at routes and API; create-subscription additionally gates creation with financials:manage. A no-store GET /me/features composes active StaffUser authorization with each flag. The expanded VIP table and shared-view GET/POST endpoints are generally available with vip_management.view; vip-expanded-table is a permission-derived response compatibility field, never provider-evaluated. journey-reviews is a derived compatibility response field: journeys plus explicit client-review eligibility or progression.read with Director authority; Delivery still enforces assigned participation or VIP membership scope. It is never a separate provider evaluation or legacy fallback.
• Tracks covers authoring, the staff Clinical questionnaire catalog, execution reviews and private playback, and Track-specific direction/progression surfaces. VIP progression covers policies, votes, reviews and transitions. Track-linked progression snapshots and commands require both flags. The direction queue still counts real participation coverage; Program Run and VIT operations remain available independently. Planned-transition and applied-progression history projections follow VIP progression; Track involvement requires both flags even for a Program destination. Filtering projections never changes real participation coverage.
• The initial staff pilot targets server-derived isAdmin=true: StaffUser admin type or admin/super_admin role. This private Boolean is the only added context attribute; browser input cannot set it. Admin targeting releases availability, never Director/PT authority, membership scope or a force-on bypass. Identity and Clinical use the public core evaluator without importing the staff adapter back into Identity.
• Scheduled progression transitions pause while the required authorizing-staff flags are false, retaining scheduled state and prior decisions. Resumption rechecks current Director authority, membership, source continuity and destination rules. Server-local emergency disabling overrides provider and cached true values; no work or completion evidence is fabricated.
• Contexts use trusted staff UUID/kind plus private isAdmin; future VIP evaluation uses active UserProfile UUID/kind. Email, names, clinical content and secrets are excluded. Evaluation count/latency labels contain no UUIDs and are not unique exposures or A/B samples. Existing Grafana/OpenTofu definitions require live export/query validation; future VIP experiments need actual served/rendered exposure and attributed outcomes.
• The server-evaluated chat flag defaults/off to false. Active staff and portal identities require independent trusted staff/vip cohort evaluation before chat HTTP, attachments or UI access. Staff sockets recheck availability every 10 seconds and before each recipient projection; message notification projections, inbox lists and unread counts exclude disabled recipients without deleting durable state. Identity exposes independent /portal/me for VIP Journey, separate from gated /portal/chat/me.
• Local-only exception: the explicit start:local launcher supplies TFD_LOCAL_DEVELOPMENT=true with NODE_ENV=development; deployment/CI markers reject this mode. The API binds to 127.0.0.1 and enables valid-context flags without LaunchDarkly. Emergency disable, authentication, RBAC and ownership still apply. Published runtimes retain provider evaluation and fail-closed defaults.
Manual VIP email — ADR 0088
• Notifications owns EmailDelivery with the frozen active MessageTemplate revision, rendered content and reviewed sender/recipient. NotificationEvent carries emailDeliveryId only; EmailDeliveryFeedback and EmailSuppression retain normalized results and permanent-bounce/complaint blocks.
• Saved VIP email HTTP requires active StaffUser, vip_management.view and independent vip_email:send/read. Identity VipEmailRecipientsService resolves the exact internal profile and operational VIP id through its public facade; the worker rechecks deletion and unchanged recipient without importing Identity tables.
• The generic Notifications worker remains a channel-isolated durable fallback for Slack and leased/fenced email work. Amazon SESv2 sends one recipient with maxAttempts 1 and tfd_email_delivery_id correlation. An unresolved started send becomes uncertain rather than automatically resending; only definitive throttling uses bounded retries.
• After durable enqueue commits, an individual reviewed VIP email immediately attempts only its own delivery through the existing fenced EmailDispatcherService and returns the stored status. An identical request keeps the same delivery and cannot bypass scheduled retry time, duplicate a provider attempt, or drain unrelated mail.
• The existing Backoffice API owns an email-only composition-root pass in email-delivery-runtime.service.ts, registered only in AppModule. With EMAIL_DELIVERY_ENABLED=true it starts at bootstrap and checks every five seconds, without overlapping local passes, for approved due cycle schedules and queued email dispatch. Campaigns become visible only after their transaction commits; future due times, 60/120-second retry waits, expired-claim recovery and uncertain-send protections remain authoritative. The pass uses existing Notifications public services, stops with the API, and logs only sanitized failure codes. Slack, digests and the generic worker schedule are unchanged; no separate process, context, broker or email cron is created.
• Amazon SNS feedback must match the configured topic and verified signature using bounded allowlisted HTTPS certificates without redirects. Durable normalized feedback is correlated to provider message plus delivery id; permanent bounce/complaint suppresses current and future queued sends. Server delivery is not inbox/read proof. No CommunicationLog, Engagement fact or new runtime is created; real sender/DNS/AWS setup and deployment remain prerequisites.
• Notifications also owns revisioned EmailSignature profiles. A template may select one active profile or none; each profile supplies its own optional header and footer. A bounded declarative schema permits approved logos, plain text and HTTPS links.
• One composer builds template/VIP previews and HTML/text delivery. Reviewed signature id/name/revision and composed content freeze in EmailDelivery; enqueue locks and rechecks the active signature. Only the configured public asset origin may load images in the sandboxed preview.
Phase team communications — ADR 0090
• Identity publicly supplies bounded stable-VIP contact, status, membership, active-break and normalized shared-mailbox facts. Delivery publicly supplies current run/session audiences, cycle timelines and reviewed group/completion evidence; placement age is never completion.
• Delivery owns CommunicationRosterReview, PhaseTeachingPlanItem and PhaseResourceHandoff. Classification corrections preserve reason, actor/time, revision and append-only history. Teaching plans reuse ProgramAsset VIP document links; VIT guidance and temporary access URLs are not email resources.
• Notifications owns EmailCampaign, CycleEmailSchedule and StaffCommunicationTask. A reviewed campaign revalidates bounded bulk owner projections and atomically freezes private per-VIP EmailDelivery plus minimal NotificationEvent work under stable idempotency and template/signature locks. Cancellation affects queued work only.
• The existing notification worker activates no drafts automatically. Explicitly approved future cycle schedules use run timezone/calendar offsets, reevaluate due recipients and move changed or overdue intent to needs_review. Late joiners are considered at due time; historical catch-up requires a manual review.
• Calendar reads authorized staff tasks; due inbox notifications deduplicate by task/revision and never imply completion. Accepted frozen resource email reconciles idempotent Delivery handoff evidence. No new runtime, media path, VIP portal contract or graduation authority is introduced; existing Director progression governance remains authoritative.
• The false-default phase-team-communications flag gates staff navigation, Calendar reminders and all campaign/team HTTP routes without granting RBAC. Notifications rechecks each stored authorizing actor before due work; disabled schedules/reminders retain intent and revisions. Already queued email dispatch and accepted handoff reconciliation continue.
• Staff navigation exposes separate Communications, Session groups, Teaching plans and Team tasks modules. The session_leader role grants only dashboard.view plus dedicated phase_communications/phase_roster/phase_teaching/phase_tasks read-write capabilities. Each adapter and scheduled command enforces its own capability; the same feature flag gates all four. No dashboard shortcuts or indicators are added.
Personalized video prescriptions
• Delivery owns PrescriptionExercise, VideoPrescription and immutable PrescriptionRenderJob snapshots. Demonstrations reference the existing private SessionAnalysisLibraryAsset; approval freezes no VIP clinical content and changing an exercise requires reapproval. Historical export snapshots pin the source range, cue and dose. Shared library archive blocks all exercise and render dependencies.
• The false-default video-prescriptions LaunchDarkly key gates staff menus and every prescription/catalog/private media HTTP endpoint. video_prescriptions.view is independent from edit_own/manage; author ownership or a separate manager grant protects all prescription access. program_setup.manage protects catalog maintenance and loop approval. Cognito and active StaffUser remain required.
• The existing tfd-session-analysis-renderer also consumes dedicated tfd:prescriptions:render-commands and produces render-results using separate consumer groups and prescription.render message types. It normalizes approved private source intervals, repeats at original speed for the exact timed dose, adds silent audio, countdown/preparation/rest scenes, and writes validated private H.264/AAC 720p MP4. No SessionAnalysis request/project, attendance, portal or recorder state is created.
• PostgreSQL owns draft revision, immutable render snapshot, retry/progress/cancellation and final review. Core reconciliation recovers unpublished and abandoned jobs; attempt ids fence stale results and private output paths. Worker TTL leases renew during rendering and stop work when ownership cannot be proven. Only the monolith mutates database state; neither Redis nor the API carries media bytes.
• Staff explicitly review the exact final MP4 before authenticated short-lived download. A downloaded prescription never proves VIP delivery or completion. Existing reviewed earlier versions remain accessible after a later draft changes. Enabling the flag requires a validated deployment of the renderer contract and configured private storage; no provider flag or deployment is changed by repository implementation.
VIP access and authentication emails
• Identity provisions and pins VIP access in a separate Cognito pool with mail suppressed. An explicit invitation converts FORCE_CHANGE_PASSWORD using an unshared random permanent credential kept only in request memory, then AdminResetUserPassword sends a one-time password link. The CustomMessage_ForgotPassword Lambda uses non-sensitive purpose metadata and calls Notifications with purpose only. Notifications owns revision-pinned templates; invitations require auth_url without separate code or username fields. The adapter inserts the URI-encoded provider email locally; Cognito substitutes the recovery code and sends through SES. The custom VIP form removes the fragment on load and submits the chosen password through the BFF to ConfirmForgotPassword. Only successful verified authentication of the pinned subject conditionally activates invited UserProfile access; disabled access remains denied.
VIP development hosting and authentication boundary
• The independent VIP React/Vite app is hosted on the development-only Cloudflare Pages project tfd-vip-dev at https://dev.vip.tfdportal.com, built from develop. Its public assets contain only the HTTPS development API origin, never Cognito tokens, client secrets or service tokens.
• Browser requests go directly to https://dev.api.tfdportal.com/portal/* with credentials. Explicit CORS permits the VIP origin; both HTTPS origins share the tfdportal.com site. API-host-only HttpOnly, Secure, SameSite=Lax cookies identify server-held portal sessions. Active UserProfile authorization and rollout flags remain independent and mandatory.
• PORTAL_FRONTEND_URL is the canonical HTTPS origin for invitation activation and password-reset links and sensitive form-origin checks. The existing VIP client callback uses /auth/callback for legacy social BFF behavior; no VIP Hosted UI is added. Staff-host, staff Cognito pool and production deployment settings are unchanged.
Standalone portal accounts
• Identity allows privileged staff to create UserProfile with a null VIP link, a required name and a unique sign-in email. The exact Cognito subject is provisioned by the backend with mail suppressed, never supplied by the browser. Existing invitation links, verified activation, account disable and password reset apply unchanged. Optional vip_id is explicit in staff and /portal/me response contracts. Non-null VIP links retain uniqueness; multiple standalone identities do not conflict on NULL. No VIPProfile, enrollment, clinical access or program ownership is fabricated. Delivery portal routes independently require a linked VIP and existing ownership/prerequisite rules.
• Privileged staff can later attach a non-archived VIP to the existing unlinked account through PATCH /vip-access/:id/vip. A transaction conditionally changes only a null vipId; same-target retries are idempotent and the partial unique index prevents duplicate VIP claims. Different existing or concurrent links are never reassigned. Cognito subject, email, status, password, invitation and sessions remain unchanged; no provider call, new identity, email or enrollment is created. Completed links append sanitized identity.vip_access.vip_linked evidence containing only the account and technical VIP identifiers. Subsequent authorized identity reads use the stored link under normal program ownership rules.
• An explicit VIP correction endpoint requires the expected current VIP and account update timestamp plus the target VIP. Its compare-and-set transaction changes only vipId; the existing partial unique index prevents claiming another account’s VIP. Concurrent stale corrections fail closed and same-target retries do not emit another correction audit fact. Privileged staff review old/new VIP names before confirming. Cognito identity, sign-in email, profile fields, status, password, sessions and invitations remain unchanged, with no provider call, email or new account. Technical fromVipId/vipId audit evidence preserves the correction. VIP program, enrollment and clinical records are not moved; subsequent authorization follows the corrected identity link under existing ownership rules.
Local movement-lab equipment review
• Development only: browser-selected video bytes pass through the existing Vite/Storybook server at /__local-equipment to a short-lived local Python DINO + MediaPipe subprocess. TFD_LOCAL_EQUIPMENT=1 is required; production build/preview has no inference route. No new deployed service or cross-context contract.
• Loopback peer and localhost Host checks, same-origin/custom-header checks, fixed executable/arguments, 100 MB upload cap, four-second sampled window, one job at a time and a two-minute subprocess deadline bound this local trust boundary. Temporary video/config/result files are removed after success, failure or disconnect; no cloud recipient or durable media store is involved.
• The viewer verifies media SHA-256 and sample timing, rejects stale results after video/view changes, and asks for confirmation. Confirmed equipment applies only within the reviewed interval; per-hand load and support still need review. Bands and shared bars remain unsupported by the current arm calculation.
• The development-only /__local-clean route accepts up to 1 MiB of captured pose JSON (7–81 samples, at most eight seconds) under the same loopback/origin gate. One two-minute native OpenSim 4.6 subprocess uses pinned Gait2392 plus bilateral Arm26 (104 muscles), inferred unilateral heel/toe friction contacts and a symmetric hand-load proxy. Private temporary files are deleted on completion or cancellation. No cloud transfer or production runtime is added.
• The clean research panel requires scale, timing and explicit reference-anatomy assumptions, rejects stale results and withholds muscle estimates when pose, force or moment residuals fail. Percentages describe nominal model force capacity, not measured individual activation. Catch, flight, shoulder-complex biomechanics and atlas color mapping remain unvalidated; anatomical colors are preserved.
• The same local boundary also serves /__local-clean/calibrate: a bounded pose-only reference alignment fits image scale/camera angle on one half-window and checks the other. No measured calibration is inferred. Optional stature and mass scale the native model under explicit assumptions; heel/toe observations constrain foot pose. Calibration changes invalidate prior effort results; individual muscle capacity remains unmeasured.
• Whole-clean review remains browser-orchestrated: sequential bounded pose windows share an inferred image-plane floor, split at occlusion/gaps and preserve missing-estimate intervals. Native IK uses stance evidence; external root balance precedes recruitment. Geometric hand/rack proposals never establish measured contact; unresolved bar-ground/turnover, rack mismatch and joint-limit failures withhold muscle values. No residual actuator is presented as effort, and the full clean remains unvalidated.
• The development-only /__local-sam/analyze route accepts a browser-selected video up to 100 MiB/five minutes under the same loopback/Host/origin/custom-header boundary. One job sequences local Apple MPS + CPU SAM inference and native OpenSim, with fixed pilot profile/crop, 15-minute per-stage deadlines, streamed progress, disconnect cancellation and private temporary-file cleanup. No production route or cloud transfer is added.
• SAM camera translation is preserved and added once before fixed camera/body-basis alignment and reference stature scaling. Metric XYZ targets feed sagittal symmetric native IK/contact/recruitment in bounded windows. Result media hashes bind the response to the selected video; source changes and cancellation invalidate late responses. Unmeasured visibility, contacts, timing and capacity remain explicit assumptions. Rejected intervals have no muscle values; full-body coloring and whole-clean accuracy remain unvalidated.
Portal user invitations — ADR 0103
• Identity owns PortalInvitation and append-only PortalInvitationEvent, with per-email/actor transaction locks, request idempotency, immutable recipient and a hashed 256-bit bearer token. Staff use /settings/portal-invitations with portal_invitations:manage. Existing local/provider accounts block sends. Default validity is seven days (168 hours), configurable via PORTAL_INVITATION_TTL_HOURS; expiration is authoritative without a cron and reissue supersedes the old token. No VIP or enrollment is inferred.
• Public POST /portal/auth/user-invitation/inspect, /verification and /accept require exact portal Origin plus shared Redis traffic limits. A fixed-email OTP, hashed HttpOnly browser proof, bounded lifetime/resends/guesses and an atomic provisioning claim precede Cognito creation. Native verified subject/email must match before UserProfile invited-to-active and invitation consumption commit. Lost commit results are reconciled before compensating only a proven newly created unbound subject; uncertain creation/cleanup stays needs_review. The portal strips URL fragments and never persists secrets in browser storage.
• Notifications exposes a leaf auth-public invitation mail facade: a manually selected active MessageTemplate revision and optional signature render transient secret-bearing SES messages, without a regular EmailDelivery snapshot/outbox or a new runtime. VIP Users Email configuration binds Portal account invitation separately from legacy Cognito auth settings. Staff-issued invitations and their fixed-recipient proof codes bypass recipient allowlists, retaining enabled sending, valid sender/tracking configuration, address validation and suppression checks. Other email recipient policies remain unchanged. SES acceptance, failure and uncertainty are durable operational facts; no inbox receipt is inferred. StaffAuditLog adds an explicitly validated recipient email snapshot, fixed reason and correlation for completed sends only. Secrets and bodies never enter logs, audit or history. See docs/operations/portal-user-invitations.md.
• The November 4 amendment adds POST /portal/auth/user-invitation/confirm under the existing Origin and shared traffic guards. Identity validates the token, code and HttpOnly cookie under the invitation lock and shared expiry/attempt budget before VIP Platform reveals name/password fields. Confirmation never provisions, consumes or extends proof, creates a session or issues another credential. Final acceptance revalidates and atomically claims the same proof. The November 5 visual correction reuses the VIP Portal split photo/purple glass layout, white fields, shared visibility checkbox and dark actions; responsive invitation forms scroll without shrinking text; password policy remains twelve characters with uppercase, lowercase, number and symbol. No migration, environment variable or Notifications transport change is introduced.
• The verification-code email has a separate revisioned template binding in the existing Notifications PortalInvitationEmailSettings row portal-user-invitation-verification. Identity exposes GET/PATCH /portal-invitations/verification-template under message_templates:manage, recording existing sanitized configuration audit with resource verification-template and version only. Notifications requires visible verification_code, optional verification_validity_minutes, current template/signature revisions and no enabled buttons or markers. Identity passes the newly persisted proof deadline; rounded-up display minutes never extend expiry. Only an absent binding uses the original built-in copy. Rendered code/body remain transient; the fixed recipient, proof, resend, suppression and activation policies are unchanged. No migration, new runtime or env is introduced; publish API before Backoffice frontend.
• ADR 0105 adds native portal password recovery using the existing Cognito one-hour reset link and Password reset template binding, optional auth_validity_minutes=60, shared Redis IP/account limits and exact verified subject/email checks. A per-profile reset fence plus durable UserProfile authorization revision closes old BFF sessions; verified native password login heals uncertain provider outcomes. Reset never provisions, activates or signs in. Notifications uses its existing auth-public facade and settings table for a separate static portal-password-changed template. Dispatch and notice are best-effort without a new worker/outbox. VIP Portal strips fragments, respects Retry-After and offers normal sign-in. No new migration or env; live provider/inbox/CDN checks remain separate. See docs/operations/portal-password-recovery.md.
• ADR 0108 supersedes mandatory OTP with server-owned link-only policy; dormant verification endpoints reject requests while disabled. Identity records invitation_link_verified and retains fixed recipient, expiry, claim, conflict and compensation controls. Activation uses an application transaction with a Notifications auth-public enqueue callback; Notifications owns the unique PortalWelcomeDelivery intent, recipient/name and delivery leases. Existing API/worker processes poll it; aborted preparation retries, unknown sends remain uncertain, definitive rejection retries are bounded. The manual portal-welcome template requires a normal portal_url button, never a credential. Backoffice shows Account access and Password recovery, hides dormant code/provider-purpose controls and preserves legacy first access collapsed. A dedicated permission-protected retry for failed delivery records secret-free completed audit. Migration 20261109120000 precedes coordinated API/worker/frontend release. See docs/operations/portal-invitation-welcome.md.
Optional email action buttons — ADR 0104
• Notifications reserves button_enabled, button_label and button_url for email-only action controls. Variable definitions may persist default_value only for these controls; fictional examples never become live defaults. The existing template DTO/JSON and revisioned editor expose these saved values without a migration or new runtime. Explicit generic send values can override declared controls.
• Absent/false buttons return the existing body unchanged, preserving exact no-button HTML, signature layout and spacing. Enabled buttons require bounded plain text and a literal HTTPS URL or one declared non-button destination variable. The shared renderer appends trusted purple (#7D06D0) anchor/table markup after sanitized content, before optional signature composition, without allowing arbitrary body CSS. Preview, text fallback and delivery use the same result; reviewed delivery snapshots remain immutable.
• Portal invitations require button_url to reference the server-owned invitation_url; existing first-access/password-reset email binds to auth_url and preserves Cognito placeholders. No personal URL is persisted in a signature/default and no token enters audit. Default-off compatibility, unsafe destinations, variable aliases, provider placeholders and editor persistence are tested; real email-client appearance remains an operational verification. See docs/operations/email-action-buttons.md.
• The November 4 amendment adds up to five content.action_buttons entries (id, enabled, label, url), each positioned by exactly one standalone {{action_button:<id>}} paragraph. The generic {{action_button}} positions the legacy action; absent markers preserve its append behavior. Disabled paragraphs disappear. DTO/editor validation rejects duplicate, unknown, inline and subject markers. A per-render sentinel protects configured placement from variable-value injection before trusted HTML rendering. Invitation/auth require the expected personal link and allow supplemental named HTTPS actions. No new table, runtime or event is introduced; deploy API/worker before frontend and rebind revised templates.
• Delivery video activities may optionally freeze presentation.videoWidth (narrow or wide). Video Quizzes alone may freeze consultationInvitation with integer startMs/endMs inside a hosted video clip. Editor, fictional preview and owned portal execution show the invitation within that interval without pausing playback or requiring an answer; Lessons and Forms cannot own this timed item. Existing explicit presentation.consultationEnabled Quiz flags retain their legacy interval when no timed item exists, without rewriting pinned publications. One width section replaces duplicated authoring controls. Ownership, decisions, completion requirements and media authorization remain unchanged.
Architecture diagram • Built with Archify • Create yours ↗ • Hover to trace • R route • Click to focus • +/− zoom • M radar • [/] views • P play story • T theme • E export