What problem does it solve?
This Skill helps prevent account takeover and credential leakage by enforcing a secure Backend-for-Frontend (BFF) architecture for headless VTEX storefronts, ensuring private VTEX APIs are never called directly from the browser.
Core Features & Use Cases
- BFF request proxying with credential injection: Routes all non-Intelligent Search VTEX API calls through the BFF while injecting server-side secrets in a controlled way.
- Strict session and token handling: Ensures
VtexIdclientAutCookie is stored server-side (session-based) and never placed in localStorage, sessionStorage, or client-exposed variables.
- API key protection and segmentation: Enforces that
VTEX_APP_KEY and VTEX_APP_TOKEN exist only in server-side environment variables, and recommends splitting keys by BFF module with least permissions.
- Public vs private endpoint classification: Uses
/pvt/ as a hard rule for BFF-only access and clarifies when /pub/ endpoints still require proxying for session safety.
Use case: You’re building a headless VTEX storefront (custom storefront, mobile app, or kiosk) where the frontend must never expose VTEX_APP_KEY / VTEX_APP_TOKEN and must not call private VTEX APIs directly; this Skill provides decision rules and a review checklist to harden the design.
Quick Start
Use the headless-bff-architecture skill to review your current headless VTEX setup and produce a secure BFF proxy plan that keeps VTEX secrets and shopper tokens server-side only.