headless-bff-architecture

Propose a secure BFF architecture routing VTEX API calls with server-side cookie management.

39|9|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/vtex/ai-skills --skill headless-bff-architecture-vtex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: headless-bff-architecture
Source: https://github.com/vtex/ai-skills/tree/main/tracks/headless/skills/headless-bff-architecture
Command: npx skills add https://github.com/vtex/ai-skills --skill headless-bff-architecture-vtex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing or modifying a headless VTEX storefront requires a secure, scalable Backend-for-Frontend (BFF) to proxy private VTEX APIs, manage shopper sessions, and protect API keys from exposure.

Core Features & Use Cases

  • Guidance on BFF layer design for routing public vs private endpoints, and server-side management of VtexIdclientAutCookie.
  • Credentials and key management best practices to prevent leakage and abuse.
  • Use cases include building a headless storefront, authenticating shoppers, and proxying sensitive requests through the BFF.

Quick Start

Set up a minimal BFF scaffold with session-based authentication and a secure proxy for private VTEX APIs.

Frequently Asked Questions about headless-bff-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I secure VTEX API keys in a headless storefront architecture?

To secure VTEX API keys in a headless storefront, use a Backend-for-Frontend (BFF) to proxy private API calls and manage credentials server-side. This prevents sensitive keys from leaking to the client browser.

What is the best way to manage VtexIdclientAutCookie for shopper sessions?

Managing VtexIdclientAutCookie server-side is the best way to handle shopper sessions. The BFF architecture securely routes requests and handles session validation without exposing cookies to the public client.

How do I separate public and private endpoints in a VTEX BFF?

You separate public and private endpoints in a VTEX BFF by routing them through /pub and /pvt paths respectively. This modular setup ensures only authorized requests access sensitive private API operations.

Do I need a BFF to proxy VTEX API calls?

Yes, you need a BFF to proxy VTEX API calls when building a headless storefront. It acts as a secure middleware layer that validates requests, handles sessions, and protects API keys from public exposure.

Can I use a proxy to prevent VTEX API key leakage?

Yes, using a BFF proxy prevents VTEX API key leakage by keeping segregated keys on the server. The proxy validates requests and handles authentication, ensuring keys never reach the frontend client.