Book Try-On Demo
Powered by Medusa.
Book Try-On Demo inNext.JS Functions
In this walkthrough we will create an omnichannel experience that allows a customer to book an item online to try-on in a physical store.
To ensure that the item is ready in-store for customers to try on, we will create a Reservation for the item upon booking.
We will use Medusa's Inventory and Stock Location modules directly in Next.js functions to achieve this experience.
You can read more about Medusa's omnichannel capabilities here.
What are Medusa Modules?
Modules are packages with self-contained commerce logic, promoting separation of concerns, maintainability, and reusability. Modules increase Medusa's extensibility, allowing for customization of core commerce logic and composition with other tools. This flexibility allows for greater choice in the tech stack used in conjunction with Medusa.
Why run it from a Next.js function?
Running Medusa's Inventory and Stock location Modules in a serverless function provides several benefits over hosting a conventional backend:
- It offers fast response times, making it suitable for use cases like realtime personalization.
- The Next.js function scales automatically to meet demand, meaning there is no need to worry about provisioning and managing servers.
- The Next.js function is only invoked when needed, reducing the overall cost of running the module.
Our future work will focus on publishing all core Medusa domains as modules and making them compatible with edge runtimes.