create-brainerce-store 1.52.1 → 1.52.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +13 -2
- package/package.json +1 -1
- package/templates/nextjs/base/AGENTS.md.ejs +65 -0
- package/templates/nextjs/base/AI-GUIDE.md +31 -0
- package/templates/nextjs/base/CLAUDE.md.ejs +76 -0
- package/templates/nextjs/designs/atelier/messages-patch/en.json +2 -1
- package/templates/nextjs/designs/atelier/messages-patch/he.json +2 -1
- package/templates/nextjs/designs/atelier/ui/home/hero-section.tsx +26 -0
- package/templates/nextjs/base/AGENTS.md +0 -41
- package/templates/nextjs/base/CLAUDE.md +0 -52
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Run it with no flags for a fully interactive setup. The CLI fetches your store's
|
|
|
14
14
|
|
|
15
15
|
Every scaffold ships **Atelier** — a complete, AI-built storefront look (not just a color theme): warm editorial gallery with soft washes + glass surfaces, a floating hero collage, near-full-bleed product grid, styled popover dropdowns, a mini-cart drawer that opens on add-to-cart, and an RTL-safe fly-to-cart micro-interaction. Fully de-branded — driven by your store's name, catalog and dashboard content.
|
|
16
16
|
|
|
17
|
-
It's a starting point, not a lock-in: the entire look lives in `src/ui/` + `globals.css` and is designed to be rewritten (see below).
|
|
17
|
+
It's a starting point, not a lock-in: the entire look lives in `src/ui/` + `globals.css` and is designed to be rewritten (see below). The shipped texts are **example content** (a boutique voice, like any template's sample copy) — your catalog replaces the imagery automatically, and the copy lives in `messages/` ready to be rewritten by you or an AI session. On a brand-new store with no products yet, the homepage hero shows a designed placeholder that swaps for your first published products.
|
|
18
18
|
|
|
19
19
|
## Blank-canvas mode
|
|
20
20
|
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var require_package = __commonJS({
|
|
|
31
31
|
"package.json"(exports2, module2) {
|
|
32
32
|
module2.exports = {
|
|
33
33
|
name: "create-brainerce-store",
|
|
34
|
-
version: "1.52.
|
|
34
|
+
version: "1.52.4",
|
|
35
35
|
description: "Scaffold a production-ready e-commerce storefront connected to Brainerce",
|
|
36
36
|
bin: {
|
|
37
37
|
"create-brainerce-store": "dist/index.js"
|
|
@@ -393,6 +393,9 @@ async function scaffold(options) {
|
|
|
393
393
|
const templateVars = {
|
|
394
394
|
projectName: options.projectName,
|
|
395
395
|
connectionId: options.connectionId,
|
|
396
|
+
/** Raw store name for prose contexts (markdown docs) — JS/env contexts
|
|
397
|
+
* must keep using the escaped storeNameJs / storeNameEnv variants. */
|
|
398
|
+
storeName: cleanStoreName,
|
|
396
399
|
storeNameJs: toJsStringLiteral(cleanStoreName),
|
|
397
400
|
titleTemplateJs: toJsStringLiteral(`%s | ${cleanStoreName}`),
|
|
398
401
|
storeNameEnv: toEnvLiteral(cleanStoreName),
|
|
@@ -963,7 +966,15 @@ Your store will be running at http://localhost:3000
|
|
|
963
966
|
Your store will be running at http://localhost:3000`);
|
|
964
967
|
logger.info(
|
|
965
968
|
`
|
|
966
|
-
|
|
969
|
+
The storefront ships with example boutique copy as a starting point \u2014
|
|
970
|
+
your real products replace the imagery automatically, and the texts
|
|
971
|
+
live in messages/ (or let an AI session rewrite them).`
|
|
972
|
+
);
|
|
973
|
+
logger.info(
|
|
974
|
+
`
|
|
975
|
+
Want a unique design? Open THE STORE FOLDER ITSELF in Claude Code
|
|
976
|
+
(not a parent folder \u2014 that's how CLAUDE.md auto-loads and the AI
|
|
977
|
+
knows this is a live, connected Brainerce storefront), then run:
|
|
967
978
|
/design <your art-direction brief>
|
|
968
979
|
(commerce stays intact \u2014 see AI-GUIDE.md)`
|
|
969
980
|
);
|
package/package.json
CHANGED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# AGENTS.md — this is a LIVE Brainerce storefront
|
|
2
|
+
|
|
3
|
+
**Store: "<%- storeName %>" · sales channel `<%- connectionId %>` — already
|
|
4
|
+
connected.** Products, cart, checkout, coupons, discounts, orders and content
|
|
5
|
+
flow in real time from the Brainerce dashboard. There is nothing to hook up.
|
|
6
|
+
|
|
7
|
+
- **NEVER suggest connecting this store to Shopify, WooCommerce, or "a real
|
|
8
|
+
system"** — Brainerce IS the commerce backend, and this store is wired to
|
|
9
|
+
it end-to-end.
|
|
10
|
+
- **NEVER build standalone HTML mockups or demo pages** — design THIS Next.js
|
|
11
|
+
app. Run `pnpm dev` and you are working against live data.
|
|
12
|
+
- **NEVER hardcode products, prices, or currency** — the catalog is live.
|
|
13
|
+
- **No server side is needed** — the backend is Brainerce's cloud. This repo
|
|
14
|
+
is a frontend (plus thin, already-included API proxy routes under
|
|
15
|
+
`src/app/api/`). Do not scaffold databases, auth servers, or admin panels —
|
|
16
|
+
the merchant manages everything in the Brainerce dashboard.
|
|
17
|
+
|
|
18
|
+
Platform docs (endpoints, SDK, integration recipes): https://brainerce.com/docs
|
|
19
|
+
— AI-readable index: https://brainerce.com/llms.txt
|
|
20
|
+
|
|
21
|
+
**Before building any feature the merchant asks for** (loyalty points,
|
|
22
|
+
shipping zones, subscriptions, gift cards, multi-currency, reviews,
|
|
23
|
+
abandoned-cart recovery, etc.) — check the docs first. Brainerce likely
|
|
24
|
+
already has it as a platform capability (dashboard toggle + hook/SDK
|
|
25
|
+
method) that only needs a UI in `src/ui/`, not a feature built from scratch.
|
|
26
|
+
|
|
27
|
+
Your job here is almost always **design**.
|
|
28
|
+
|
|
29
|
+
## The one rule
|
|
30
|
+
|
|
31
|
+
**`src/core/` is the platform's. `src/ui/` is yours.**
|
|
32
|
+
|
|
33
|
+
The shipped `src/ui/` is a working reference, not a design to preserve —
|
|
34
|
+
full delete-and-rebuild of ui files is encouraged and expected.
|
|
35
|
+
Rewrite anything under `src/ui/` and `src/app/globals.css` as boldly as you
|
|
36
|
+
like — the store keeps working. Never modify `src/core/`, `src/app/api/`, or
|
|
37
|
+
the checkout/auth/account components. Data and behavior come exclusively from
|
|
38
|
+
`@/core/hooks/*` and `@/core/providers/store-provider` — hooks return state
|
|
39
|
+
and handlers, never JSX. Never hardcode catalog content.
|
|
40
|
+
|
|
41
|
+
**Read `AI-GUIDE.md` before any redesign** — it has the full file map, hook
|
|
42
|
+
contracts, motion language, and hard-won RTL/i18n gotchas that will save you
|
|
43
|
+
real debugging time.
|
|
44
|
+
|
|
45
|
+
## Redesigning?
|
|
46
|
+
|
|
47
|
+
Follow the process documented in AI-GUIDE.md: commit to one art direction,
|
|
48
|
+
rewrite tokens first, then surfaces in order (header, home, card, product
|
|
49
|
+
page, cart), then verify.
|
|
50
|
+
|
|
51
|
+
## Verify before declaring done
|
|
52
|
+
|
|
53
|
+
1. `pnpm exec tsc --noEmit` → 0 errors
|
|
54
|
+
2. `pnpm dev` → drive the changed flow in a real browser (home → product →
|
|
55
|
+
add to cart → cart)
|
|
56
|
+
3. Screenshot desktop (1440px) and mobile (390px)
|
|
57
|
+
4. RTL stores: check anchoring and arrow directions
|
|
58
|
+
|
|
59
|
+
## i18n
|
|
60
|
+
|
|
61
|
+
Every user-facing string goes through `useTranslations()` with keys in **all**
|
|
62
|
+
files under `messages/`. The shipped copy is example boutique content — a
|
|
63
|
+
starting point meant to be rewritten in the store's real voice. Hebrew: no
|
|
64
|
+
uppercase transforms, no wide letter-spacing on headings, logical CSS
|
|
65
|
+
properties only (`ms-/me-`, `ps-/pe-`, `start-/end-`).
|
|
@@ -103,6 +103,37 @@ Beautiful is the top priority — the first render must wow. Hard rules:
|
|
|
103
103
|
it ("would a Lovable user accept this?"), fix, and only then move on.
|
|
104
104
|
|
|
105
105
|
|
|
106
|
+
## Motion language (CSS-first)
|
|
107
|
+
|
|
108
|
+
The store should feel alive, premium and intentional — every animation guides
|
|
109
|
+
attention, confirms an action, or rewards exploration. Rules:
|
|
110
|
+
|
|
111
|
+
- **Timing tokens** (use these, never ad-hoc numbers): 80ms instant feedback ·
|
|
112
|
+
180ms hover · 300ms UI state change · 500-600ms section entrance · 900ms
|
|
113
|
+
hero only. Stagger siblings 40-80ms.
|
|
114
|
+
- **Easing**: entrances `cubic-bezier(0.16, 1, 0.3, 1)` (out-expo); springy
|
|
115
|
+
pops `cubic-bezier(0.34, 1.56, 0.64, 1)` (out-back); loops and hovers
|
|
116
|
+
ease-in-out. Exits faster than entrances.
|
|
117
|
+
- **Reveals**: below-the-fold sections animate on viewport entry
|
|
118
|
+
(IntersectionObserver — see `src/ui/shared/reveal.tsx`), never tied to
|
|
119
|
+
scroll distance. One orchestrated reveal per section beats scattered
|
|
120
|
+
effects; `viewport once` — do not re-animate on every scroll.
|
|
121
|
+
- **Micro-interactions**: CSS/WAAPI first (see `src/ui/shared/fly-to-cart.ts`
|
|
122
|
+
for the pattern) — ripple, bump, image zoom, quick-add slide-up are all
|
|
123
|
+
achievable without a library.
|
|
124
|
+
- **Pointer effects** (magnetic buttons, tilt cards, custom cursor, mouse
|
|
125
|
+
parallax): desktop only — gate on `(pointer: fine)` and no-op under
|
|
126
|
+
`prefers-reduced-motion`. `will-change: transform` ONLY on elements animated
|
|
127
|
+
per-frame; never sprinkle it broadly.
|
|
128
|
+
- **Never `transition-all`** — always name the property
|
|
129
|
+
(`transition-transform`, `transition-opacity`). Animate only compositor
|
|
130
|
+
properties (`transform`, `opacity`) — never layout properties
|
|
131
|
+
(width/height/top/margin). 60fps is non-negotiable.
|
|
132
|
+
- **Ambient effects** (gradient blobs, particles): maximum one per page, hero
|
|
133
|
+
only — never on inner pages.
|
|
134
|
+
- **framer-motion / GSAP are not installed.** They are allowed, but they are
|
|
135
|
+
new runtime dependencies — flag it to the user before adding.
|
|
136
|
+
|
|
106
137
|
## Hard-won gotchas (each one cost a real debugging session)
|
|
107
138
|
|
|
108
139
|
- **RTL + cloned images**: `next/image` renders its `<img>` with `inset: 0`.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# CLAUDE.md — this is a LIVE Brainerce storefront
|
|
2
|
+
|
|
3
|
+
**Store: "<%- storeName %>" · sales channel `<%- connectionId %>` — already
|
|
4
|
+
connected.** Products, cart, checkout, coupons, discounts, orders and content
|
|
5
|
+
flow in real time from the Brainerce dashboard. There is nothing to hook up.
|
|
6
|
+
|
|
7
|
+
- **NEVER suggest connecting this store to Shopify, WooCommerce, or "a real
|
|
8
|
+
system"** — Brainerce IS the commerce backend, and this store is wired to
|
|
9
|
+
it end-to-end.
|
|
10
|
+
- **NEVER build standalone HTML mockups or demo pages** — design THIS Next.js
|
|
11
|
+
app. Run `pnpm dev` and you are working against live data.
|
|
12
|
+
- **NEVER hardcode products, prices, or currency** — the catalog is live.
|
|
13
|
+
- **No server side is needed** — the backend is Brainerce's cloud. This repo
|
|
14
|
+
is a frontend (plus thin, already-included API proxy routes under
|
|
15
|
+
`src/app/api/`). Do not scaffold databases, auth servers, or admin panels —
|
|
16
|
+
the merchant manages everything in the Brainerce dashboard.
|
|
17
|
+
|
|
18
|
+
Platform docs (endpoints, SDK, integration recipes): https://brainerce.com/docs
|
|
19
|
+
— AI-readable index: https://brainerce.com/llms.txt
|
|
20
|
+
|
|
21
|
+
**Before building any feature the merchant asks for** (loyalty points,
|
|
22
|
+
shipping zones, subscriptions, gift cards, multi-currency, reviews,
|
|
23
|
+
abandoned-cart recovery, etc.) — check the docs first. Brainerce likely
|
|
24
|
+
already has it as a platform capability (dashboard toggle + hook/SDK
|
|
25
|
+
method) that only needs a UI in `src/ui/`, not a feature built from scratch.
|
|
26
|
+
|
|
27
|
+
Your job here is almost always **design**.
|
|
28
|
+
|
|
29
|
+
## The one rule
|
|
30
|
+
|
|
31
|
+
**`src/core/` is the platform's. `src/ui/` is yours.**
|
|
32
|
+
|
|
33
|
+
The shipped `src/ui/` is a working reference, not a design to preserve —
|
|
34
|
+
full delete-and-rebuild of ui files is encouraged and expected. (Stores
|
|
35
|
+
scaffolded with `--canvas` ship `src/ui/` as bare unstyled skeletons —
|
|
36
|
+
there is no reference look at all; the design is entirely yours to create.)
|
|
37
|
+
Rewrite anything under `src/ui/` and `src/app/globals.css` as boldly as you
|
|
38
|
+
like — the store keeps working. Never modify `src/core/`, `src/app/api/`, or
|
|
39
|
+
the checkout/auth/account components. Data and behavior come exclusively from
|
|
40
|
+
`@/core/hooks/*` and `@/core/providers/store-provider` — hooks return state
|
|
41
|
+
and handlers, never JSX. Never hardcode catalog content.
|
|
42
|
+
|
|
43
|
+
**Read `AI-GUIDE.md` before any redesign** — it has the full file map, hook
|
|
44
|
+
contracts, motion language, and hard-won RTL/i18n gotchas that will save you
|
|
45
|
+
real debugging time.
|
|
46
|
+
|
|
47
|
+
## The dialect
|
|
48
|
+
|
|
49
|
+
- `src/components/ui/` = official **shadcn/ui primitives** (Button, Card,
|
|
50
|
+
Badge, Input, Select, Accordion, Dialog, Sheet, Skeleton, …). Compose them;
|
|
51
|
+
extend looks via CVA **variants**, never repeated inline overrides.
|
|
52
|
+
- Icons: **lucide-react only** — no inline `<svg>`, no emoji-as-icons.
|
|
53
|
+
- Class merging: **`cn()`** from `@/core/lib/utils`.
|
|
54
|
+
- Colors/radius come from the semantic HSL tokens in `globals.css`
|
|
55
|
+
(`--primary`, `--card`, `--ring`, `--radius`, …) — restyle via tokens.
|
|
56
|
+
|
|
57
|
+
## Redesigning? Use the ready-made flow
|
|
58
|
+
|
|
59
|
+
Run `/design <your art-direction brief>` — it walks the whole process:
|
|
60
|
+
concept → implementation in `ui/` → verification.
|
|
61
|
+
|
|
62
|
+
## Verify before declaring done
|
|
63
|
+
|
|
64
|
+
1. `pnpm exec tsc --noEmit` → 0 errors
|
|
65
|
+
2. `pnpm dev` → drive the changed flow in a real browser (home → product →
|
|
66
|
+
add to cart → cart)
|
|
67
|
+
3. Screenshot desktop (1440px) and mobile (390px)
|
|
68
|
+
4. RTL stores: check anchoring and arrow directions
|
|
69
|
+
|
|
70
|
+
## i18n
|
|
71
|
+
|
|
72
|
+
Every user-facing string goes through `useTranslations()` with keys in **all**
|
|
73
|
+
files under `messages/`. The shipped copy is example boutique content — a
|
|
74
|
+
starting point meant to be rewritten in the store's real voice. Hebrew: no
|
|
75
|
+
uppercase transforms, no wide letter-spacing on headings, logical CSS
|
|
76
|
+
properties only (`ms-/me-`, `ps-/pe-`, `start-/end-`).
|
|
@@ -55,7 +55,8 @@
|
|
|
55
55
|
"newsletterPlaceholder": "Your email address",
|
|
56
56
|
"newsletterCta": "Subscribe",
|
|
57
57
|
"newsletterSuccess": "You are in! We promise to send only beautiful things.",
|
|
58
|
-
"newsletterPrivacy": "No spam. Unsubscribe anytime."
|
|
58
|
+
"newsletterPrivacy": "No spam. Unsubscribe anytime.",
|
|
59
|
+
"heroEmptyHint": "Your first published products will appear here"
|
|
59
60
|
},
|
|
60
61
|
"products": {
|
|
61
62
|
"listingSubtitle": "Our full collection — handmade, genuine materials and love for detail.",
|
|
@@ -55,7 +55,8 @@
|
|
|
55
55
|
"newsletterPlaceholder": "כתובת האימייל שלך",
|
|
56
56
|
"newsletterCta": "הרשמה",
|
|
57
57
|
"newsletterSuccess": "נרשמת בהצלחה! מבטיחים לשלוח רק דברים יפים.",
|
|
58
|
-
"newsletterPrivacy": "בלי ספאם. אפשר להסיר את ההרשמה בכל רגע."
|
|
58
|
+
"newsletterPrivacy": "בלי ספאם. אפשר להסיר את ההרשמה בכל רגע.",
|
|
59
|
+
"heroEmptyHint": "המוצרים הראשונים שתפרסמו לחנות יופיעו כאן"
|
|
59
60
|
},
|
|
60
61
|
"products": {
|
|
61
62
|
"listingSubtitle": "הקולקציה המלאה שלנו — עבודת יד, חומרים אמיתיים ואהבה לפרטים.",
|
|
@@ -130,6 +130,32 @@ export function HeroSection({
|
|
|
130
130
|
</span>
|
|
131
131
|
</div>
|
|
132
132
|
)}
|
|
133
|
+
|
|
134
|
+
{/* Empty catalog — the same floating composition as designed washes,
|
|
135
|
+
so a brand-new store still opens rich instead of half-blank. The
|
|
136
|
+
first two published products replace these automatically. */}
|
|
137
|
+
{!heroImage && (
|
|
138
|
+
<div
|
|
139
|
+
aria-hidden="true"
|
|
140
|
+
className="reveal reveal-delay-1 relative mx-auto h-[26rem] w-full max-w-md sm:h-[30rem] lg:col-span-6 lg:h-[34rem] lg:max-w-none"
|
|
141
|
+
>
|
|
142
|
+
<div
|
|
143
|
+
className="float-slow wash-forest absolute inset-y-0 start-[4%] flex w-[72%] -rotate-2 items-center justify-center overflow-hidden rounded-3xl border-4 border-background shadow-[0_36px_80px_-30px_hsl(var(--primary)/0.45)]"
|
|
144
|
+
style={{ '--float-rotate': '-2deg' } as React.CSSProperties}
|
|
145
|
+
>
|
|
146
|
+
<IconSparkle size={56} className="text-primary/25" />
|
|
147
|
+
<span className="glass absolute bottom-5 end-5 start-5 px-4 py-3 text-center text-sm font-medium text-muted-foreground">
|
|
148
|
+
{t('heroEmptyHint')}
|
|
149
|
+
</span>
|
|
150
|
+
</div>
|
|
151
|
+
<div
|
|
152
|
+
className="float-slower wash-sand absolute -end-2 top-[54%] flex aspect-[3/4] w-[38%] rotate-3 items-center justify-center rounded-3xl border-4 border-background shadow-[0_28px_60px_-24px_hsl(var(--primary)/0.4)] sm:end-0"
|
|
153
|
+
style={{ '--float-rotate': '3deg' } as React.CSSProperties}
|
|
154
|
+
>
|
|
155
|
+
<IconStar size={32} filled className="text-primary/20" />
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
)}
|
|
133
159
|
</div>
|
|
134
160
|
</section>
|
|
135
161
|
);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# AGENTS.md — this is a Brainerce storefront
|
|
2
|
-
|
|
3
|
-
This store's commerce engine (cart, checkout, variants, auth, i18n) is
|
|
4
|
-
already wired and working. Your job here is almost always **design**.
|
|
5
|
-
|
|
6
|
-
## The one rule
|
|
7
|
-
|
|
8
|
-
**`src/core/` is the platform's. `src/ui/` is yours.**
|
|
9
|
-
|
|
10
|
-
The shipped `src/ui/` is a working reference, not a design to preserve —
|
|
11
|
-
full delete-and-rebuild of ui files is encouraged and expected.
|
|
12
|
-
Rewrite anything under `src/ui/` and `src/app/globals.css` as boldly as you
|
|
13
|
-
like — the store keeps working. Never modify `src/core/`, `src/app/api/`, or
|
|
14
|
-
the checkout/auth/account components. Data and behavior come exclusively from
|
|
15
|
-
`@/core/hooks/*` and `@/core/providers/store-provider` — hooks return state
|
|
16
|
-
and handlers, never JSX. Never hardcode catalog content.
|
|
17
|
-
|
|
18
|
-
**Read `AI-GUIDE.md` before any redesign** — it has the full file map, hook
|
|
19
|
-
contracts, and hard-won RTL/i18n gotchas that will save you real debugging
|
|
20
|
-
time.
|
|
21
|
-
|
|
22
|
-
## Redesigning?
|
|
23
|
-
|
|
24
|
-
Follow the process documented in AI-GUIDE.md: commit to one art direction,
|
|
25
|
-
rewrite tokens first, then surfaces in order (header, home, card, product
|
|
26
|
-
page, cart), then verify.
|
|
27
|
-
|
|
28
|
-
## Verify before declaring done
|
|
29
|
-
|
|
30
|
-
1. `pnpm exec tsc --noEmit` → 0 errors
|
|
31
|
-
2. `pnpm dev` → drive the changed flow in a real browser (home → product →
|
|
32
|
-
add to cart → cart)
|
|
33
|
-
3. Screenshot desktop (1440px) and mobile (390px)
|
|
34
|
-
4. RTL stores: check anchoring and arrow directions
|
|
35
|
-
|
|
36
|
-
## i18n
|
|
37
|
-
|
|
38
|
-
Every user-facing string goes through `useTranslations()` with keys in **all**
|
|
39
|
-
files under `messages/`. Hebrew: no uppercase transforms, no wide
|
|
40
|
-
letter-spacing on headings, logical CSS properties only (`ms-/me-`, `ps-/pe-`,
|
|
41
|
-
`start-/end-`).
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md — this is a Brainerce storefront
|
|
2
|
-
|
|
3
|
-
This store's commerce engine (cart, checkout, variants, auth, i18n) is
|
|
4
|
-
already wired and working. Your job here is almost always **design**.
|
|
5
|
-
|
|
6
|
-
## The one rule
|
|
7
|
-
|
|
8
|
-
**`src/core/` is the platform's. `src/ui/` is yours.**
|
|
9
|
-
|
|
10
|
-
The shipped `src/ui/` is a working reference, not a design to preserve —
|
|
11
|
-
full delete-and-rebuild of ui files is encouraged and expected. (Stores
|
|
12
|
-
scaffolded with `--canvas` ship `src/ui/` as bare unstyled skeletons —
|
|
13
|
-
there is no reference look at all; the design is entirely yours to create.)
|
|
14
|
-
Rewrite anything under `src/ui/` and `src/app/globals.css` as boldly as you
|
|
15
|
-
like — the store keeps working. Never modify `src/core/`, `src/app/api/`, or
|
|
16
|
-
the checkout/auth/account components. Data and behavior come exclusively from
|
|
17
|
-
`@/core/hooks/*` and `@/core/providers/store-provider` — hooks return state
|
|
18
|
-
and handlers, never JSX. Never hardcode catalog content.
|
|
19
|
-
|
|
20
|
-
**Read `AI-GUIDE.md` before any redesign** — it has the full file map, hook
|
|
21
|
-
contracts, and hard-won RTL/i18n gotchas that will save you real debugging
|
|
22
|
-
time.
|
|
23
|
-
|
|
24
|
-
## The dialect
|
|
25
|
-
|
|
26
|
-
- `src/components/ui/` = official **shadcn/ui primitives** (Button, Card,
|
|
27
|
-
Badge, Input, Select, Accordion, Dialog, Sheet, Skeleton, …). Compose them;
|
|
28
|
-
extend looks via CVA **variants**, never repeated inline overrides.
|
|
29
|
-
- Icons: **lucide-react only** — no inline `<svg>`, no emoji-as-icons.
|
|
30
|
-
- Class merging: **`cn()`** from `@/core/lib/utils`.
|
|
31
|
-
- Colors/radius come from the semantic HSL tokens in `globals.css`
|
|
32
|
-
(`--primary`, `--card`, `--ring`, `--radius`, …) — restyle via tokens.
|
|
33
|
-
|
|
34
|
-
## Redesigning? Use the ready-made flow
|
|
35
|
-
|
|
36
|
-
Run `/design <your art-direction brief>` — it walks the whole process:
|
|
37
|
-
concept → implementation in `ui/` → verification.
|
|
38
|
-
|
|
39
|
-
## Verify before declaring done
|
|
40
|
-
|
|
41
|
-
1. `pnpm exec tsc --noEmit` → 0 errors
|
|
42
|
-
2. `pnpm dev` → drive the changed flow in a real browser (home → product →
|
|
43
|
-
add to cart → cart)
|
|
44
|
-
3. Screenshot desktop (1440px) and mobile (390px)
|
|
45
|
-
4. RTL stores: check anchoring and arrow directions
|
|
46
|
-
|
|
47
|
-
## i18n
|
|
48
|
-
|
|
49
|
-
Every user-facing string goes through `useTranslations()` with keys in **all**
|
|
50
|
-
files under `messages/`. Hebrew: no uppercase transforms, no wide
|
|
51
|
-
letter-spacing on headings, logical CSS properties only (`ms-/me-`, `ps-/pe-`,
|
|
52
|
-
`start-/end-`).
|