create-brainerce-store 1.52.2 → 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/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),
|
|
@@ -969,7 +972,9 @@ live in messages/ (or let an AI session rewrite them).`
|
|
|
969
972
|
);
|
|
970
973
|
logger.info(
|
|
971
974
|
`
|
|
972
|
-
Want a unique design? Open
|
|
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:
|
|
973
978
|
/design <your art-direction brief>
|
|
974
979
|
(commerce stays intact \u2014 see AI-GUIDE.md)`
|
|
975
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-`).
|
|
@@ -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-`).
|