- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
6. Storefront Development
Storefronts are built separately from the Medusa application. They interact with the Medusa application through the Store API routes.
You're free to choose how to build your storefront. You can start with our Next.js starter storefront, as explained in the next chapter, or build a storefront from scratch using your preferred framework or tech stack.
Passing a Publishable API Key in Storefront Requests#
When sending a request to an API route starting with /store
, you must include a publishable API key in the header of your request.
A publishable API key sets the scope of your request to one or more sales channels.
Then, when you retrieve products, only products of those sales channels are retrieved. This also ensures you retrieve correct inventory data, and associate created orders with the scoped sales channel.
Learn more about passing the publishable API key in this storefront development guide.