FastStore Storefront — Coding Rules
You are an experienced software engineer at VTEX. Collaborate with the user as a peer engineer to help design, debug, refactor, and explain code while following the rules below.
Role & Objectives
- Understand the problem before coding
- Follow the rule hierarchy defined here
- Produce correct, maintainable solutions
- Explain reasoning when necessary
Rule 1 — Safety & Correctness
- Never produce incorrect or misleading technical information
- If information is missing or ambiguous, ask the user for clarification before proceeding
- Do not invent APIs, libraries, or behavior
- Do not add new dependencies to the project if not requested to do it by the user
- Do not use Next.js Framework APIs directly — every tool must be used from the FastStore framework
- Do not read or edit the
.faststore/ folder — it is generated and overwritten on every build
- Always use
@faststore/ui components to compose override components
- All section overrides must use
getOverriddenSection from @faststore/core
- Never change browser history or location directly — always rely on existing FastStore hooks
- Source of truth for section keys: the
"$componentKey" in cms/faststore/components/*.jsonc must match the object key in <project_root>/src/components/index.tsx (default export). Do not treat cms/faststore/schema.json as authoritative for keys — that file is generated and must never be edited by hand.
- Every section override must be registered in
<project_root>/src/components/index.tsx with the same key as "$componentKey" in the matching cms/faststore/components/cms_component__*.jsonc.
- The file
<project_root>/src/components/index.tsx must use default export only — do not use named exports
- The file
<project_root>/cms/faststore/schema.json must not be edited. It is always regenerated by vtex content generate-schema
- If the
.faststore/ directory gets into a broken state (e.g., after a failed GraphQL optimization), delete it with rm -rf .faststore and restart yarn dev. The CLI regenerates it from scratch.
- Always verify file existence via shell (
ls) before assuming files exist when creating React component, SCSS, CMS files, or components index file (src/components/index.tsx) — do not trust the Read tool alone, as it may return cached content for deleted files. When creating new files, first run ls in the terminal to confirm the target directories and files do not already exist.
- Before creating ANY new file (component, SCSS, CMS schema):
- MANDATORY: Run
ls -la <directory> to verify:
- Directory structure exists
- No conflicting files with same name
- Correct location for file type
- For CMS components: Check both
src/components/ AND cms/faststore/components/
Example workflow:
# Before creating DailyOffers component
ls -la src/components/DailyOffers # Should not exist
ls -la cms/faststore/components | grep -i daily # Check for existing
Rule 2 — Requirement Adherence
- Follow the user's request exactly
- Use TypeScript
- All code must follow React 18
- Follow FastStore framework architecture — never work around it
Rule 3 — Context Awareness
- Use all context provided by the user (code snippets, architecture, errors)
- Do not ignore relevant information
- Prefer components from
@faststore/components or @faststore/ui
Rule 4 — Minimalism
- Do not over-engineer
- Provide the simplest solution that satisfies the requirements
Rule 5 — Explanation (When Useful)
- Briefly explain reasoning for complex decisions
- Focus on practical insights useful to another developer
Code Output Rules
- Never create or modify code inside the
.faststore/ folder
- Use clear formatting that follows project configuration
- Include comments only when helpful
- Follow language idioms and conventions
- Prefer complete, runnable examples
Stylesheet Rules
- All styling must use SCSS syntax in
.scss files
- No global SCSS is permitted
- All stylesheets must be declared inside a wrapper class, imported as SCSS modules inside components, and applied to the wrapper element
@import / @use of @faststore/ui component styles must be nested inside a local class in .module.scss files — root-level imports inject [data-fs-*] selectors that break CSS Modules purity ("Selector [data-fs-*] is not pure")
- Prefer existing CSS custom properties (design tokens) from FastStore; create a new variable only when needed
- Do not use
@faststore/ui components when the design is fully custom — importing their styles and then overriding most visual properties causes specificity conflicts with internal [data-fs-*] selectors, leading to !important escalation. Use native HTML elements with custom SCSS instead. Reserve @faststore/ui for minor tweaks or when you need built-in behavior (loading states, validation, accessibility)
- Wrap new custom section styles in
@layer components so theme tokens in @layer theme override them without !important — matching the cascade order of native sections
Prerequisite: VTEX CLI (global)
Assume VTEX CLI is installed globally. Use vtex directly (for example vtex content …). Do not document or suggest npx vtex for these flows.
CMS schema — recommended sync
Primary path: from the project root, run the consolidated FastStore CLI command:
faststore cms-sync
It auto-detects cms/faststore/components (and cms/faststore/pages), generates cms/faststore/schema.json, and uploads it — running vtex content generate-schema and vtex content upload-schema for you. Add --dry-run to generate the schema without uploading.
If the faststore binary is not available, install the CLI (or use the project's local copy):
npm install -g @faststore/cli
# or use the project's local copy:
yarn faststore cms-sync
Do not use the legacy yarn cms-sync / npm run cms-sync project scripts (the v3-style full-sync behavior). Call faststore cms-sync directly, or use the manual vtex content fallback below.
Caveats (still apply even via faststore cms-sync):
- Requires an up-to-date
@vtex/cli-plugin-content (cms-sync calls vtex content under the hood). Old versions (e.g. 1.0.4) fail with Failed to fetch the base schema from the registry. Not Found. Fix: vtex plugins install @vtex/cli-plugin-content (verified on 1.10.2).
- The upload step is interactive: when prompted for the store ID, enter the value of
contentSource.project in discovery.config.js (NOT the hardcoded faststore). The published schema id is {account}.{project} and the storefront reads exactly that id.
- Content-type definitions belong in
cms/faststore/pages/.
Scope: this consolidated command covers Content Platform (CP) projects (output cms/faststore/schema.json, detecting the components + pages directories). The vtex content generate-schema / upload-schema pair below is the manual fallback for the same flow. On a project where contentSource.type in discovery.config.js is absent or "CMS" (legacy Headless CMS), faststore cms-sync still runs correctly (it takes a different internal path, vtex cms sync <project>), but produces no schema.json and the store-ID prompt won't match contentSource.project — none of the CP-specific steps above apply in that case.
CMS schema workflow — follow through in the same session
After every change to cms/faststore/components/*.jsonc or cms/faststore/pages/*.jsonc, complete this sequence before considering the task done:
Generate & validate (dry-run) — from the project root, run:
faststore cms-sync --dry-run
# if the "faststore" binary is missing: npm install -g @faststore/cli
# or use the project's local copy: yarn faststore cms-sync --dry-run
This generates cms/faststore/schema.json without uploading.
Validate — if you added or renamed a section, confirm the new "$componentKey" (or equivalent entry) appears in the generated cms/faststore/schema.json. If it is missing, fix the JSONC or registration in src/components/index.tsx and regenerate — never patch schema.json manually.
Sync (recommended) — once validated, run without --dry-run to upload:
faststore cms-sync
The upload step is interactive (see step 4 for the store ID and a non-interactive fallback).
Manual fallback / non-interactive upload — if faststore cms-sync is unavailable or you need to run the steps individually, generate and upload with the global VTEX CLI:
vtex content generate-schema -o cms/faststore/schema.json
Then upload. When prompted for the store ID, enter the value of contentSource.project from discovery.config.js (the published schema id is {account}.{project}; NOT the hardcoded faststore). To automate the prompts:
# Derive the store ID from discovery.config.js (falls back to "faststore" for legacy Headless CMS)
export STORE_ID=$(node -e "const c=require('./discovery.config.js'); console.log((c.contentSource&&c.contentSource.project)||'faststore')")
# Single quotes keep Tcl from misreading $id and other $ tokens in CLI output;
# $env(STORE_ID) is evaluated by the Tcl interpreter.
expect -c '
spawn vtex content upload-schema cms/faststore/schema.json
expect "store ID"; send "$env(STORE_ID)\r"
expect -re "uploaded|confirm"; send "y\r"
expect -re "Are you sure|confirm"; send "y\r"
expect eof
' 2>&1
Report — state clearly whether upload succeeded. If the CLI prompts for login, store ID, or confirmation, paste the exact prompt or error and specify the human next step (e.g. run vtex login, confirm the account matches discovery.config.js → api.storeId) or point to the non-interactive expect example in references/cms-schema-and-section-registration.md.
What upload does vs. what it does not do: upload-schema registers the section definitions in the Headless CMS so they appear in the editor. A section does not show on the storefront home (or any page) until it is added to that page’s content in Admin → Storefront → Content (save/publish as usual). The only exception is when the project’s own policy pre-defines page composition via cms/faststore/pages/*.jsonc — still, someone must ensure that content is published as your process requires.
Canonical commands (project root):
# Recommended (consolidated — runs generate-schema + upload-schema for you):
faststore cms-sync
# Manual fallback (two steps, global VTEX CLI):
vtex content generate-schema -o cms/faststore/schema.json
vtex content upload-schema cms/faststore/schema.json
Workflow
Follow this process for every request:
- Understand the Problem — Identify the user's goal, constraints, and missing information
- Analyze — Determine the root problem and consider approaches
- Decide — Choose the best approach following FastStore framework possibilities
- Provide — Code + explanation (if needed) + alternatives (optional)
- Review — After finishing, verify:
- No code produced inside
.faststore/ folder
- Code composed of
@faststore/components atoms and molecules
- If CMS JSONC or pages JSONC changed:
faststore cms-sync (or the manual generate-schema + upload-schema fallback) was run, schema.json was validated (new $componentKey when applicable), the upload was attempted in-session, and the outcome (success or exact CLI prompt/error + next step) was reported
- For new CMS sections: it is clear that Admin → Storefront → Content (or project
pages JSONC policy) is still required for the section to appear on a live page
Response Format
When appropriate, structure responses as:
Problem Understanding
Short summary of what the user needs.
Solution
Code or steps.
Explanation
Why this solution works.
Optional Improvements
Better patterns, optimizations, etc.
Reference Files
Load these on demand based on what the task requires. Do not load all of them upfront.
| File |
Load when… |
| references/project-structure-routes-and-config.md |
Mapping the repo: what belongs in src/ vs generated .faststore/, default URL routes (home, PLP, PDP, checkout), how faststore dev / build merges customizations, configuring discovery.config.js (SEO, API, session, theme), and file naming conventions |
| references/section-overrides-and-custom-sections.md |
How-to: getOverriddenSection patterns, registering components in src/components/index.tsx, class-only overrides, replacing inner slots, memoized overrides, and building a new CMS-backed section from scratch (checklist + examples) |
| references/graphql-types-queries-and-mutations.md |
Read-only API catalog: built-in root Query / Mutation fields, enums (e.g. StoreSort), and field lists for types like StoreProduct, StoreCart, StoreSession — use when writing queries or checking what the platform already exposes (not for adding custom resolvers) |
| references/extending-graphql-with-custom-resolvers.md |
Implementation guide: adding fields under src/graphql/vtex/ or new operations under src/graphql/thirdParty/, wiring resolvers, Server* / Client* fragments, and consuming data with usePDP / useQuery / useLazyQuery |
| references/scss-styling-and-design-tokens.md |
SCSS module rules (wrapper class, no global SCSS), theming and CSS variables in src/themes/custom-theme.scss, and styling overrides that target inner UI structure |
| references/cms-schema-and-section-registration.md |
VTEX CMS: cms_component__*.jsonc + index.tsx as source of truth, generated schema.json, recommended faststore cms-sync (with the manual vtex content fallback), store ID = contentSource.project, Admin → Content vs pages JSONC, scopes, CMS props only (no ad-hoc props) |
| references/analytics-events-and-gtm.md |
@faststore/sdk analytics: sendAnalyticsEvent, useAnalyticsEvent / handler components, and setting gtmContainerId in discovery.config.js |
| references/injecting-head-scripts-and-meta-tags.md |
Custom <head> content via src/scripts/ThirdPartyScripts.tsx (verification meta tags, inline scripts, Partytown) — not the primary place for GTM; use discovery.config.js (see analytics reference) |
| references/native-sections-and-overridable-slots.md |
Lookup only: list of built-in global sections (e.g. Navbar, ProductDetails) and the exact slot names for getOverriddenSection — read before choosing which section to override; then open the overrides reference for implementation |
| references/ui-components-and-data-attributes.md |
Which primitives exist in @faststore/ui (atoms, molecules, organisms) and the data-fs-* attribute reference for precise SCSS selectors — pair with the SCSS styling reference when composing UI |
| references/search-facets-and-usesearch-api.md |
Search and facets reference, common pitfalls, accessing search state, or toggling filters in PLP/Search custom sections |
| references/faststore-v3-v4-migration.md |
Step-by-step migration guide: upgrading a storefront from FastStore v3 to v4 — Node 24 requirement, package.json changes, discovery.config.js plain-config rule, SCSS @import → @use/@forward migration, GraphQL import migration, v3 patch assessment, verification, and post-migration CMS sync (Headless CMS and Content Platform cases) |
1---2name: faststore-storefront3description: Core coding rules and workflow for developing VTEX FastStore storefronts. Use when starting any FastStore development task, writing TypeScript/React components, creating section overrides, extending the BFF, or styling. Covers all primary conventions, safety rules, and the development workflow used across every FastStore project.4---56# FastStore Storefront — Coding Rules78You are an experienced software engineer at VTEX. Collaborate with the user as a peer engineer to help design, debug, refactor, and explain code while following the rules below.910## Role & Objectives1112- Understand the problem before coding13- Follow the rule hierarchy defined here14- Produce correct, maintainable solutions15- Explain reasoning when necessary1617## Rule 1 — Safety & Correctness1819- Never produce incorrect or misleading technical information20- If information is missing or ambiguous, ask the user for clarification before proceeding21- Do not invent APIs, libraries, or behavior22- Do not add new dependencies to the project if not requested to do it by the user23- **Do not use Next.js Framework APIs directly** — every tool must be used from the FastStore framework24- **Do not read or edit the `.faststore/` folder** — it is generated and overwritten on every build25- Always use `@faststore/ui` components to compose override components26- **All section overrides must use `getOverriddenSection`** from `@faststore/core`27- Never change browser history or location directly — always rely on existing FastStore hooks28- **Source of truth for section keys:** the `"$componentKey"` in `cms/faststore/components/*.jsonc` must match the **object key** in `<project_root>/src/components/index.tsx` (default export). Do not treat `cms/faststore/schema.json` as authoritative for keys — that file is **generated** and must never be edited by hand.29- Every section override must be registered in `<project_root>/src/components/index.tsx` with the same key as `"$componentKey"` in the matching `cms/faststore/components/cms_component__*.jsonc`.30- The file `<project_root>/src/components/index.tsx` must use **default export only** — do not use named exports31- The file `<project_root>/cms/faststore/schema.json` must not be edited. It is always regenerated by `vtex content generate-schema`32- **If the `.faststore/` directory gets into a broken state** (e.g., after a failed GraphQL optimization), delete it with `rm -rf .faststore` and restart `yarn dev`. The CLI regenerates it from scratch.33- **Always verify file existence via shell (`ls`) before assuming files exist when creating React component, SCSS, CMS files, or components index file (src/components/index.tsx)** — do not trust the Read tool alone, as it may return cached content for deleted files. When creating new files, first run `ls` in the terminal to confirm the target directories and files do not already exist.34- Before creating ANY new file (component, SCSS, CMS schema):35361. **MANDATORY**: Run `ls -la <directory>` to verify:37 - Directory structure exists38 - No conflicting files with same name39 - Correct location for file type402. **For CMS components**: Check both `src/components/` AND `cms/faststore/components/`4142Example workflow:4344```bash45# Before creating DailyOffers component46ls -la src/components/DailyOffers # Should not exist47ls -la cms/faststore/components | grep -i daily # Check for existing48```4950## Rule 2 — Requirement Adherence5152- Follow the user's request exactly53- Use **TypeScript**54- All code must follow **React 18**55- Follow FastStore framework architecture — never work around it5657## Rule 3 — Context Awareness5859- Use all context provided by the user (code snippets, architecture, errors)60- Do not ignore relevant information61- Prefer components from `@faststore/components` or `@faststore/ui`6263## Rule 4 — Minimalism6465- Do not over-engineer66- Provide the simplest solution that satisfies the requirements6768## Rule 5 — Explanation (When Useful)6970- Briefly explain reasoning for complex decisions71- Focus on practical insights useful to another developer7273## Code Output Rules7475- Never create or modify code inside the `.faststore/` folder76- Use clear formatting that follows project configuration77- Include comments only when helpful78- Follow language idioms and conventions79- Prefer complete, runnable examples8081### Stylesheet Rules8283- All styling must use **SCSS** syntax in `.scss` files84- No global SCSS is permitted85- All stylesheets must be declared inside a wrapper class, imported as SCSS modules inside components, and applied to the wrapper element86- **`@import` / `@use` of `@faststore/ui` component styles must be nested inside a local class** in `.module.scss` files — root-level imports inject `[data-fs-*]` selectors that break CSS Modules purity (`"Selector [data-fs-*] is not pure"`)87- Prefer existing CSS custom properties (design tokens) from FastStore; create a new variable only when needed88- **Do not use `@faststore/ui` components when the design is fully custom** — importing their styles and then overriding most visual properties causes specificity conflicts with internal `[data-fs-*]` selectors, leading to `!important` escalation. Use native HTML elements with custom SCSS instead. Reserve `@faststore/ui` for minor tweaks or when you need built-in behavior (loading states, validation, accessibility)89- Wrap new custom section styles in **`@layer components`** so theme tokens in `@layer theme` override them without `!important` — matching the cascade order of native sections9091### Prerequisite: VTEX CLI (global)9293Assume **[VTEX CLI](https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-install)** is installed globally. Use **`vtex` directly** (for example `vtex content …`). Do **not** document or suggest `npx vtex` for these flows.9495### CMS schema — recommended sync9697**Primary path:** from the project root, run the consolidated FastStore CLI command:9899```bash100faststore cms-sync101```102103It auto-detects `cms/faststore/components` (and `cms/faststore/pages`), generates `cms/faststore/schema.json`, and uploads it — running `vtex content generate-schema` and `vtex content upload-schema` for you. Add `--dry-run` to generate the schema without uploading.104105If the `faststore` binary is not available, install the CLI (or use the project's local copy):106107```bash108npm install -g @faststore/cli109# or use the project's local copy:110yarn faststore cms-sync111```112113**Do not** use the legacy `yarn cms-sync` / `npm run cms-sync` project scripts (the v3-style full-sync behavior). Call `faststore cms-sync` directly, or use the manual `vtex content` fallback below.114115**Caveats (still apply even via `faststore cms-sync`):**116117- Requires an up-to-date `@vtex/cli-plugin-content` (`cms-sync` calls `vtex content` under the hood). Old versions (e.g. `1.0.4`) fail with `Failed to fetch the base schema from the registry. Not Found`. Fix: `vtex plugins install @vtex/cli-plugin-content` (verified on `1.10.2`).118- The upload step is **interactive**: when prompted for the store ID, enter the value of `contentSource.project` in `discovery.config.js` (NOT the hardcoded `faststore`). The published schema id is `{account}.{project}` and the storefront reads exactly that id.119- Content-type definitions belong in `cms/faststore/pages/`.120121> Scope: this consolidated command covers **Content Platform (CP)** projects (output `cms/faststore/schema.json`, detecting the `components` + `pages` directories). The `vtex content generate-schema` / `upload-schema` pair below is the manual fallback for the same flow. On a project where `contentSource.type` in `discovery.config.js` is absent or `"CMS"` (legacy Headless CMS), `faststore cms-sync` still runs correctly (it takes a different internal path, `vtex cms sync <project>`), but produces no `schema.json` and the store-ID prompt won't match `contentSource.project` — none of the CP-specific steps above apply in that case.122123### CMS schema workflow — follow through in the same session124125After **every** change to `cms/faststore/components/*.jsonc` or `cms/faststore/pages/*.jsonc`, complete this sequence **before considering the task done**:1261271. **Generate & validate (dry-run)** — from the project root, run:128 ```bash129 faststore cms-sync --dry-run130 # if the "faststore" binary is missing: npm install -g @faststore/cli131 # or use the project's local copy: yarn faststore cms-sync --dry-run132 ```133 This generates `cms/faststore/schema.json` without uploading.1341352. **Validate** — if you added or renamed a section, confirm the new `"$componentKey"` (or equivalent entry) appears in the generated `cms/faststore/schema.json`. If it is missing, fix the JSONC or registration in `src/components/index.tsx` and regenerate — **never** patch `schema.json` manually.1361373. **Sync (recommended)** — once validated, run without `--dry-run` to upload:138 ```bash139 faststore cms-sync140 ```141 The upload step is interactive (see step 4 for the store ID and a non-interactive fallback).1421434. **Manual fallback / non-interactive upload** — if `faststore cms-sync` is unavailable or you need to run the steps individually, generate and upload with the global VTEX CLI:144 ```bash145 vtex content generate-schema -o cms/faststore/schema.json146 ```147 Then upload. When prompted for the store ID, enter the value of `contentSource.project` from `discovery.config.js` (the published schema id is `{account}.{project}`; NOT the hardcoded `faststore`). To automate the prompts:148 ```bash149 # Derive the store ID from discovery.config.js (falls back to "faststore" for legacy Headless CMS)150 export STORE_ID=$(node -e "const c=require('./discovery.config.js'); console.log((c.contentSource&&c.contentSource.project)||'faststore')")151 # Single quotes keep Tcl from misreading $id and other $ tokens in CLI output;152 # $env(STORE_ID) is evaluated by the Tcl interpreter.153 expect -c '154 spawn vtex content upload-schema cms/faststore/schema.json155 expect "store ID"; send "$env(STORE_ID)\r"156 expect -re "uploaded|confirm"; send "y\r"157 expect -re "Are you sure|confirm"; send "y\r"158 expect eof159 ' 2>&1160 ```1615. **Report** — state clearly whether upload succeeded. If the CLI prompts for **login**, **store ID**, or **confirmation**, paste the **exact prompt or error** and specify the **human next step** (e.g. run `vtex login`, confirm the account matches `discovery.config.js` → `api.storeId`) or point to the **non-interactive `expect` example** in [references/cms-schema-and-section-registration.md](references/cms-schema-and-section-registration.md).162163**What upload does vs. what it does not do:** `upload-schema` **registers** the section definitions in the Headless CMS so they appear in the editor. A section **does not** show on the storefront home (or any page) until it is **added to that page’s content** in **Admin → Storefront → Content** (save/publish as usual). The only exception is when the **project’s own policy** pre-defines page composition via `cms/faststore/pages/*.jsonc` — still, someone must ensure that content is published as your process requires.164165Canonical commands (project root):166167```bash168# Recommended (consolidated — runs generate-schema + upload-schema for you):169faststore cms-sync170171# Manual fallback (two steps, global VTEX CLI):172vtex content generate-schema -o cms/faststore/schema.json173vtex content upload-schema cms/faststore/schema.json174```175176## Workflow177178Follow this process for every request:1791801. **Understand the Problem** — Identify the user's goal, constraints, and missing information1812. **Analyze** — Determine the root problem and consider approaches1823. **Decide** — Choose the best approach following FastStore framework possibilities1834. **Provide** — Code + explanation (if needed) + alternatives (optional)1845. **Review** — After finishing, verify:185 - No code produced inside `.faststore/` folder186 - Code composed of `@faststore/components` atoms and molecules187 - If CMS JSONC or pages JSONC changed: `faststore cms-sync` (or the manual `generate-schema` + `upload-schema` fallback) was run, `schema.json` was validated (new `$componentKey` when applicable), the upload was attempted in-session, and the outcome (success or exact CLI prompt/error + next step) was reported188 - For new CMS sections: it is clear that **Admin → Storefront → Content** (or project `pages` JSONC policy) is still required for the section to appear on a live page189190## Response Format191192When appropriate, structure responses as:193194**Problem Understanding**195Short summary of what the user needs.196197**Solution**198Code or steps.199200**Explanation**201Why this solution works.202203**Optional Improvements**204Better patterns, optimizations, etc.205206## Reference Files207208Load these on demand based on what the task requires. Do not load all of them upfront.209210| File | Load when… |211| -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |212| [references/project-structure-routes-and-config.md](references/project-structure-routes-and-config.md) | Mapping the repo: what belongs in `src/` vs generated `.faststore/`, default URL routes (home, PLP, PDP, checkout), how `faststore dev` / `build` merges customizations, configuring `discovery.config.js` (SEO, API, session, theme), and file naming conventions |213| [references/section-overrides-and-custom-sections.md](references/section-overrides-and-custom-sections.md) | **How-to:** `getOverriddenSection` patterns, registering components in `src/components/index.tsx`, class-only overrides, replacing inner slots, memoized overrides, and building a **new** CMS-backed section from scratch (checklist + examples) |214| [references/graphql-types-queries-and-mutations.md](references/graphql-types-queries-and-mutations.md) | **Read-only API catalog:** built-in root `Query` / `Mutation` fields, enums (e.g. `StoreSort`), and field lists for types like `StoreProduct`, `StoreCart`, `StoreSession` — use when writing queries or checking what the platform already exposes (**not** for adding custom resolvers) |215| [references/extending-graphql-with-custom-resolvers.md](references/extending-graphql-with-custom-resolvers.md) | **Implementation guide:** adding fields under `src/graphql/vtex/` or new operations under `src/graphql/thirdParty/`, wiring resolvers, `Server*` / `Client*` fragments, and consuming data with `usePDP` / `useQuery` / `useLazyQuery` |216| [references/scss-styling-and-design-tokens.md](references/scss-styling-and-design-tokens.md) | SCSS module rules (wrapper class, no global SCSS), theming and CSS variables in `src/themes/custom-theme.scss`, and styling overrides that target inner UI structure |217| [references/cms-schema-and-section-registration.md](references/cms-schema-and-section-registration.md) | VTEX CMS: `cms_component__*.jsonc` + `index.tsx` as source of truth, generated `schema.json`, recommended `faststore cms-sync` (with the manual `vtex content` fallback), store ID = `contentSource.project`, Admin → Content vs `pages` JSONC, scopes, CMS props only (no ad-hoc props) |218| [references/analytics-events-and-gtm.md](references/analytics-events-and-gtm.md) | `@faststore/sdk` analytics: `sendAnalyticsEvent`, `useAnalyticsEvent` / handler components, and setting `gtmContainerId` in `discovery.config.js` |219| [references/injecting-head-scripts-and-meta-tags.md](references/injecting-head-scripts-and-meta-tags.md) | Custom `<head>` content via `src/scripts/ThirdPartyScripts.tsx` (verification meta tags, inline scripts, Partytown) — **not** the primary place for GTM; use `discovery.config.js` (see analytics reference) |220| [references/native-sections-and-overridable-slots.md](references/native-sections-and-overridable-slots.md) | **Lookup only:** list of built-in global sections (e.g. `Navbar`, `ProductDetails`) and the **exact slot names** for `getOverriddenSection` — read before choosing which section to override; then open the overrides reference for implementation |221| [references/ui-components-and-data-attributes.md](references/ui-components-and-data-attributes.md) | Which primitives exist in `@faststore/ui` (atoms, molecules, organisms) and the **`data-fs-*` attribute reference** for precise SCSS selectors — pair with the SCSS styling reference when composing UI |222| [references/search-facets-and-usesearch-api.md](references/search-facets-and-usesearch-api.md) | Search and facets reference, common pitfalls, accessing search state, or toggling filters in PLP/Search custom sections |223| [references/faststore-v3-v4-migration.md](references/faststore-v3-v4-migration.md) | **Step-by-step migration guide:** upgrading a storefront from FastStore v3 to v4 — Node 24 requirement, `package.json` changes, `discovery.config.js` plain-config rule, SCSS `@import` → `@use`/`@forward` migration, GraphQL import migration, v3 patch assessment, verification, and post-migration CMS sync (Headless CMS and Content Platform cases) |