- Adopt BoardUI (Pro init): theme tokens, Inter, .dark mode, Button, SegmentedControl, Meter, Skeleton and ThemeToggle; remap the app's color aliases onto BoardUI tokens and swap lucide for Remix icons - Retint BoardUI's neutral ramp to cool slate with a salmon accent; drop the dotted background; raise muted text contrast - Simplify the landing page and remove the overlap explorer - Planner: explicit "I have this" toggle on grocery lines, pantry panel above the menu with the staples list spelled out, sticky aisle header fix, and a "Download PDF" plan export (jsPDF, lazy-loaded) - Recipes: replace the family cabbage soup with Cade's Cabbage Soup (adds Bone-In Ham Steak to the catalog); remove Ham, Bean & Cabbage Soup - Remove unused BoardUI components, dependencies and exports Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5.8 KiB
This is NOT the Next.js you know
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ (resolved from this file's directory; in monorepos the next package may not be visible from the repo root) before writing any code. Heed deprecation notices.
This block is written and re-added by next dev — verify at node_modules/next/dist/server/lib/generate-agent-files.js. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
BoardUI design rules
This project uses BoardUI (React + Tailwind CSS v4, source-owned components under components/). These rules always apply when writing UI code. MCP tools are on demand; these rules are not optional context.
Components first
- Before hand-building any UI element, check for an installed BoardUI component under
components/base/andcomponents/application/, and prefer it. - Missing a component? Install it (BoardUI MCP
install_components, ornpx boardui@latest add <name>) instead of writing a lookalike. - Import through the
@/alias, e.g.import { Button } from "@/components/base/buttons/button".
Color: semantic tokens only
- Never use raw palette classes (
text-gray-500,bg-white,border-neutral-200) or hex/oklch literals. Every color rides a BoardUI semantic token, which also makes dark mode automatic. - Text:
text-text-primary,text-text-secondary,text-text-tertiary,text-text-placeholder, errorstext-text-error-primary. - Surfaces:
bg-background-primary-default,bg-background-secondary-default/-hover,bg-background-tertiary-default, page groundbg-background-full. - Borders:
border-border-button-default/-hover, hairlinesborder-separator-border, tablesborder-border-table, errorsborder-border-error-default. - Icons:
text-foreground-icon-primarythroughtext-foreground-icon-quaternary. - Charts: the
chart-1…chart-5tokens (plus-activevariants). CTAs and selection states: theaccent-50…accent-950ramp. - Dark mode flips tokens via the
.darkclass on<html>. Do not writedark:overrides with raw colors; if a token pair looks wrong in dark mode, pick a different token, not a literal.
Typography: composite utilities only
- Use BoardUI's composite type utilities:
text-title-1-medium,text-title-2-medium,text-title-3-semibold,text-headline-medium,text-body-medium,text-body-regular,text-body-2-*,text-caption-1-semibold, and friends. Each sets size, weight, line-height, and letter-spacing together. - Never rebuild type by stacking
text-sm font-medium leading-5; if a style seems missing, look instyles/typography.cssbefore inventing one.
Spacing and shape
- Stay on Tailwind's spacing scale (
gap-2,p-4,mt-6); prefer flex/gridgapover per-child margins. Arbitrary values (p-[13px]) only when matching an existing BoardUI component exactly. - Cards and panels:
rounded-3xlwithborder-border-button-default. Inputs and menu rows:rounded-mdtorounded-xl. Pills:rounded-full.
Mechanics
-
Direction: wrap the app (or a mixed-language region) in
DirectionProviderfrom@/components/foundations/direction/direction, with an explicit BCP 47locale(ar,he,en-US,zh-CN). Set matchinglanganddiron<html>for full-app RTL. CSSdiralone does not configure React Aria keyboard navigation or portal placement. UseuseDirection()for custom interactions and put its value on custom portal roots. -
Use logical styles:
ms/me,ps/pe,start/end,text-start/text-end,border-s/border-e,rounded-s/rounded-e, and inline logical CSS properties. Mirror navigation/disclosure glyphs and horizontal drawer motion in RTL. Preserve physical coordinates for measured geometry, charts, canvas, and decorative art. Keep code, OTP digits, email addresses and URLs in explicit LTR regions; isolate mixed text with<bdi>ordir="auto". Translating labels and formatting application data is separate from layout direction. See https://www.boardui.com/rtl. -
Internal vertical scroll regions must soften the top edge with a progressive blur and surface fade once scrolled, rather than sharply clipping content. Keep headers outside the scroll region. Use a stationary,
pointer-events-none,aria-hiddenoverlay in a relative wrapper: a 24px masked 1px backdrop blur, a 16px masked 4px backdrop blur, and a gradient from the enclosing semantic surface token to transparent. Ramp each layer's opacity from 0 to 1 over the first 24px of scrolling; keep it invisible at scrollTop 0. Apply opacity to the individual layers, never the overlay parent (a translucent parent creates a backdrop root and can break blur at normal browser zoom). Verify top/reset, overflow, light/dark mode, and 100% zoom; preserve keyboard scrolling and do not blur the whole content area. Thescroll-faderegistry item ships this recipe asScrollFade+useScrollFade(@/components/foundations/scroll-fade/scroll-fade); reuse it rather than rebuilding the layers. -
Merge classes with
cx()from@/utils/cx(tailwind-merge aware of BoardUI's composite text styles). No string concatenation, no plainclsx. -
Icons come from
@remixicon/react, passed as component references (leadingIcon={RiAddLine}), not rendered elements. -
Form components build on
react-aria-components; extend the installed BoardUI form components rather than raw<input>/<select>. -
Focus states:
outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring.
When unsure about a token, a component's API, or working example code, ask the BoardUI MCP server: get_theme, get_component, get_usage_examples.