Write convention-sveltekit-spa convention note #51

Closed
opened 2026-03-27 00:22:06 +00:00 by forgejo_admin · 2 comments

Type

Feature

Lineage

Related to phase-pal-e-platform-29-sveltekit-convention — Phase 29 Deliverable 1.

Repo

forgejo_admin/pal-e-app

User Story

As a developer building SvelteKit apps on the platform
I want a single convention note documenting the required stack, auth, CSS, data fetching, and routing patterns
So that every app follows the same proven architecture

Context

The SvelteKit SPA pattern is already proven in mcd-tracker-app (adapter-static, keycloak-js + PKCE, client-side fetch, nginx Dockerfile) but it's not documented anywhere. Phase 29 of plan-pal-e-platform calls for creating convention-sveltekit-spa. The project-capacitor-mobile note has an empty sveltekit-spa-configuration section waiting for this content. Without the convention codified, each new SvelteKit app reinvents the pattern.

File Targets

No code files — this is a pal-e-docs knowledge artifact created via MCP tools.

Reference files to extract the pattern from:

  • ~/mcd-tracker-app/svelte.config.js — adapter-static config
  • ~/mcd-tracker-app/src/lib/keycloak.js — auth pattern
  • ~/mcd-tracker-app/src/lib/api.js — client-side fetch pattern
  • ~/mcd-tracker-app/Dockerfile — nginx serving pattern

Files the agent should NOT touch:

  • Any code files in any repo — this is pure documentation

Acceptance Criteria

  • convention-sveltekit-spa note exists in pal-e-docs with note_type convention
  • Convention covers: stack, auth, CSS, data fetching, routing, API config
  • project-capacitor-mobile > sveltekit-spa-configuration section is filled
  • Convention references mcd-tracker-app as the reference implementation

Test Expectations

  • get_note(slug="convention-sveltekit-spa") returns the note
  • get_section(slug="project-capacitor-mobile", anchor_id="sveltekit-spa-configuration") returns non-empty content
  • Run command: N/A — documentation only

Constraints

  • Extract patterns from mcd-tracker-app — do not invent new patterns
  • Follow existing convention note style (see convention-frontend-css for format reference)
  • Must cover Capacitor platform detection (web vs iOS redirect URIs)

Checklist

  • Convention note created
  • Capacitor mobile section filled
  • No unrelated changes
  • project-capacitor-mobile — blocked on this convention
  • phase-pal-e-platform-29-sveltekit-convention — parent phase
  • convention-frontend-css — sibling convention
  • sop-capacitor-mobile-lifecycle — pipeline context
### Type Feature ### Lineage Related to `phase-pal-e-platform-29-sveltekit-convention` — Phase 29 Deliverable 1. ### Repo `forgejo_admin/pal-e-app` ### User Story As a developer building SvelteKit apps on the platform I want a single convention note documenting the required stack, auth, CSS, data fetching, and routing patterns So that every app follows the same proven architecture ### Context The SvelteKit SPA pattern is already proven in mcd-tracker-app (adapter-static, keycloak-js + PKCE, client-side fetch, nginx Dockerfile) but it's not documented anywhere. Phase 29 of plan-pal-e-platform calls for creating `convention-sveltekit-spa`. The `project-capacitor-mobile` note has an empty `sveltekit-spa-configuration` section waiting for this content. Without the convention codified, each new SvelteKit app reinvents the pattern. ### File Targets No code files — this is a pal-e-docs knowledge artifact created via MCP tools. Reference files to extract the pattern from: - `~/mcd-tracker-app/svelte.config.js` — adapter-static config - `~/mcd-tracker-app/src/lib/keycloak.js` — auth pattern - `~/mcd-tracker-app/src/lib/api.js` — client-side fetch pattern - `~/mcd-tracker-app/Dockerfile` — nginx serving pattern Files the agent should NOT touch: - Any code files in any repo — this is pure documentation ### Acceptance Criteria - [ ] `convention-sveltekit-spa` note exists in pal-e-docs with note_type `convention` - [ ] Convention covers: stack, auth, CSS, data fetching, routing, API config - [ ] `project-capacitor-mobile` > `sveltekit-spa-configuration` section is filled - [ ] Convention references mcd-tracker-app as the reference implementation ### Test Expectations - [ ] `get_note(slug="convention-sveltekit-spa")` returns the note - [ ] `get_section(slug="project-capacitor-mobile", anchor_id="sveltekit-spa-configuration")` returns non-empty content - Run command: N/A — documentation only ### Constraints - Extract patterns from mcd-tracker-app — do not invent new patterns - Follow existing convention note style (see `convention-frontend-css` for format reference) - Must cover Capacitor platform detection (web vs iOS redirect URIs) ### Checklist - [ ] Convention note created - [ ] Capacitor mobile section filled - [ ] No unrelated changes ### Related - `project-capacitor-mobile` — blocked on this convention - `phase-pal-e-platform-29-sveltekit-convention` — parent phase - `convention-frontend-css` — sibling convention - `sop-capacitor-mobile-lifecycle` — pipeline context
Author
Owner

