Skip to content

docs: add frontend process, wireframe kit, and SVG generation pipeline#28

Merged
phuongnse merged 3 commits into
mainfrom
docs/frontend-process-and-wireframe-kit
May 16, 2026
Merged

docs: add frontend process, wireframe kit, and SVG generation pipeline#28
phuongnse merged 3 commits into
mainfrom
docs/frontend-process-and-wireframe-kit

Conversation

@phuongnse

@phuongnse phuongnse commented May 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • docs/PROCESS.md (new) — step-by-step checklists for backend (module setup + per-US TDD workflow) and frontend (Phase 1 foundation + Phase 2 per-feature workflow); extracted from CLAUDE.md to keep it concise
  • Wireframe kitlogin.excalidraw (login screen) + _template.excalidraw (full UI component kit with 12 sections: color palette, typography, buttons, form controls, badges, navigation, sidebar, table, cards, feedback, modal, app shell); generated by generate-template.mjs
  • SVG generation pipelinedocs/scripts/generate-wireframes.ps1 mirrors generate-diagrams.ps1; POSTs .excalidraw to Kroki.io /excalidraw/svg and saves the result; Kroki only supports SVG (not PNG) for Excalidraw, and SVG renders inline on GitHub and scales better as a vector format

Docs updated

  • CLAUDE.md — wireframe convention updated to .svg, generation script referenced
  • docs/PATTERNS.md — wireframe pattern updated with SVG workflow and pitfall note
  • docs/PROCESS.md — step 2 updated to include generate-wireframes.ps1
  • docs/README.md — wireframes section added with navigation table
  • docs/epics/E02-identity-access/features/F01-authentication.md — wireframe callout updated to .svg

Test plan

  • Open docs/wireframes/login.svg — renders the login screen wireframe
  • Open docs/wireframes/_template.svg — renders all 12 UI component sections
  • Run .\docs\scripts\generate-wireframes.ps1 — regenerates both SVGs successfully
  • Run node docs/wireframes/generate-template.mjs — regenerates _template.excalidraw

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Added a comprehensive step-by-step development process for backend and frontend.
    • Introduced wireframe conventions (authoring, naming, one-per-screen, linking from feature files) and updated Definition of Done to require committed wireframe + regenerated preview and feature-file callout.
    • Updated docs navigation and feature pages to reference wireframes.
  • Chores

    • Added a script to regenerate wireframe SVG previews from source files.
    • Added a template generator and initial login wireframe asset.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR establishes a formal wireframe workflow by introducing process documentation, generation tooling, and a concrete login wireframe example. It adds docs/PROCESS.md for step-by-step backend and frontend development, updates CLAUDE.md with wireframe requirements in the Definition of Done, documents Excalidraw conventions in PATTERNS.md, and provides PowerShell and Node scripts to manage wireframe conversion and templating.

Changes

Wireframe Workflow & Documentation

Layer / File(s) Summary
Process Documentation Foundation
docs/PROCESS.md, CLAUDE.md, docs/README.md
Introduces docs/PROCESS.md documenting backend and frontend step-by-step workflows, reorders CLAUDE.md to read process guidance earlier, and adds Process navigation to README.
Wireframe Convention & Definition of Done
docs/PATTERNS.md, CLAUDE.md
Documents wireframe conventions (Excalidraw JSON + SVG, kebab-case naming, one per screen, Kroki.io regeneration) in PATTERNS.md, adds Frontend Development Process section to CLAUDE.md, updates Definition of Done for new screens, and extends docs update requirements to include wireframe .svg regeneration.
Wireframe Generation & Template Tools
docs/scripts/generate-wireframes.ps1, docs/wireframes/generate-template.mjs
Adds PowerShell exporter to convert .excalidraw.svg via Kroki.io and Node script that programmatically generates a comprehensive Excalidraw template with deterministic UI primitives, section builders for color palettes, typography, buttons, form controls, navigation, tables, cards, feedback, modals, and app shell, with auto-stacked sections and computed vertical layout.
Login Wireframe & Feature Integration
docs/wireframes/E02-identity-access/login.excalidraw, docs/epics/E02-identity-access/features/F01-authentication.md, docs/README.md
Adds login.excalidraw as the concrete login screen wireframe with Axis logo, email/password form, sign-in button, and footer, links it from authentication feature docs, and introduces a Wireframes section to README with mapping of source and preview assets.

🎯 2 (Simple) | ⏱️ ~12 minutes

🐰 A wireframe workflow takes flight,
Excalidraw scripts in the night,
Login screens dancing with Kroki so bright,
Process and standards unite—
Axis sketches its features just right!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.53% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main changes: adding frontend process documentation, wireframe design assets, and an SVG generation pipeline.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/frontend-process-and-wireframe-kit

