D-14, D-21: /forum shows a member the seeded EN and PL categories and their threads; a thread page lists posts as the server's content_html; a member creates a thread, replies, edits own posts and deletes own posts (moderators any post, D-22); an anonymous visitor on /forum and on a thread URL sees a description and a register-to-join link (/register?next=...), and no forum API call is made without a JWT.
D-15: /friends shows a member their friends, incoming and sent requests (accept, reject, cancel, unfriend) and friend groups (list, create, join, leave, members); a member sends a request to another member chosen from the app-provided directory; /friends is linked from the chat sidebar (sidebar-footer slot) and from the account area (header link and /account/security).
D-11, D-23: the call button (ChatvideoCallButton) appears only in DM conversations through vue-chat-layer's conversation-actions slot; there is no call button in channels; the server is not changed to refuse channel calls.
D-13: /call/{conversation} is a minimal call page: own camera, remote tiles, mute, camera toggle and leave, built on livekit-client loaded with a dynamic import; an incoming video:call:incoming event (received through vue-chat-layer's onUserEvent, no second user:{me} subscription) shows an accept/decline prompt on every page for members.
D-12: the call page shows the D-12 caps' effects (a started call ends at the server's max_duration; a fifth participant is refused by LiveKit's room cap) without client-side limits of its own.
D-16: herald runs with VAPID keys from .env (SUMMER_GOLEM15__HERALD__VAPID__PUBLIC_KEY, __PRIVATE_KEY, __SUBJECT; dev.sh generates them with herald:vapid-generate, never printing them) and there is no subscribe UI; /_herald is not added to vue-demo-app goPaths.
The homepage tour has Forum, Friends and Calls cards next to Chat (ten cards, EN and PL).
livekit-client is installed only after the blocking human-verify checkpoint, at an exact version the user confirmed.
After the Task 6 go-ahead, vue-forum-layer, vue-userfriends-layer and vue-chatvideo-layer exist on git.golem15.com with tag v0.1.0 each, and vue-demo-app pins all three by git+https tag in a committed package.json and pnpm-lock.yaml.
POST /_chatvideo/api/v1/conversations/{id}/video/start or /join gives {livekit_url, token}
video/(start|join)
from
to
via
pattern
../sm-demo-app/vue-demo-app/app/plugins/auth.ts
../vue-forum-layer/app/composables/useForumApi.ts
provide forumAuth and userfriendsAuth token getters (chatvideo reuses chatAuth)
forumAuth
statement
status
verification
None of the three layers names a consuming application or carries a default host path.
unresolved
automated
statement
status
verification
Forum post HTML is rendered only from the server's content_html; user Markdown is never rendered client-side.
unresolved
judgment
statement
status
verification
livekit-client is not added to any package.json before the Task 3 checkpoint is approved.
unresolved
judgment
statement
status
verification
No push, repository creation or tag before the Task 6 go-ahead; vue-demo-app and sm-demo-app are not pushed (plan 05).
unresolved
judgment
Phase Goal
ROADMAP Goal (not in user-story format; no story is invented here): the demo's public Nuxt site shows the shared plugins working through shared layers, video calls included.
This plan's slice (plan 4 of 6, wave 4, per D-20): three new shared layers at v0.1.0 (vue-forum-layer, vue-userfriends-layer, vue-chatvideo-layer), their pages and tour cards in vue-demo-app, and herald's VAPID configuration without UI.
Wave note (deviation from D-20, recorded): D-20 lets plans 03 and 04 run in parallel after plan 02. This plan still depends on plan 03 and runs after it, for two reasons:
It consumes plan 03's vue-chat-layer outputs: vue-chatvideo-layer imports the shared realtime client (onUserEvent, subscribe) and renders its call button in vue-chat-layer's DM-only conversation-actions slot (D-23), and the friends link goes into its sidebar-footer slot.
Both plans edit the same vue-demo-app files (package.json, pnpm-lock.yaml, nuxt.config.ts, app/plugins/auth.ts, app/pages/index.vue, the locales) in one checkout. Parallel execution runs without worktrees, so the two plans would collide in the same wave.
Decisions taken in this plan (Claude's discretion, recorded)
Layer shape: like vue-faq-layer and vue-paymentgateway-layer. A Nuxt-free client in app/utils/*Client.ts (tested with node --test), an auth-hook composable, components with a directory prefix (Forum*, Friends*, Chatvideo*), EN/PL strings through i18n:registerModule, and no pages or route rules: the app owns routes and wraps client-side parts in ClientOnly.
Auth hooks:$forumAuth and $userfriendsAuth are token getters, the vue-paymentgateway-layer shape. vue-chatvideo-layer reuses vue-chat-layer's $chatAuth, because it has a peer dependency on that layer.
Forum context: props contextType and contextId; vue-demo-app passes demo and 1. Thread URLs are built by an app-supplied threadPath(id) prop. Markdown is written in a textarea with the server preview endpoint (POST /contexts/{type}/{id}/preview); nothing is rendered client-side.
Friend directory: the layer takes an optional $userfriendsDirectory(): Promise<{id, name}[]> hook for the add-friend picker and falls back to a username field (the API accepts user_id, username or email). vue-demo-app provides the directory from GET /_demo/api/v1/chat/members.
chatvideo and chat: vue-chatvideo-layer lists vue-chat-layer v0.1.0 as a peer dependency and dev dependency, without extends. The app extends both, so the chat layer is not loaded twice. It imports onUserEvent and subscribe from vue-chat-layer/app/lib/realtime.
Call flow: the call button starts (video/start) and navigates to /call/{conversation}. The call page joins (video/join) when it was not the starter and connects with the returned livekit_url and token. Leave calls video/leave then room.disconnect(). An incoming call prompt offers Accept (navigate) and Decline (video/leave; the service publishes video:call:declined for a participant who never joined; Task 4 confirms this in video_service.go). Screen share stays off (D-13 minimal, screen_share: false).
Profile link (D-15): the demo has no profile page. The account area stands for it: a "Friends" header link for members next to "Security", and a link on /account/security.
Tour: ten cards (Journal, Presentations, Quizzes, Chat, Forum, Friends, Calls, Payments, FAQ, Accounts). The Calls card links to /chat with text saying calls start from a DM.
Development pins:link: dependencies to the three local checkouts until Task 7 swaps them for tags, as in plan 03.
spec-less probe fallback skipped: phase has no requirement IDs to probe (visible skip).
ChatvideoIncomingCall in the default layout; the call button in /chat's conversation-actions slot; the friends link in /chat's sidebar-footer slot, the header and /account/security;
tour cards forum, friends and calls; goPaths /_forum, /_userfriends, /_chatvideo; hooks forumAuth, userfriendsAuth, userfriendsDirectory.
sm-demo-app: check-local checks forum, friends, call, herald; tour expects ten cards; smoke.sh pages /forum and /friends; dev.sh VAPID generation; env keys SUMMER_GOLEM15__HERALD__VAPID__PUBLIC_KEY, __PRIVATE_KEY, __SUBJECT (names only in env.example).
Build and release the forum, friends and video-call layers, put their pages and tour cards on the demo site, and configure herald's VAPID keys without UI.
Purpose: SC-2 (video calls and the other plugins visible through shared layers), D-11, D-12, D-13, D-14, D-15, D-16, D-21, D-22 (forum moderation), D-23.
Output: three new repositories (pushed and tagged after the go-ahead), commits in vue-demo-app and sm-demo-app (not pushed), and the phase COVERAGE.md.
Repos: new ../vue-forum-layer, ../vue-userfriends-layer and ../vue-chatvideo-layer; ../sm-demo-app/vue-demo-app (submodule); ../sm-demo-app. Layer analogs: ../vue-faq-layer (structure, node --test, client in app/utils), ../vue-paymentgateway-layer (auth hook, i18n registration), ../vue-chat-layer (plan 03: slots, onUserEvent, $chatAuth).
Rules: as in plan 03 (no co-author tags, stage by path, no remote before the go-ahead, vue-demo-app committed in its own repository and not pushed, check for other sessions' edits before each commit). The local stack: ../sm-demo-app/scripts/dev.sh up with LiveKit on 127.0.0.1:7890.
Size (accepted under D-20): seven tasks over three new layer repositories are above the usual per-plan budget, but the user confirmed exactly six plans (D-20, the lean-planning rule in CLAUDE.md), so this plan is not split. After Task 4 is committed, write a progress note into a draft 20-04-SUMMARY.md (Tasks 1 to 4 with their commits, the approved livekit-client version, the decline endpoint, open points) so a context reset resumes from Task 5.
forum API /_forum/api/v1 (JWT, forum-api 120/min): GET /contexts/{type}/{id}/categories; GET /contexts/{type}/{id}/categories/{categoryId}/threads; POST same (create thread {title, body}); GET /contexts/{type}/{id}/threads; GET /contexts/{type}/{id}/threads/{threadId}/posts; POST same (reply {body}); PUT /contexts/{type}/{id}/posts/{postId} ({body}); DELETE /contexts/{type}/{id}/posts/{postId}; DELETE /contexts/{type}/{id}/threads/{threadId}; POST /contexts/{type}/{id}/threads/{threadId}/read; GET /contexts/{type}/{id}/unread; POST /contexts/{type}/{id}/preview. Posts carry content_html (server-rendered with breakwater). 422 envelope as chat.
userfriends API /_userfriends/api/v1 (JWT; userfriends-api 120/min, community-join 10/min): GET /friends, /friends/requests, /friends/sent; POST /friends/request ({user_id} or {username} or {email}); POST /friends/requests/{id}/accept; DELETE /friends/requests/{id}; DELETE /friends/sent/{id}; DELETE /friends/{userId}; GET|POST /groups; GET|PUT|DELETE /groups/{id}; POST /groups/{id}/join, /leave; GET|POST /groups/{id}/members; DELETE /groups/{id}/members/{userId}; GET|POST|DELETE /groups/{id}/invite; GET|POST /groups/join/{code}.
chatvideo API /_chatvideo/api/v1 (JWT): POST /conversations/{id}/video/start (video-initiate 5/min) and /join give {livekit_url, token, ...}; POST /leave, /end; GET /status. Realtime: video:call:incoming on user:{id}; video:call:accepted, declined, ended and participant events on video:session:{id}.
vue-chat-layer v0.1.0 (plan 03): slots conversation-actions (DM only) and sidebar-footer on ChatPage; `onUserEvent(handler)`, `subscribe(channel, hooks)` in `vue-chat-layer/app/lib/realtime`; `$chatAuth {token, refresh, unauthorized}`.
herald: keys golem15.herald.vapid.{subject, public_key, private_key}; env SUMMER_GOLEM15__HERALD__VAPID__*; command herald:vapid-generate (--json prints {"public_key", "private_key"}; -q quiet).
vue-demo-app (after plan 03): app/pages/chat.vue (ChatPage in ClientOnly), app/layouts/default.vue (ChatFloatingPanel), app/pages/index.vue (stops with chat), app/components/TourCard.vue, app/components/SiteHeader.vue (links mine and security), app/pages/account/security.vue, app/plugins/auth.ts (paymentGatewayAuth, chatAuth).
Task 1: Tracer: a member opens /forum, sees the seeded categories, opens a thread and posts a reply that the server renders; an anonymous visitor gets the register prompt
The plan 03 SUMMARY records vue-chat-layer v0.1.0 on git.golem15.com; `../sm-demo-app/scripts/dev.sh up` is running; `git -C ../sm-demo-app/vue-demo-app status --porcelain` lists no file this task changes.
../vue-forum-layer/.gitignore, ../vue-forum-layer/.nvmrc, ../vue-forum-layer/package.json, ../vue-forum-layer/pnpm-lock.yaml, ../vue-forum-layer/pnpm-workspace.yaml, ../vue-forum-layer/tsconfig.json, ../vue-forum-layer/nuxt.config.ts, ../vue-forum-layer/README.md, ../vue-forum-layer/.playground/nuxt.config.ts, ../vue-forum-layer/.playground/app/app.vue, ../vue-forum-layer/app/utils/forumClient.ts, ../vue-forum-layer/app/composables/useForumApi.ts, ../vue-forum-layer/app/composables/useForum.ts, ../vue-forum-layer/app/components/Forum/Page.vue, ../vue-forum-layer/app/components/Forum/CategoryList.vue, ../vue-forum-layer/app/components/Forum/ThreadList.vue, ../vue-forum-layer/app/components/Forum/Thread.vue, ../vue-forum-layer/app/components/Forum/PostEditor.vue, ../vue-forum-layer/app/assets/css/forum-base.css, ../vue-forum-layer/i18n/locales/en.json, ../vue-forum-layer/i18n/locales/pl.json, ../vue-forum-layer/tests/client.test.ts, ../sm-demo-app/vue-demo-app/package.json, ../sm-demo-app/vue-demo-app/nuxt.config.ts, ../sm-demo-app/vue-demo-app/app/plugins/auth.ts, ../sm-demo-app/vue-demo-app/app/pages/forum/index.vue, ../sm-demo-app/vue-demo-app/app/pages/forum/t/[id].vue, ../sm-demo-app/vue-demo-app/i18n/locales/en.json, ../sm-demo-app/vue-demo-app/i18n/locales/pl.json, ../sm-demo-app/scripts/check-local.sh, ../sm-demo-app/scripts/smoke.sh
../vue-faq-layer/{nuxt.config.ts,package.json,README.md,app/utils/client.ts,app/composables/useFaqApi.ts,tests/client.test.ts}, ../vue-paymentgateway-layer/{nuxt.config.ts,app/composables/usePaymentGatewayApi.ts}, ../sm-demo-app/plugins/golem15/forum/README.md and api/*.go (payloads), ../sm-demo-app/plugins/demo/classes/forum_access.go, ../sm-demo-app/vue-demo-app/{nuxt.config.ts,app/plugins/auth.ts,app/pages/chat.vue,app/pages/quizzes/index.vue}, ../sm-demo-app/scripts/check-local.sh (visitor_jwt, json_has, ALL_CHECKS) and smoke.sh (page loop)
Per D-14, D-21, D-22, SC-2.
Create ../vue-forum-layer (git init -b main) with the vue-faq-layer skeleton:
package.json: name vue-forum-layer, version 0.1.0, main nuxt.config.ts, peer nuxt 4.4.8, dependency @nuxtjs/i18n 10.4.0, dev deps nuxt, vue and typescript at the workspace pins, test node --test --test-reporter=tap tests/*.test.ts;
nuxt.config.ts: header comment, currentDir, runtimeConfig forum.apiBase (NUXT_FORUM_API_BASE) and public.forum.apiBase: '/_forum/api/v1', the EN/PL i18n registration, absolute css path.
app/utils/forumClient.ts createForumClient({ base, token, fetch }): categories, threads (per category and all), posts, createThread, reply, editPost, deletePost, deleteThread, markRead, unread and preview, each building /contexts/{type}/{id}/... paths, plus the 422 field-error mapping. app/composables/useForumApi.ts binds it to runtime config and $forumAuth. useForum keeps the selected category, the threads, and the open thread and posts.
Components:
ForumPage (props contextType, contextId, threadPath(id)): ForumCategoryList plus ForumThreadList with a "new thread" ForumPostEditor;
ForumThread (props contextType, contextId, threadId): each post renders the server's content_html as raw HTML (the only raw-HTML binding in the layer), with author and date, reply editor, Edit and Delete on own posts and on all posts when the API reports manage rights (a refused delete hides the action);
ForumPostEditor: textarea plus a server preview button.
Mark the thread read on open.
vue-demo-app:
run pnpm add vue-forum-layer@link:../../vue-forum-layer (development pin, committed; Task 7 swaps it for the tag before any push);
nuxt.config.ts: extends gains 'vue-forum-layer'; goPaths gains '/_forum'; forum.apiBase comes from api;
auth.ts provides forumAuth;
app/pages/forum/index.vue and forum/t/[id].vue: for members, ClientOnly ForumPage and ForumThread with context demo/1 and threadPath: id => '/forum/t/' + id; for anonymous visitors, a server-rendered description and a register link with next set to the current path (D-21, the chat page pattern). useSeoMeta on both;
EN/PL copy: forum.title, forum.lead and forum.registerToJoin.
check-local.sh check_forum:
with the visitor JWT, GET /_forum/api/v1/contexts/demo/1/categories answers 200 with at least three categories;
POST a reply to the first thread answers 201 and its content_html holds a rendered paragraph;
GET $NUXT/forum without a cookie holds the register link with next=%2Fforum.
Add it to ALL_CHECKS. smoke.sh adds /forum to the page loop.
tests/client.test.ts: URL building for every method, the Bearer header, and the 422 mapping.
Commit the layer (feat: forum layer: categories, threads and Markdown posts), vue-demo-app (package.json and pnpm-lock.yaml with the link pin, pages, config, auth and locales) and sm-demo-app scripts separately.
pnpm --dir ../vue-forum-layer test && pnpm --dir ../sm-demo-app/vue-demo-app run build && ../sm-demo-app/scripts/dev.sh up && ../sm-demo-app/scripts/check-local.sh forum
<fails_when>Non-zero exit: the forum client tests fail, the Nuxt build fails, the stack does not start, or check-local prints "check-local: forum failed" (categories missing, the reply not rendered, or no register link for anonymous visitors).</fails_when>
<acceptance_criteria>
- grep -rniE 'golem15\.demo|sm-demo|demo/1' ../vue-forum-layer/app ../vue-forum-layer/nuxt.config.ts ../vue-forum-layer/README.md | wc -l prints 0.
- grep -rn 'v-html' ../vue-forum-layer/app/components | grep -vc 'content_html' prints 0.
- grep -c "'/_forum'" ../sm-demo-app/vue-demo-app/nuxt.config.ts prints 1.
</acceptance_criteria>
Members read and post in the seeded forum on the demo site through a new shared layer; anonymous visitors are invited to register.
Task 2: Friends: list, requests and groups on /friends, linked from the chat sidebar and the account area
../vue-userfriends-layer/.gitignore, ../vue-userfriends-layer/.nvmrc, ../vue-userfriends-layer/package.json, ../vue-userfriends-layer/pnpm-lock.yaml, ../vue-userfriends-layer/pnpm-workspace.yaml, ../vue-userfriends-layer/tsconfig.json, ../vue-userfriends-layer/nuxt.config.ts, ../vue-userfriends-layer/README.md, ../vue-userfriends-layer/.playground/nuxt.config.ts, ../vue-userfriends-layer/.playground/app/app.vue, ../vue-userfriends-layer/app/utils/friendsClient.ts, ../vue-userfriends-layer/app/composables/useFriendsApi.ts, ../vue-userfriends-layer/app/composables/useFriends.ts, ../vue-userfriends-layer/app/components/Friends/Page.vue, ../vue-userfriends-layer/app/components/Friends/List.vue, ../vue-userfriends-layer/app/components/Friends/Requests.vue, ../vue-userfriends-layer/app/components/Friends/Groups.vue, ../vue-userfriends-layer/app/components/Friends/AddFriend.vue, ../vue-userfriends-layer/app/assets/css/friends-base.css, ../vue-userfriends-layer/i18n/locales/en.json, ../vue-userfriends-layer/i18n/locales/pl.json, ../vue-userfriends-layer/tests/client.test.ts, ../sm-demo-app/vue-demo-app/package.json, ../sm-demo-app/vue-demo-app/nuxt.config.ts, ../sm-demo-app/vue-demo-app/app/plugins/auth.ts, ../sm-demo-app/vue-demo-app/app/pages/friends.vue, ../sm-demo-app/vue-demo-app/app/pages/chat.vue, ../sm-demo-app/vue-demo-app/app/pages/account/security.vue, ../sm-demo-app/vue-demo-app/app/components/SiteHeader.vue, ../sm-demo-app/vue-demo-app/i18n/locales/en.json, ../sm-demo-app/vue-demo-app/i18n/locales/pl.json, ../sm-demo-app/scripts/check-local.sh, ../sm-demo-app/scripts/smoke.sh
../sm-demo-app/plugins/golem15/userfriends/README.md and api/friends.go and api/groups.go (bodies, 422 behaviour), ../vue-forum-layer (Task 1, same skeleton), ../vue-chat-layer/README.md (sidebar-footer slot), ../sm-demo-app/vue-demo-app/{app/pages/chat.vue,app/components/SiteHeader.vue,app/pages/account/security.vue,app/plugins/auth.ts}, ../sm-demo-app/plugins/demo/chat_api.go (members endpoint)
Per D-15.
- Create ../vue-userfriends-layer with the Task 1 skeleton (runtime `userfriends.apiBase`, `public.userfriends.apiBase: '/_userfriends/api/v1'`).
- app/utils/friendsClient.ts `createFriendsClient`: friends, incoming, sent, request({user_id} or {username}), accept, reject, cancel, unfriend, groups, group, createGroup, updateGroup, deleteGroup, join, leave, members, kick, invite, joinByCode. useFriendsApi binds `$userfriendsAuth`.
- Components:
- FriendsList: friends with Unfriend;
- FriendsRequests: incoming with Accept and Reject, sent with Cancel;
- FriendsAddFriend: picks from `$userfriendsDirectory()` when provided, else a username field; the generic 422 shows the server message;
- FriendsGroups: my groups, create (name, visibility as the API allows), join by code, leave, member list;
- FriendsPage: all four in sections.
- vue-demo-app:
- pnpm link dependency; extends 'vue-userfriends-layer'; goPaths '/_userfriends'; runtime config;
- auth.ts provides `userfriendsAuth` and `userfriendsDirectory` (GET /_demo/api/v1/chat/members with the JWT, mapped to {id, name: name plus surname});
- app/pages/friends.vue: ClientOnly FriendsPage for members, the register prompt for anonymous visitors;
- chat.vue passes `` with a NuxtLink to /friends;
- SiteHeader shows "Friends" for members next to Security, and account/security.vue links to /friends;
- EN/PL copy.
- check-local.sh `check_friends`, repeatable without touching seed data:
- with the visitor JWT, GET /_userfriends/api/v1/friends/requests lists the seeded pending request (read-only);
- two fresh users from the throwaway registration helper (extend it so the caller also gets the e-mail it registered): A sends POST /friends/request with {email: B's e-mail} and gets 2xx, B finds the request in GET /friends/requests and accepts it with 2xx, and A's GET /friends lists B.
Add it to ALL_CHECKS. smoke.sh adds /friends.
- tests/client.test.ts: URL building, Bearer header, 422 mapping.
Commit the layer, vue-demo-app (with the link pin) and the scripts separately.
pnpm --dir ../vue-userfriends-layer test && pnpm --dir ../sm-demo-app/vue-demo-app run build && ../sm-demo-app/scripts/check-local.sh friends forum chat
<fails_when>Non-zero exit: the friends client tests or the build fail, or check-local reports friends, forum or chat failed (the seeded request missing, accept refused, or the chat page broken by the slot).</fails_when>
<acceptance_criteria>
- grep -c 'sidebar-footer' ../sm-demo-app/vue-demo-app/app/pages/chat.vue prints 1.
- grep -c "to=\"/friends\"" ../sm-demo-app/vue-demo-app/app/components/SiteHeader.vue prints 1.
- grep -rniE 'golem15\.demo|sm-demo|_demo/api' ../vue-userfriends-layer/app ../vue-userfriends-layer/nuxt.config.ts ../vue-userfriends-layer/README.md | wc -l prints 0.
</acceptance_criteria>
Members manage friends, requests and friend groups on /friends, reachable from the chat sidebar and the account area.
Task 3: Package legitimacy check before installing livekit-client
20-RESEARCH.md Package Legitimacy Audit (livekit-client flagged [SUS] too-new for its latest release; assumption A7), the output Claude prints before asking: `npm view livekit-client versions --json | tail -15`, `npm view livekit-client time --json` for the last five versions, `npm view livekit-client repository.url maintainers dist-tags scripts --json`, and the proposed exact version (the newest release at least 7 days old)
- The user approved a named exact version (recorded in the SUMMARY) or rejected the package; Task 4 installs only that version with `--save-exact`.
Nothing is installed yet. Claude proposes an exact livekit-client version for vue-chatvideo-layer, the client SDK the minimal call page (D-13) is built on.
1. Open https://www.npmjs.com/package/livekit-client and check that the publisher and maintainers are the LiveKit organization and the repository is github.com/livekit/client-sdk-js.
2. Check that the proposed version exists, is at least 7 days old and that `scripts` shows no install or postinstall hook.
3. Check the client SDK's server compatibility notes for LiveKit server 1.13.1 (the rome and local binary).
Reply "approved " or "rejected" with the reason.
Task 4: Video calls from DMs: the call button, the minimal call page and incoming-call prompts
Task 3 answered "approved "; LiveKit answers on http://127.0.0.1:7890/ (dev stack).
../vue-chatvideo-layer/.gitignore, ../vue-chatvideo-layer/.nvmrc, ../vue-chatvideo-layer/package.json, ../vue-chatvideo-layer/pnpm-lock.yaml, ../vue-chatvideo-layer/pnpm-workspace.yaml, ../vue-chatvideo-layer/tsconfig.json, ../vue-chatvideo-layer/nuxt.config.ts, ../vue-chatvideo-layer/README.md, ../vue-chatvideo-layer/.playground/nuxt.config.ts, ../vue-chatvideo-layer/.playground/app/app.vue, ../vue-chatvideo-layer/app/lib/videoClient.ts, ../vue-chatvideo-layer/app/lib/callMachine.ts, ../vue-chatvideo-layer/app/composables/useCall.ts, ../vue-chatvideo-layer/app/composables/useIncomingCalls.ts, ../vue-chatvideo-layer/app/components/Chatvideo/Call.vue, ../vue-chatvideo-layer/app/components/Chatvideo/Tile.vue, ../vue-chatvideo-layer/app/components/Chatvideo/CallButton.vue, ../vue-chatvideo-layer/app/components/Chatvideo/IncomingCall.vue, ../vue-chatvideo-layer/app/assets/css/chatvideo-base.css, ../vue-chatvideo-layer/i18n/locales/en.json, ../vue-chatvideo-layer/i18n/locales/pl.json, ../vue-chatvideo-layer/tests/callMachine.test.ts, ../sm-demo-app/vue-demo-app/package.json, ../sm-demo-app/vue-demo-app/nuxt.config.ts, ../sm-demo-app/vue-demo-app/app/pages/call/[conversation].vue, ../sm-demo-app/vue-demo-app/app/pages/chat.vue, ../sm-demo-app/vue-demo-app/app/layouts/default.vue, ../sm-demo-app/vue-demo-app/i18n/locales/en.json, ../sm-demo-app/vue-demo-app/i18n/locales/pl.json, ../sm-demo-app/scripts/check-local.sh, .planning/phases/20-demo-instance-with-every-shared-plugin/COVERAGE.md
../sm-demo-app/plugins/golem15/chatvideo/README.md, api/video.go, classes/video_service.go (Start, Join, Leave, End, declined path), classes/notifier.go (event names), ../vue-chat-layer/app/lib/realtime.ts (onUserEvent, subscribe) and README.md (slots), the livekit-client README and API docs for the approved version (Room, RoomEvent, Track, connect, localParticipant.setCameraEnabled and setMicrophoneEnabled, track attach and detach; through Context7 or ctx7 when available), ../sm-demo-app/vue-demo-app/{app/pages/chat.vue,app/layouts/default.vue}, .planning/phases/19.4.1-early-public-demo-on-demo-summercms-io/COVERAGE.md (matrix format), 20-RESEARCH.md (Pitfalls 8 and 9, assumption A1)
Per D-11, D-12, D-13, D-23.
Create ../vue-chatvideo-layer with the skeleton:
dependencies livekit-client@<approved> installed with --save-exact, and @nuxtjs/i18n 10.4.0;
peerDependencies nuxt 4.4.8 and vue-chat-layer: "^0.1.0"; devDependency vue-chat-layer at the git+https v0.1.0 tag for the playground;
no extends of vue-chat-layer (the app extends both).
app/lib/callMachine.ts (pure): states idle, starting, connecting, connected, ended and failed, and transition(state, event) for the events start, joined(token, url), connected, participantJoined, participantLeft, mute, unmute, cameraOff, cameraOn, leave, ended(reason) and error(code). Mute and camera flags live in the state. Token errors (401, 403, 404, 422 too many participants) map to failed with a reason key.
app/lib/videoClient.ts: start, join, leave, end and status over /conversations/{id}/video/... with the $chatAuth token getter.
app/composables/useCall.ts:
drives the machine; on start or join, await import('livekit-client'), creates a Room (adaptiveStream and dynacast on), connects with livekit_url and token, and enables camera and microphone;
maps RoomEvent participant and track events to tiles and attaches and detaches tracks to video elements;
offers mute and camera toggles through the local participant, and leave (disconnect, then POST leave);
subscribes to the session channel through vue-chat-layer's subscribe for ended and declined events, with the channel name always built by an exported helper videoSessionChannel(id) in app/lib/videoClient.ts, and disconnects on route leave and pagehide.
useIncomingCalls registers onUserEvent for video:call:incoming (never its own user:{me} subscription) and exposes the pending call.
Components:
ChatvideoCall (prop conversationId, start boolean): own camera tile, remote tiles (ChatvideoTile), mute, camera and leave buttons, the state text and failure messages from i18n;
ChatvideoCallButton (props conversationId and callPath(id)): starts and navigates;
ChatvideoIncomingCall: the caller name from the event payload, Accept (navigate to callPath) and Decline (POST leave; confirm in video_service.go that this publishes declined for a participant who never joined, else use the endpoint that does).
No screen share (D-13).
vue-demo-app:
pnpm link dependency; extends gains 'vue-chatvideo-layer' after 'vue-chat-layer'; goPaths '/_chatvideo';
app/pages/call/[conversation].vue: ClientOnly ChatvideoCall for members (start when the query has start=1), the register prompt otherwise;
chat.vue <template #conversation-actions="{ conversation }"> renders ChatvideoCallButton with callPath id => '/call/' + id + '?start=1' (the slot only renders in DMs, D-23);
default.vue renders ClientOnly ChatvideoIncomingCall for members;
EN/PL copy (call.title, call.registerToCall).
check-local.sh check_call:
with the visitor JWT, POST /_chat/api/v1/contexts/demo/1/dm to a persona gives the DM id;
POST /_chatvideo/api/v1/conversations/{dm}/video/start answers 2xx with livekit_url and token;
POST .../video/end answers 2xx.
Add call to ALL_CHECKS.
tests/callMachine.test.ts (smoke): start, joined, connected, mute, leave and ended; a 422 start ends in failed with the too-many reason.
COVERAGE.md in the phase directory (format of 19.4.1's):
livekit-client capabilities (Room connect and disconnect, publish camera and microphone, subscribe and attach remote tracks, mute and unmute, camera toggle, participant events, connection state and reconnection, adaptiveStream and dynacast INTEGRATE; screen share, data channel, device selection, E2EE, recording and egress, simulcast tuning, audio-only mode OPT-OUT, each with a reason);
LiveKit server through chatvideo (room create and delete, token mint, list participants, reconcile INTEGRATE; egress, ingress, SIP and webhooks OPT-OUT);
Centrifugo (the chat, user and video namespaces with presence on chat INTEGRATE; history, recovery and client publish OPT-OUT);
Web Push through herald (VAPID keys and the public key route INTEGRATE; subscribe UI and push on chat events OPT-OUT, deferred per D-16).
Commit the layer, vue-demo-app (with the link pin), the scripts and COVERAGE.md (planning commit) separately.
pnpm --dir ../vue-chatvideo-layer test && pnpm --dir ../sm-demo-app/vue-demo-app run build && ../sm-demo-app/scripts/check-local.sh call chat
<fails_when>Non-zero exit: the call machine tests fail, the build fails (livekit-client not resolvable or a type error), or check-local reports call failed (start refused, no token or livekit_url, LiveKit's rtc/validate not 200) or chat failed.</fails_when>
<acceptance_criteria>
- grep -c "import('livekit-client')" ../vue-chatvideo-layer/app/composables/useCall.ts prints 1 and grep -rn "^import .*from 'livekit-client'" ../vue-chatvideo-layer/app | grep -vc 'import type' prints 0 (no static runtime import).
- grep -rn 'subscribe(' ../vue-chatvideo-layer/app | grep -vc 'videoSessionChannel' prints 0 (the layer's only subscriptions are session channels; incoming calls come through onUserEvent).
- node -p "require('../vue-chatvideo-layer/package.json').dependencies['livekit-client']" prints the approved version with no range character.
- grep -c 'conversation-actions' ../sm-demo-app/vue-demo-app/app/pages/chat.vue prints 1.
- COVERAGE.md has a reason on every OPT-OUT row (grep -c 'OPT-OUT | *|' .planning/phases/20-demo-instance-with-every-shared-plugin/COVERAGE.md prints 0).
</acceptance_criteria>
A member can start a video call from a DM, the other member gets an accept prompt on any page, and both meet on a minimal call page served by LiveKit.
Task 5: Herald's VAPID keys without UI, and the Forum, Friends and Calls tour cards
../sm-demo-app/scripts/dev.sh, ../sm-demo-app/deploy/env.example, ../sm-demo-app/README.md, ../sm-demo-app/vue-demo-app/app/pages/index.vue, ../sm-demo-app/vue-demo-app/app/components/TourCard.vue, ../sm-demo-app/vue-demo-app/i18n/locales/en.json, ../sm-demo-app/vue-demo-app/i18n/locales/pl.json, ../sm-demo-app/scripts/check-local.sh
../sm-demo-app/plugins/golem15/herald/README.md (keys, herald:vapid-generate, presence gate warning), ../sm-demo-app/scripts/dev.sh (ensure_env, build, up), ../sm-demo-app/deploy/env.example, ../sm-demo-app/vue-demo-app/app/pages/index.vue, app/components/TourCard.vue, i18n/locales/*.json (tour.*), ../sm-demo-app/scripts/check-local.sh (check_tour)
Per D-16 and the tour part of D-03.
- dev.sh: after build in `up` and `seed`, when .env lacks SUMMER_GOLEM15__HERALD__VAPID__PUBLIC_KEY, run `./bin/demo herald:vapid-generate --json -q`, append SUMMER_GOLEM15__HERALD__VAPID__PUBLIC_KEY and __PRIVATE_KEY from the JSON (python3 parse, umask 077, values never echoed) and SUMMER_GOLEM15__HERALD__VAPID__SUBJECT=mailto:demo@example.test. Print only "added the herald VAPID keys to .env".
- deploy/env.example: the three herald key names with empty values and a comment (generated on rome with herald:vapid-generate; no subscribe UI in this phase, D-16). README "Chat family" section: herald is mounted without UI.
- Tour:
- index.vue stops in order journal, presentations, quizzes, chat, forum (/forum), friends (/friends), calls (/chat with text tour.calls.text), payments, faq, accounts;
- TourCard icons forum, friends and calls added to the union and ICONS (outline, 24-unit grid, currentColor);
- en and pl tour.forum, tour.friends and tour.calls titles and texts, and the heading for ten cards.
- check-local.sh check_tour expects ten cards including Forum, Friends and Calls (EN) and their Polish titles. New `check_herald`: GET $GO/_herald/api/v1/push/vapid-public-key answers 401 without a JWT and 200 with the visitor's JWT and a non-empty publicKey (json_has); add `herald` to ALL_CHECKS and the header list.
Commit sm-demo-app (dev.sh, env.example, README, check-local) and vue-demo-app (tour) separately.
pnpm --dir ../sm-demo-app/vue-demo-app run build && ../sm-demo-app/scripts/dev.sh up && grep -q '^SUMMER_GOLEM15__HERALD__VAPID__PUBLIC_KEY=.' ../sm-demo-app/.env && ../sm-demo-app/scripts/check-local.sh herald tour
<fails_when>Non-zero exit: the build fails, dev.sh does not write the VAPID public key into .env, or check-local reports herald failed (the public-key route is not 200 with a non-empty publicKey for the visitor, or not 401 without a JWT) or tour failed (card count or titles wrong).</fails_when>
<acceptance_criteria>
- grep -c 'HERALD__VAPID__PRIVATE_KEY=' ../sm-demo-app/deploy/env.example prints 1, with no value after the equals sign.
- grep -c "'/_herald'" ../sm-demo-app/vue-demo-app/nuxt.config.ts prints 0.
- grep -cE "key: '(forum|friends|calls)'" ../sm-demo-app/vue-demo-app/app/pages/index.vue prints 3.
- dev.sh output contains no line with a key value (manual look at the up output, recorded in the SUMMARY).
</acceptance_criteria>
Herald runs with VAPID keys and no UI, and the tour shows all ten features in EN and PL.
Task 6: Go-ahead to create the forum, friends and video-call layer repositories, push them and tag v0.1.0
Claude's summary: `git log --oneline` of the three layers, their README install lines, vue-faq-layer's visibility, whether `tea login list` shows a git.golem15.com login, the livekit-client version approved in Task 3, and the results of check-local forum friends call tour chat.
- The user chose one option and it is recorded in the SUMMARY; with "release", the three repositories exist on git.golem15.com (`git ls-remote` exits 0 for each) before Task 7 pushes, or Task 7 creates them with tea.
Create vue-forum-layer, vue-userfriends-layer and vue-chatvideo-layer on git.golem15.com, push main and tag v0.1.0 each?
Each layer is public with tagged releases that later sites pin (like D-01 for chat). v0.1.0 freezes their hooks, props and runtime keys. vue-chatvideo-layer's peer dependency on vue-chat-layer ^0.1.0 is part of its contract. vue-demo-app can pin them only after this. Repository creation and pushes need your go-ahead.
Create, push and tag all three
vue-demo-app pins the tags; the deploy (plan 05) can build.
The v0.1.0 contracts are public.
Hold
Contracts stay open for changes.
The deploy is blocked; vue-demo-app keeps local link pins, so it cannot be pushed.
For "release" without a tea login: create the three repositories (empty, default branch main, vue-faq-layer's visibility) in the git.golem15.com web UI, then reply. Do not paste tokens.
Reply "release" (add "repos ready" if you created them) or "hold".
Task 7: Release the three layers v0.1.0 and pin them in vue-demo-app
Pushed layer tags are installed by consumers' lockfiles; they can be superseded but must never move.
Task 6 resolved with "release".
../vue-forum-layer/README.md, ../vue-userfriends-layer/README.md, ../vue-chatvideo-layer/README.md, ../sm-demo-app/vue-demo-app/package.json, ../sm-demo-app/vue-demo-app/pnpm-lock.yaml
The three READMEs, ../sm-demo-app/vue-demo-app/package.json, the Task 6 answer
For each of the three layers:
- create the repository with tea if missing, at vue-faq-layer's visibility;
- add the origin `git@git.golem15.com:golem15/.git` and push main;
- fix a README install line that says the tag does not exist before tagging;
- create the annotated tag v0.1.0, push it and check `ls-remote` against HEAD.
Then in vue-demo-app run `pnpm add` with the three `git+https://git.golem15.com/golem15/.git#v0.1.0` specs (replacing the link pins), run the tests and the build, and commit package.json and pnpm-lock.yaml (`feat: pin the forum, friends and video-call layers v0.1.0`). Do not push vue-demo-app.
for l in vue-forum-layer vue-userfriends-layer vue-chatvideo-layer; do [ "$(git -C ../$l ls-remote origin 'refs/tags/v0.1.0^{}' | cut -f1)" = "$(git -C ../$l rev-parse HEAD)" ] || exit 1; grep -q "$l.git#v0.1.0" ../sm-demo-app/vue-demo-app/package.json || exit 1; done && pnpm --dir ../sm-demo-app/vue-demo-app test && pnpm --dir ../sm-demo-app/vue-demo-app run build && ../sm-demo-app/scripts/check-local.sh forum friends call chat tour
Non-zero exit: a remote tag is missing or differs from HEAD, a tag pin is missing from package.json, the vue-demo-app tests or build fail, or a check-local check fails against the tagged layers.
- `git -C ../sm-demo-app/vue-demo-app status --porcelain -- package.json pnpm-lock.yaml` prints nothing.
- `node -p "Object.values(require('../sm-demo-app/vue-demo-app/package.json').dependencies).filter(v=>v.startsWith('link')).length"` prints 0.
Forum, friends and video-call layers are published at v0.1.0 and the demo site builds against all tagged layers.
<threat_model>
Trust Boundaries
Boundary
Description
forum posts and friend names to other members' browsers
untrusted content
browser to LiveKit (signal through nginx, media direct)
WebRTC with a short-lived join token
realtime events to the incoming-call prompt
payloads from the server about other users
npm registry to the chatvideo layer
a new third-party dependency (livekit-client)
STRIDE Threat Register
Threat ID
Category
Component
Severity
Disposition
Mitigation Plan
T-20-20
Tampering
forum stored XSS
high
mitigate
posts render only content_html, which the server sanitizes on write with breakwater (D-18 of the forum port); Markdown is previewed through the server endpoint; acceptance grep limits v-html to content_html
T-20-21
Spoofing
call joins
high
mitigate
tokens are minted by chatvideo only for conversation participants (sessionForActor) with token_ttl 900; the client never builds tokens; LiveKit room max_participants 4 (D-12)
T-20-22
Information disclosure
camera and microphone
medium
mitigate
media starts only after an explicit start or accept on the call page; leave and pagehide disconnect and stop local tracks
T-20-23
Tampering
incoming-call payloads
low
mitigate
caller names render as text bindings; Accept navigates only to the app's callPath built from the numeric conversation id
T-20-24
Denial of service
call spam
medium
mitigate
server bucket video-initiate 5/min, max_duration 900 and the reconcile job (D-12); calls only offered in DMs (D-23)
T-20-25
Information disclosure
friend enumeration
low
mitigate
the API's generic 422 for refused requests is shown as is; the directory lists demo members only (the same set the chat member picker shows)
T-20-26
Information disclosure
VAPID private key
high
mitigate
generated into .env only (umask 077, never echoed); env.example holds names; /_herald is not routed by the site's goPaths
T-20-SC
Tampering
npm installs
high
mitigate
livekit-client installed only after the blocking human-verify legitimacy checkpoint (Task 3, gate blocking-human, never auto-approved) at an exact version with no install scripts; every other package is an existing workspace pin
</threat_model>
- Task 1: forum client tests, app build, check-local forum.
- Task 2: friends client tests, build, check-local friends forum chat.
- Task 3: livekit-client version approved by the user.
- Task 4: call machine tests, build, check-local call chat, COVERAGE.md complete.
- Task 5: build, VAPID keys in .env, herald route present, check-local tour.
- Task 6: go-ahead recorded.
- Task 7: three remote tags equal HEAD; vue-demo-app tests, build and checks green on tags.
<success_criteria>
The demo site shows the forum, friends and DM video calls through three new shared layers (SC-2, D-11 to D-15, D-21, D-23), herald is configured without UI (D-16), and the tour lists every feature.
</success_criteria>
Create `.planning/phases/20-demo-instance-with-every-shared-plugin/20-04-SUMMARY.md` when done: the approved livekit-client version, the decline endpoint used, each layer's public API, the three tags and commits, and both checkpoint answers.