Scope Review: NEEDS_REFINEMENT

Review note: review-412-2026-03-26
Well-scoped documentation ticket with all template sections present and all 4 reference files verified. Two fixable issues found before this can move to next_up.

  • Missing story: label on board item #412 (has type:feature,arch:convention but no story traceability)
  • Undocumented dependencies -- board items #413 and #414 depend on this convention but have no depends:412 label
## Scope Review: NEEDS_REFINEMENT Review note: `review-412-2026-03-26` Well-scoped documentation ticket with all template sections present and all 4 reference files verified. Two fixable issues found before this can move to next_up. - **Missing `story:` label** on board item #412 (has `type:feature,arch:convention` but no story traceability) - **Undocumented dependencies** -- board items #413 and #414 depend on this convention but have no `depends:412` label
Author
Owner

Convention note created in pal-e-docs: convention-sveltekit-spa

What was done:

  1. Created convention-sveltekit-spa — full convention note under pal-e-agency project with tags convention, active. Covers:

    • Stack (adapter-static, keycloak-js PKCE, nginx:alpine)
    • Build configuration (svelte.config.js settings)
    • Authentication (Keycloak client setup, initialization, platform detection, env vars)
    • Data fetching (client-side fetch with API wrapper pattern)
    • Routing (auth guard pattern, public routes allowlist)
    • CSS (references convention-frontend-css)
    • Dockerfile + nginx.conf patterns
    • Keycloak redirect URI checklist
    • What NOT to do
    • Proven-in table (mcd-tracker-app = production, pal-e-app = migrating)
  2. Filled empty sveltekit-spa-configuration section on project-capacitor-mobile — added intro paragraph + summary table referencing the full convention note.

  3. Updated project-capacitor-mobile key-conventions list — added convention-sveltekit-spa reference.

Pattern proven in mcd-tracker-app, now documented for platform-wide adoption.

Convention note created in pal-e-docs: `convention-sveltekit-spa` **What was done:** 1. **Created `convention-sveltekit-spa`** — full convention note under `pal-e-agency` project with tags `convention, active`. Covers: - Stack (adapter-static, keycloak-js PKCE, nginx:alpine) - Build configuration (svelte.config.js settings) - Authentication (Keycloak client setup, initialization, platform detection, env vars) - Data fetching (client-side fetch with API wrapper pattern) - Routing (auth guard pattern, public routes allowlist) - CSS (references convention-frontend-css) - Dockerfile + nginx.conf patterns - Keycloak redirect URI checklist - What NOT to do - Proven-in table (mcd-tracker-app = production, pal-e-app = migrating) 2. **Filled empty `sveltekit-spa-configuration` section on `project-capacitor-mobile`** — added intro paragraph + summary table referencing the full convention note. 3. **Updated `project-capacitor-mobile` key-conventions list** — added `convention-sveltekit-spa` reference. Pattern proven in mcd-tracker-app, now documented for platform-wide adoption.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/pal-e-docs-app#51
No description provided.