Comment @coderabbitai help to get the list of available commands and usage tips.

- Add docs/PROCESS.md with step-by-step checklists for both backend
  (new module setup + per-US TDD workflow) and frontend (Phase 1
  foundation + Phase 2 per-feature workflow)
- Add docs/wireframes/login.excalidraw — login screen wireframe
- Add docs/wireframes/_template.excalidraw — full UI component kit
  (12 sections: color palette, typography, buttons, form controls,
  badges, navigation, sidebar, table, cards, feedback, modal, app shell)
- Add docs/wireframes/generate-template.mjs — script to regenerate
  _template.excalidraw from source
- Add docs/scripts/generate-wireframes.ps1 — regenerates .svg previews
  from .excalidraw via Kroki.io (mirrors generate-diagrams.ps1 pattern)
- Switch wireframe preview format from .png to .svg (Kroki only supports
  SVG for Excalidraw; SVG renders inline on GitHub and scales better)
- Update CLAUDE.md, PATTERNS.md, PROCESS.md, README.md to reflect SVG
  convention and new generate-wireframes.ps1 workflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@phuongnse phuongnse force-pushed the docs/frontend-process-and-wireframe-kit branch from bce486d to 00e0751 Compare May 16, 2026 05:06

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CLAUDE.md`:
- Line 350: Update the acceptance criteria text that currently reads "PNG
exported alongside" to require an SVG preview instead (e.g., ".svg exported
alongside" or "SVG exported alongside") and align the wireframe convention
sentence to state the source is docs/wireframes/{screen-slug}.excalidraw with
{screen-slug}.svg as the rendered preview; update the nearby "Wireframe" callout
wording if necessary so the feature file guidance matches the new .svg
requirement.

In `@docs/epics/E02-identity-access/features/F01-authentication.md`:
- Around line 3-6: Move the existing '> **Wireframe**:
[docs/wireframes/login.excalidraw] · [preview]' callout so it appears
immediately after the feature title line '# F01 — Authentication' instead of
after the back-link; locate the '> **Wireframe**' callout in this file and
cut/paste it directly beneath the '# F01 — Authentication' header ensuring the
backlink '[← Back to E02](../README.md)' remains at the top or below as per
convention.

In `@docs/PATTERNS.md`:
- Around line 1443-1447: The fenced code block showing the wireframes directory
is missing a language tag (causing MD040); update the markdown fenced block (the
triple-backtick block containing "docs/wireframes/ ├── {screen-slug}.excalidraw
…") to include a language identifier such as "text" (i.e., change ``` to
```text) so the linter recognizes the block language.

In `@docs/README.md`:
- Line 16: Update the wireframes table row text to reflect the actual preview
format: replace the phrase "PNG preview" with "SVG preview" in the markdown row
that currently reads "| [Wireframes](./wireframes/) | Screen wireframes —
Excalidraw source + PNG preview |" so the README matches the project convention
that rendered previews are .svg files (docs/wireframes/{screen-slug}.svg).

In `@docs/scripts/generate-wireframes.ps1`:
- Around line 16-29: The catch blocks in generate-wireframes.ps1 currently only
log failures (using $svgPath and $excalidrawPath) and swallow errors so the
script exits successfully; update the catch blocks (both the shown one and the
similar block around lines 47-54) to propagate failure by either re-throwing the
caught error (throw $_) or explicitly exiting with a non-zero status (exit 1)
after logging, ensuring callers/CI detect partial/failed generation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6e085d07-e679-4485-bd77-e34d07c5efdc

📥 Commits

Reviewing files that changed from the base of the PR and between dbeec8c and bce486d.

⛔ Files ignored due to path filters (2)
  • docs/wireframes/_template.svg is excluded by !**/*.svg
  • docs/wireframes/login.svg is excluded by !**/*.svg
📒 Files selected for processing (9)
  • CLAUDE.md
  • docs/PATTERNS.md
  • docs/PROCESS.md
  • docs/README.md
  • docs/epics/E02-identity-access/features/F01-authentication.md
  • docs/scripts/generate-wireframes.ps1
  • docs/wireframes/_template.excalidraw
  • docs/wireframes/generate-template.mjs
  • docs/wireframes/login.excalidraw

Comment thread CLAUDE.md Outdated
Comment on lines +3 to +6
[← Back to E02](../README.md)

> **Wireframe**: [docs/wireframes/login.excalidraw](../../../wireframes/login.excalidraw) · [preview](../../../wireframes/login.svg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Move the > **Wireframe** callout directly under the feature title.

The callout is currently placed after the back-link. Per the convention, it should be immediately after # F01 — Authentication.

As per coding guidelines "Link from feature file with > **Wireframe** callout directly after feature title".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/epics/E02-identity-access/features/F01-authentication.md` around lines 3
- 6, Move the existing '> **Wireframe**: [docs/wireframes/login.excalidraw] ·
[preview]' callout so it appears immediately after the feature title line '# F01
— Authentication' instead of after the back-link; locate the '> **Wireframe**'
callout in this file and cut/paste it directly beneath the '# F01 —
Authentication' header ensuring the backlink '[← Back to E02](../README.md)'
remains at the top or below as per convention.

