BS-001 Initialize BortStack foundation and project workflow

This commit is contained in:
rob
2026-11-10 14:02:50 +00:00
parent 1ec90a082f
commit 52265961cb
119 changed files with 10298 additions and 64 deletions
+56
View File
@@ -0,0 +1,56 @@
# Generic UI, Accessibility, and Metadata Guide
This is a template foundation, not a complete design system. Generated projects must replace branding, public copy, legal placeholders, and metadata before production.
## Branding and theme
- Change the application name, default title, title template, and description in `react/src/config/site.js`.
- Change the baseline HTML metadata and theme color in `react/index.html`.
- Maintain shared Sass colors and surface/focus tokens in `react/src/styles/colors.scss`; component-specific layout remains in CSS modules beside the component.
- Supply product and developer assets with useful alternative text or an accessible link label. Do not use a logo as the only readable product name without an accessible equivalent.
- The inherited developer identity is configured under `site.developer` in `react/src/config/site.js`; change its name, URL, asset path, and accessible link label together if a generated project uses a different developer identity.
The generator replaces the generic application name in the HTML title, logo, and site configuration. Product descriptions, colors, icons, and images remain an explicit generated-project task.
## Page structure and responsive behaviour
- Keep one descriptive `h1` in each primary page view and use headings in order.
- Use semantic `main`, `article`, `section`, `nav`, `header`, and `footer` elements where their meaning applies.
- Preserve the global skip link and `#main-content` target in `react/src/App.jsx`.
- Build mobile-first. Check at approximately 320 px, 768 px, and a representative desktop width without treating those widths as a fixed support matrix.
- Avoid fixed heights around content that can wrap, translate, or expand. The header deliberately uses `min-height` so collapsed navigation can grow.
## Forms and interaction
- Every input needs a programmatically associated visible label unless an equally clear accessible-name pattern is justified.
- Provide client and server validation, disabled/loading submission controls, an error with `role="alert"`, and success/progress text with `role="status"` where appropriate.
- Errors must not reveal whether an account exists when that would enable enumeration.
- All actions must be keyboard reachable. Preserve the global `:focus-visible` indicator.
- Respect `prefers-reduced-motion`; do not add essential information that depends only on animation, color, hover, or pointer input.
- Recheck foreground/background contrast after changing shared theme values.
## Metadata, indexing, and public URLs
`react/src/components/PageMeta/PageMeta.jsx` controls the runtime title, description, and robots directive. Public informational pages may be indexed; login, registration, account-action, protected, error, and other private or utility pages must use `noIndex`.
`react/public/robots.txt` is deliberately domain-neutral. Before production:
1. Confirm which routes are genuinely public and useful to search engines.
2. Decide whether the SPA deployment needs prerendering or server rendering for the target crawler requirements. Runtime metadata alone does not guarantee crawler discovery.
3. Generate a sitemap containing only canonical public URLs after the production origin is known.
4. Add the absolute sitemap URL to `robots.txt`.
5. Add canonical and social-sharing metadata using confirmed production URLs and project-owned assets.
Do not place secrets, analytics identifiers, private routes, reset or verification tokens, or user-specific URLs in metadata or sitemaps.
## Legal placeholders
`react/src/views/Legal/Privacy.jsx` and `react/src/views/Legal/Terms.jsx` are warnings/placeholders only. They are not legal advice and are not production policies. Replace them following project-specific review of jurisdiction, users, data processing, providers, retention, cookies, and applicable law.
## Validation checklist
- Run `npm test`, `npm run lint`, and `npm run build` from `react/`.
- Test keyboard-only navigation, skip-link visibility, focus order, form errors, loading states, and navigation expansion.
- Inspect representative mobile, tablet, and desktop viewports.
- Inspect page titles, descriptions, robots directives, and the production `robots.txt` response.
- Use a suitable accessibility scanner when available, then manually review semantics and interaction; automated checks are not sufficient by themselves.