* docs: regenerate API documentation from src/app/api (329 routes) The generator only recognised `export async function GET`, so every route exported as a guarded const (`export const GET = withAdmin(...)`) or a destructured re-export was missing: the doc listed 116 endpoints, many of them since renamed or removed, against 329 route files today. Teach it the other two export shapes and the withAuth/withAdmin guards, and regenerate both copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: archive dated audits, compliance trackers and migration proposals Moves point-in-time records into docs/archive/ (with a README saying they describe the day they were written): the 2026-01 dev-guide compliance plan, codebase audit, DRY/SSOT and Phase 1 fix logs, the 2026-02 overnight cross-project plan, the 2026-07-02 audit report, the 2026-07-06 Shopware migration plan and system migration strategy, and CODE_AUDIT.md. CODE_AUDIT.md was listed in .claude/CLAUDE.md, .gemini/GEMINI.md and docs/README.md as the current list of issues to fix while its own banner called it a historical snapshot; those entries now point at docs/AUDIT_BACKLOG_2026-08.md, the list of findings still open. docs/README also stops linking api/, legacy/ and reference/, which do not exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: archive closed trackers and docs for removed code Into docs/archive/: ARCHITECTURE_DEBT (status CLOSED 2026-06-30), DATABASE_AUDIT (Neon, pre-cutover), UPGRADE_PLAN (2026-06-03 snapshot; Tailwind 4 and React 19 are done), MIGRATION_PLAN_QQQ5 and PROFILES_SSOT_PLAN (both executed: migrations 105 and 121/122), production-ready-checklist (Frauenfeld plan that never shipped), and three docs whose code is gone: PROJECT_PAGES_GUIDE (src/components/projects and the per-project pages, now one [slug] route), RevampCopilot (no src/features/chatbot) and projects/upcycling (the /projects/upcycling pages and businessPlan messages are no longer in the tree). Inbound references follow the move, including three code comments. SHARED_CONTEXT and COMMANDS stop describing the upcycling mini-site as live; COMMANDS drops db:migrate-users, which is not a script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: correct live docs against the tree - BLOG_SYSTEM: rewritten from the code. There is no TinaCMS and no content/submissions; posts merge content/posts/*.md with blog_posts, and submissions are blog_submissions rows reviewed by staff. - installation guide: rewritten. There is no cms-api, no docker-compose.dev.yml and no default admin password; setup is services:up, db:migrate, setup-admins, dev. - RELIABILITY: migration 005b (not 005), no ENABLE_CMS gate, prod facts. - RESPONSIVE_DESIGN_SYSTEM: ResponsiveSection/Hero/Heading were removed; document Section, PageHero and Heading instead. - DEAD_CODE: the /api/repairers and /api/it-hilfe/helpers proxies and the routes.helpers alias are deleted, not 410; fix a stale line range. - DEV_GUIDE, AGENTS, claude/cursor/gemini guides, .cursorrules: DEVELOPMENT_GUIDELINES.md never existed here; protected files are in .claude/CLAUDE.md. src/config/site.ts -> org.ts/urls.ts; Next.js 16. - src/middleware.ts -> src/proxy.ts; components/ui/Button.tsx -> src/components/ui/button.tsx; reference page paths. - docs-paths baseline 68 -> 6, as the check asks when the count falls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD * docs: fix dead links in package and example READMEs ai-native-cms-core linked a Next.js plugin, a CLI and docs/quick-start.md that do not exist in this repo; ai-native-cms-react has no README; the saldo README pointed at the repo root instead of the implementation in src/lib/team/saldo.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD --------- Co-authored-by: Claude <noreply@anthropic.com>
13 KiB
Design System — The Final Solution
Last updated: 2026-06-27 (Marketplace/profile UX pass, compact type scale, single-button theme toggle)
TL;DR
The codebase had a bug class — "white text on grey dropdown" (BB.6) and its siblings — that kept reappearing because components bypassed the design primitives. The fix:
- Semantic tokens replaced palette scales as the API. Components use
bg-surface-base,text-text-primary,bg-action— notbg-white dark:bg-neutral-900,text-neutral-700 dark:text-neutral-300,bg-primary-600. - Primitives (
<Input>,<Select>,<Textarea>,<Button>,<Card>) consume semantic tokens internally. Callers get correct theming without writing a singledark:variant. - Lint warns on raw
<select>,<textarea>, and text<input>in feature code so the bug class can't return.
The colour direction: achromatic surfaces + RevampIT green only on action elements (primary buttons, links, focus rings, key icons). Everything else neutral. This preserves the brand pulse without making the whole UI green.
2026-06-27 UI/UX Guardrails
- Theme switching is a single cyclic icon button (
light -> dark -> system), not a three-button segmented control. - Public display headings use zero letter spacing and restrained
font-semiboldweights. Avoidtext-6xl+except for true hero/detail numbers with proven mobile fit. - Public navigation is organized by user jobs, not internal modules.
Marktplatzcontains the two customer jobs only: buy/sell hardware and request IT help. Professional services stay underDienstleistungen; supplier paths such as becoming a technician are secondary. - In mega menus, the first item in each section is the primary action and may render as a featured row. Keep each menu section to roughly 3 links; avoid unrelated catch-all columns.
- Marketplace creation must expose photos and fulfillment up front: use
ImageUploadGridfor listing photos and the delivery card selector forpickup,shipping, andboth. - RevampIT-owned stock published from inventory uses
REVAMPIT_LISTING_DELIVERYas the SSOT for public fulfillment. Cart checkout must offer the same pickup/shipping model as listing checkout. - Marketplace listing grids and seller profile listing grids share
ListingCard; do not hand-roll duplicate product cards. - Public seller and technician profiles should be useful overview pages: avatar/initial, location, trust/status, concise stats, then inventory/services. Keep these profile surfaces flat and reusable.
- IT-help pages prioritize requester actions.
Hilfe anfragenis the default path; technician browsing is secondary; technician registration belongs visually below requester flows. - Service listing cards are selection surfaces. They should have one primary row-level action (
Mehr erfahren/ detail), while booking happens on service detail pages.
The token system
Every visual decision is one of these tokens. Component code references
them via Tailwind utility classes; the values live in globals.css and
flip automatically with .dark on <html>.
Text — role-based
| Token | Tailwind class | Role |
|---|---|---|
--text-primary |
text-text-primary |
Headings, primary body |
--text-secondary |
text-text-secondary |
Body, descriptions |
--text-tertiary |
text-text-tertiary |
Meta, labels, secondary info |
--text-muted |
text-text-muted |
Placeholders, disabled |
--text-inverted |
text-text-inverted |
Text on dark/action surfaces |
Surfaces — role-based
| Token | Tailwind class | Role |
|---|---|---|
--surface-page |
bg-surface-page |
Body background |
--surface-base |
bg-surface-base |
Cards, panels, modals |
--surface-raised |
bg-surface-raised |
Sections, secondary fills |
--surface-overlay |
bg-surface-overlay |
Dropdowns, tooltips, popovers |
Borders — role-based
| Token | Tailwind class | Role |
|---|---|---|
--border-subtle |
border-subtle, divide-subtle |
Divider lines, table rows |
--border-default |
border (alone) |
Input borders, card edges |
--border-strong |
border-strong |
Focus rings, emphasis |
Action — the only chromatic colour
| Token | Tailwind class | Role |
|---|---|---|
--accent-action |
bg-action, text-action, border-action, ring-action |
Primary buttons, links, focus rings |
--accent-action-hover |
bg-action-hover |
Hover state |
--accent-action-muted |
bg-action-muted |
Subtle fills (badges, hover bg) |
--accent-action-text |
text-action-text |
Text colour ON action surfaces |
Status — minimum chromatic palette
For semantic states (error/warning/info/success) the existing error-X,
warning-X, info-X, success-X scales remain valid. These are NOT
arbitrary brand colours — they're conventional semantic signals (red =
problem, amber = caution, green = success). Keep using them for badges,
alerts, and validation states.
Authoring rule of thumb
When writing or reviewing component code:
| Goal | Use | Don't use |
|---|---|---|
| Card / panel background | bg-surface-base |
bg-white dark:bg-neutral-900 |
| Section / sub-panel background | bg-surface-raised |
bg-neutral-50 dark:bg-neutral-800 |
| Headline text | text-text-primary |
text-neutral-900 dark:text-white |
| Body text | text-text-secondary |
text-neutral-700 dark:text-neutral-300 |
| Meta / label text | text-text-tertiary |
text-neutral-500 dark:text-neutral-400 |
| Placeholder | text-text-muted |
text-neutral-400 dark:text-neutral-500 |
| Divider lines | divide-subtle, border-subtle |
divide-neutral-100 dark:divide-white/[0.04] |
| Input border | (just border) |
border-neutral-300 dark:border-white/[0.08] |
| Focus ring | ring-action |
ring-primary-500 |
| Primary button bg | bg-action hover:bg-action-hover text-action-text |
bg-primary-600 dark:bg-primary-500 ... |
| Subtle "active" chip | bg-action-muted text-action |
bg-primary-50 dark:bg-primary-500/10 text-primary-700 dark:text-primary-300 |
Form controls (<input>, <select>, <textarea>): never write raw
HTML — always use the primitives from @/components/ui/. ESLint warns
when you don't.
Migrating a surface
The mechanical pattern (no thinking required):
// BEFORE — palette scales + dark variants everywhere
<div className="bg-white dark:bg-neutral-900 rounded-lg border border-neutral-200 dark:border-white/[0.06]">
<h2 className="text-neutral-900 dark:text-white">Title</h2>
<p className="text-neutral-600 dark:text-neutral-400">Description</p>
<button className="bg-primary-600 hover:bg-primary-700 text-white">Action</button>
</div>
// AFTER — semantic tokens, no dark: needed
<div className="bg-surface-base rounded-lg border">
<h2 className="text-text-primary">Title</h2>
<p className="text-text-secondary">Description</p>
<button className="bg-action hover:bg-action-hover text-text-inverted">Action</button>
</div>
Reference migrated file: src/app/admin/appointments/page.tsx.
Migration backlog
Updated 2026-06-15 after OrangeCat/Loki audit + Phase 0 SSOT migration:
| Pattern | Approx. count | Status |
|---|---|---|
Raw <select> in feature code |
0 | Done. ESLint warns on new occurrences. |
Raw <textarea> in feature code |
0 | Done. |
Raw text <input> in feature code |
low | Most done; CommandBar search stays raw. |
Semantic token classes (text-text-*, bg-surface-*, bg-action, ui-public-*) |
~6,100 | Primary API — growing. |
Legacy palette + explicit dark: in feature code |
~169 → ~40 | Phase 2–4 sweep; chatbot/floating-ui migrated 2026-06-15. |
shadow-lg / shadow-xl on static surfaces |
~5 | ESLint warns on lg/xl/2xl; overlays use shadow-xs. |
| Phase 0 — SSOT adapters | done 2026-06-15 | design-system.ts, tokens.ts, config/ui/buttons.ts, core UI kit |
| Phase 3b — Shop + IT-Hilfe | done 2026-06-15 | shop overview/search/product/category, IT-Hilfe my/offers/create/accept/detail |
| Phase 4 — Lint graduation | partial 2026-06-15 | [locale]/** palette+shadow rules → error; chatbot/floating-ui/cookie migrated |
| Phase 5 — Admin/dashboard sweep | done 2026-06-15 | Dashboard cards → card-shell; overlays → shadow-xs; chart tooltips migrated |
| Phase 6 — Raw control migration | done 2026-06-15 | Primitives only in feature code; ESLint design rules → error project-wide |
Run pnpm run lint to see palette-class warnings (new rules as of 2026-06-15).
RevampIT vs OrangeCat — key differences
OrangeCat found semantic border utilities (border-default) not wired into
Tailwind. RevampIT already wires them via Tailwind v4 @theme
(border-subtle, border-default, border-strong in globals.css).
The RevampIT gap was different: SSOT split — globals.css was semantic
while design-system.ts, tokens.ts, and config/ui/buttons.ts still
exported palette scales into every <Button>, <Card>, and marketing
component. Phase 0 fixes that adapter layer.
Do not blind-codemod:
- Commerce orange (
secondary-*) ≠ semanticaction(green). Marketplace icon badges and hovers keepsecondary-*intentionally. - Status badges keep
error-*/warning-*/success-*palette scales. accent/ hover tints are not interchangeable withaction-muted.
Migration phases (recommended order)
- Phase 0 — SSOT adapters (done 2026-06-15):
design-system.ts,tokens.ts,config/ui/buttons.ts, core UI (Stepper,Modal,Pagination). - Phase 1 — UI kit remainder:
FilterBar,Tabs,EmptyState,ConfirmDialog,status-banner, floating-ui, chatbot. - Phase 2 — Feature/marketing pages: sweep remaining ~1,200 legacy refs; one surface per commit.
- Phase 3 — Public discipline: adopt
ui-public-*utilities on every[locale]/*marketing page (homepage/upcycling/techniker are reference). - Phase 4 — Lint graduation (partial 2026-06-15):
[locale]/**routes enforce palette + shadow rules as ESLint errors; chatbot, floating-ui, cookie banner migrated to semantic tokens. Remaining: admin/dashboard surfaces. - Phase 6 — Raw control migration (done 2026-06-15): all feature code uses
<Button>,<Input>,<Select>,<Textarea>; design-system ESLint rules are errors project-wide (AdminButton+src/components/ui/exempt). - Phase 7 — Legacy alias cleanup (done 2026-06-15): removed duplicate
:root/.dark--color-bg,--color-surface,--color-text, etc.;@themepalette scales (primary-*,error-*, …) remain for status badges.
Reference pages: src/app/[locale]/page.tsx,
src/app/[locale]/it-hilfe/techniker/[id]/TechnikerProfileView.tsx, src/app/admin/appointments/page.tsx.
Tailwind 4 — current state
RevampIT runs Tailwind CSS v4 with @import 'tailwindcss',
@custom-variant dark, and @theme token wiring in globals.css. The
2026-06-04 note about a failed upgrade is obsolete — the restructure
(@custom-variant + semantic tokens) is complete.
Remaining work is finishing the palette → semantic migration in feature
code, not another Tailwind upgrade. shadcn/ui remains optional; existing
primitives in src/components/ui/ are sufficient when they consume
designPrimitive.
Why this works
The BB.6 dropdown bug was structurally enabled by:
- The design system had primitives but didn't enforce their use.
- The token system existed (partially) but wasn't wired into Tailwind utility classes, so authoring with semantic tokens was awkward.
- There was no lint guardrail.
All three are fixed now. New components can't ship the bug. Existing components migrate one surface at a time without breaking siblings, because legacy palette scales still work. When the count of palette-scale classes hits zero, we can delete the legacy aliases and the rules graduate from warning to error.
Nothing more should be needed for the "never worry about design bugs again" goal. Tailwind 4 + shadcn are polish, not structure.
Navigation megamenus (2026-06-16)
Public header dropdowns follow one contract (x.ai-inspired, design-system strict):
| Element | Pattern |
|---|---|
| Panel | bg-surface-base, border-subtle, rounded-2xl — no shadows |
| Section label | Mono uppercase eyebrow (font-mono text-[10px] tracking-[0.18em] text-text-tertiary) |
| Links | Title + one-line text-text-secondary description when descriptionKey is set in nav config |
| Section footer | Mono “Overview →” linking to the section hub route |
| Avoid | Hero cards, stacked description paragraphs, primary-* rings, divide-neutral-* |
Structure SSOT: src/config/navigation.tsx. Rendering: MegaMenuContent.tsx (desktop) and MobileMenu.tsx (grouped sections). Labels: nav.items.* in locale messages.