For the Myzosen storefront, I used Medusa to manage products and customers and built the frontend around the site's needs. Product management already has ready-made modules; inquiries can be added separately. That saves building the entire backend from scratch.
One product can have several option combinations
Take a garment in black and white, each in S, M and L. Customers see one garment, while the backend needs six variants. Medusa already models products, options and variants: color and size go into the options, and each combination identifies a variant. The import needs to follow that structure.
This batch has over 400 products and over 2,000 size variants. A repeated style and color in a spreadsheet often just means a different size, so those rows cannot be deleted merely because they look similar. A product can also belong to several categories while remaining the same product. Copying it for each category only makes future price and inventory changes harder.
Images are straightforward: choose black and the gallery should show black, without suddenly switching to white halfway through. The styling in a photograph needs explanation too. Briefs worn by a model are not automatically included in the order. AI can help organize material and generate images, but what is sold and what is included must follow the original product information.
Filter the data before it reaches the storefront
A product page needs names, images, color and size choices, and retail prices. Supplier costs and admin fields do not need to go to the customer too. Requests here pass through Pages Functions before reaching Medusa. Only the required routes are exposed, and responses contain the fields the page needs.
Accounts follow the same approach. The browser uses a protected session cookie, while authentication tokens and the private gateway key stay on the server. This API layer also turns the backend response into a shape the frontend can use directly, so each page does not have to repeat the same processing.

Save the customer's message, then notify me by email
The inquiry is saved in Medusa first, giving the admin a record to follow up on. Email notifications are handled separately. D1 stores the pending task, and an independent Cloudflare email Worker delivers it. The page reports a successful submission once the notification service accepts the task; email sending continues in the background.
A slow connection can make a customer click Submit again, so each submission has a stable identifier. A retry keeps that identifier: unchanged content returns the existing record, while changed content under the same identifier is rejected. Several clicks should not leave several identical inquiries in the admin.

If the email fails, the message remains in the backend for follow-up. If sending times out and the outcome is uncertain, it must not be sent again immediately. Keep the state and check it first. There is a little more sending state to manage, but the customer's message remains available without depending entirely on one email.
The public form also has server-side Turnstile validation, request limits and an email-sending budget. Customers need an easy way to make contact, with controls against people using the form to burn through the mail quota.
The deployed backend still needs maintenance
Medusa runs as Server and Worker. Server handles APIs and the admin interface; Worker handles events and background jobs. Both use the same code, database and Redis, following the official production deployment recommendation. This Medusa Worker is separate from the Cloudflare Worker that sends email.
I manage these processes with systemd and reuse the server's Nginx installation, with a dedicated database, Redis data directory and ports for the project. The server hosts other sites too, and those need to keep running when the new backend is added.
One detail is easy to miss. Medusa's compiled production directory is .medusa/server. Install production dependencies inside it and start the application there, as the deployment guide explains. We encountered a build that passed locally but would not start on the server because a writable directory was missing. Dependencies, directories and permissions need checking together on the machine that actually runs the service.
For an application update, run the database migration separately once rather than letting both processes change the database. Git alone is not a backup: customers and inquiries live in the database, and images live in R2, so they need separate backups. Before restoring old code, check which database changes have already happened. Switching the code back does not undo everything.
What I take from this
After using it for this project, I think Medusa is a good fit for this storefront. I can reuse its product and customer modules and still design the frontend how I want, saving the work of building both parts from scratch.
Product information, inquiry notifications and server maintenance still need attention. For this round of Myzosen, product browsing and inquiries come first; payments come later. I can change products in the admin and follow up on recorded inquiries. For me, that already puts this backend to practical use.


