Yogateria
Headless B2B and B2C commerce platform
- Role
- Lead Developer (Architecture & Full-Stack)
- Client
- Yogateria

A headless commerce platform serving both wholesale and retail buyers. Medusa.js runs commerce, Payload CMS runs editorial content, Meilisearch runs product search and a Next.js storefront ties them together. I led the architecture and development.
- Designed the split between the Next.js storefront, Medusa.js commerce services and Payload CMS content APIs.
- Built pricing modules for B2B wholesale volume discounts and tier-based margins alongside standard B2C prices.
- Connected Meilisearch through catalog webhooks for typo-tolerant search, facet filters and autocomplete.
- Integrated payment gateways, ERP inventory synchronisation and webhook-driven transactional messages.
- Medusa.js
- Next.js
- Payload CMS
- PostgreSQL
- Meilisearch
- TypeScript
Problem and objectives
Yogateria needed two things a single monolithic platform handled badly: a commerce engine with separate pricing for wholesale and retail buyers, and marketing pages the team could edit without a developer. Search also had to stay fast as the catalog grew.
Architecture
Each concern has its own service. Medusa.js owns the cart, checkout, orders and a custom pricing engine with B2B volume tiers and standard B2C prices. Payload CMS owns landing pages and promotional content. Meilisearch keeps its own product index, updated by webhooks whenever the catalog changes.
The storefront is Next.js with the App Router, React Server Components and incremental static regeneration, so most pages are served from cache and rebuilt only when their content changes.
Tradeoffs
Three services means three things that can be down instead of one. The search index is eventually consistent with the catalog, so for a few seconds after an update a product can show stale data in search results. For this catalog and traffic that was worth it. A much smaller catalog with infrequent updates would be simpler on Medusa.js and Next.js alone, without the separate search layer.