feat(examples): add workout copilot exemplar

Add a runnable phone-first workout example that keeps local workout truth as commands, domain events, and projections, routes export through the host capability boundary, and documents how to open it in the browser.

req: examples/001

req: local/001

req: local/003

req: local/004

req: host/001

req: host/005
This commit is contained in:
slhx agent
2026-06-11 20:38:06 +02:00
parent 40b9bcb5fd
commit 19bf47ec72
9 changed files with 604 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
<main data-hemx-root="workout" class="workout-app">
<section class="hero">
<p class="eyebrow">Now-first Workout Copilot</p>
<h1 data-hemx-slot="next_action">{+ self.next_action +}</h1>
<p data-hemx-slot="status">{+ self.status +}</p>
</section>
<section class="actions" aria-label="Current workout action">
<button type="button" data-hemx-handle="complete_set">Complete set</button>
<form data-hemx-handle="change_weight" method="post">
<label>Weight <input name="kg" value="52.5" inputmode="decimal"></label>
<button type="submit">Update weight</button>
</form>
<button type="button" data-hemx-handle="skip_exercise">Skip exercise</button>
<form data-hemx-handle="record_note" method="post">
<label>Voice note <input name="text" value="left shoulder felt tight"></label>
<button type="submit">Record dictated note</button>
</form>
</section>
<section class="local-truth">
<h2>Private event log</h2>
<pre data-hemx-slot="event_log">{+ self.event_log +}</pre>
</section>
<section class="host">
<h2>Export host boundary</h2>
<p data-hemx-slot="host_status">{+ self.host_status +}</p>
<button type="button" data-hemx-handle="export_log">Export via host share</button>
<button type="button" data-hemx-handle="record_share_result">Record share completed</button>
</section>
</main>