Comment thread docs/PATTERNS.md
Comment thread docs/README.md Outdated
Comment thread docs/scripts/generate-wireframes.ps1

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
docs/PATTERNS.md (1)

1443-1447: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add language identifier to the fenced code block.

The fence is missing a language tag, which triggers MD040. Add text after the opening fence.

Proposed fix
-```
+```text
 docs/wireframes/
 ├── {screen-slug}.excalidraw   ← source (JSON, diffable on GitHub)
 └── {screen-slug}.svg          ← rendered preview (vector, renders inline on GitHub)
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/PATTERNS.md around lines 1443 - 1447, The fenced code block showing the
docs/wireframes tree is missing a language tag and triggers MD040; update the
opening triple-backtick for that block to include the language identifier text
(i.e., change totext) so the snippet is properly annotated in
docs/PATTERNS.md; locate the block containing the directory listing (the lines
starting with "docs/wireframes/") and add text immediately after the opening
fence.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In @docs/PATTERNS.md:

  • Around line 1443-1447: The fenced code block showing the docs/wireframes tree
    is missing a language tag and triggers MD040; update the opening triple-backtick
    for that block to include the language identifier text (i.e., change ``` to
block containing the directory listing (the lines starting with
"docs/wireframes/") and add `text` immediately after the opening fence.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fcd4bd7c-67a2-42e5-8f90-ab3fd0ef4e3a

📥 Commits

Reviewing files that changed from the base of the PR and between bce486d and 00e0751.

⛔ Files ignored due to path filters (2)
  • docs/wireframes/_template.svg is excluded by !**/*.svg
  • docs/wireframes/login.svg is excluded by !**/*.svg
📒 Files selected for processing (9)
  • CLAUDE.md
  • docs/PATTERNS.md
  • docs/PROCESS.md
  • docs/README.md
  • docs/epics/E02-identity-access/features/F01-authentication.md
  • docs/scripts/generate-wireframes.ps1
  • docs/wireframes/_template.excalidraw
  • docs/wireframes/generate-template.mjs
  • docs/wireframes/login.excalidraw
✅ Files skipped from review due to trivial changes (4)
  • docs/epics/E02-identity-access/features/F01-authentication.md
  • docs/wireframes/login.excalidraw
  • docs/README.md
  • docs/PROCESS.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • CLAUDE.md
  • docs/scripts/generate-wireframes.ps1
  • docs/wireframes/generate-template.mjs

Mirror docs/epics/ structure: each module gets its own subfolder
under docs/wireframes/. Shared screens go in _shared/.
Update generate-wireframes.ps1 to recurse subfolders.
Update all path references in docs and feature files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
docs/PATTERNS.md (1)

1443-1451: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language tag to the fenced block at Line 1443.

The wireframe tree block is missing a fence language, which can trip MD040 in linted docs pipelines.

Suggested fix
-```
+```text
 docs/wireframes/
 ├── E02-identity-access/
 │   ├── login.excalidraw        ← source (JSON, diffable on GitHub)
 │   └── login.svg               ← rendered preview (vector, renders inline on GitHub)
 ├── E03-data-modeling/
 │   └── ...
 └── _shared/                    ← screens not belonging to a single module
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/PATTERNS.md around lines 1443 - 1451, The fenced code block showing the
wireframe tree in docs/PATTERNS.md is missing a language tag (tripping MD040);
update the opening fence from totext so the block is explicitly marked
as plain text. Locate the block that begins with the tree lines (the block
containing "docs/wireframes/" and the E02/E03/_shared entries) and change the
delimiter to ```text to satisfy the linter.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In @docs/PATTERNS.md:

  • Around line 1443-1451: The fenced code block showing the wireframe tree in
    docs/PATTERNS.md is missing a language tag (tripping MD040); update the opening
    fence from totext so the block is explicitly marked as plain text.
    Locate the block that begins with the tree lines (the block containing
    "docs/wireframes/" and the E02/E03/_shared entries) and change the delimiter to

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0af07627-d856-4708-b9fc-00bd892c734b

📥 Commits

Reviewing files that changed from the base of the PR and between 00e0751 and 27f55d0.

⛔ Files ignored due to path filters (1)
  • docs/wireframes/E02-identity-access/login.svg is excluded by !**/*.svg
📒 Files selected for processing (6)
  • CLAUDE.md
  • docs/PATTERNS.md
  • docs/README.md
  • docs/epics/E02-identity-access/features/F01-authentication.md
  • docs/scripts/generate-wireframes.ps1
  • docs/wireframes/E02-identity-access/login.excalidraw
✅ Files skipped from review due to trivial changes (4)
  • docs/epics/E02-identity-access/features/F01-authentication.md
  • docs/README.md
  • docs/wireframes/E02-identity-access/login.excalidraw
  • CLAUDE.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/scripts/generate-wireframes.ps1

- Move Wireframe callout to immediately after feature title in F01
- Fix README navigation table: PNG → SVG
- generate-wireframes.ps1 now returns exit code 1 on any failure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/scripts/generate-wireframes.ps1`:
- Around line 35-43: The pipeline building $wireframes and the conditional
assigning $filtered can collapse to a single scalar hashtable when only one
match is found; wrap the pipeline outputs in array subexpression to force arrays
so .Count and foreach work correctly—specifically, change creation of
$wireframes to use an array wrapper (e.g. @(...Get-ChildItem... | ForEach-Object
{ ... })) and ensure the $filtered assignment also wraps the result of the
Where-Object branch (and the else branch) with @(...) so $filtered is always an
array even for a single match.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 211c3ce8-dd5f-4c47-a9d7-cdb5efd5aea0

📥 Commits

Reviewing files that changed from the base of the PR and between 27f55d0 and 18aaa57.

📒 Files selected for processing (3)
  • docs/README.md
  • docs/epics/E02-identity-access/features/F01-authentication.md
  • docs/scripts/generate-wireframes.ps1
✅ Files skipped from review due to trivial changes (2)
  • docs/epics/E02-identity-access/features/F01-authentication.md
  • docs/README.md

Comment on lines +35 to +43
$wireframes = Get-ChildItem -Path $wireframesRoot -Filter "*.excalidraw" -Recurse |
ForEach-Object {
@{
src = $_.FullName
svg = [System.IO.Path]::ChangeExtension($_.FullName, ".svg")
}
}

$filtered = if ($Filter) { $wireframes | Where-Object { $_.src -like "*$Filter*" } } else { $wireframes }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Single-match filtering can break iteration and count.

On Line 35 and Line 43, single-result pipeline output can collapse to a scalar hashtable. That makes $filtered.Count incorrect and can break foreach ($w in $filtered) (iterating keys/entries instead of wireframe objects), which impacts the documented -Filter "login" path.

Suggested fix
-$wireframes = Get-ChildItem -Path $wireframesRoot -Filter "*.excalidraw" -Recurse |
-    ForEach-Object {
-        @{
-            src = $_.FullName
-            svg = [System.IO.Path]::ChangeExtension($_.FullName, ".svg")
-        }
-    }
+$wireframes = @(
+    Get-ChildItem -Path $wireframesRoot -Filter "*.excalidraw" -Recurse |
+        ForEach-Object {
+            [pscustomobject]@{
+                src = $_.FullName
+                svg = [System.IO.Path]::ChangeExtension($_.FullName, ".svg")
+            }
+        }
+)

-$filtered = if ($Filter) { $wireframes | Where-Object { $_.src -like "*$Filter*" } } else { $wireframes }
+$filtered = @(
+    if ($Filter) { $wireframes | Where-Object { $_.src -like "*$Filter*" } } else { $wireframes }
+)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$wireframes = Get-ChildItem -Path $wireframesRoot -Filter "*.excalidraw" -Recurse |
ForEach-Object {
@{
src = $_.FullName
svg = [System.IO.Path]::ChangeExtension($_.FullName, ".svg")
}
}
$filtered = if ($Filter) { $wireframes | Where-Object { $_.src -like "*$Filter*" } } else { $wireframes }
$wireframes = @(
Get-ChildItem -Path $wireframesRoot -Filter "*.excalidraw" -Recurse |
ForEach-Object {
[pscustomobject]@{
src = $_.FullName
svg = [System.IO.Path]::ChangeExtension($_.FullName, ".svg")
}
}
)
$filtered = @(
if ($Filter) { $wireframes | Where-Object { $_.src -like "*$Filter*" } } else { $wireframes }
)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/scripts/generate-wireframes.ps1` around lines 35 - 43, The pipeline
building $wireframes and the conditional assigning $filtered can collapse to a
single scalar hashtable when only one match is found; wrap the pipeline outputs
in array subexpression to force arrays so .Count and foreach work
correctly—specifically, change creation of $wireframes to use an array wrapper
(e.g. @(...Get-ChildItem... | ForEach-Object { ... })) and ensure the $filtered
assignment also wraps the result of the Where-Object branch (and the else
branch) with @(...) so $filtered is always an array even for a single match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant