Menu

πŸ“°
0

AURORA Commerce Pro: adding Sanity support without touching the storefront

DEV Community: nuxtΒ·Franck LEBASΒ·about 1 month ago
#NYfe8tUK
#dev#class#code#highlight#sanity#article
Reading 0:00
15s threshold

When I published my first article about AURORA Commerce, a former colleague left a comment that stuck with me: "The idea is great, but your repo-as-database approach assumes a technical operator. What about non-technical clients who need a visual CMS interface?" He was right. And it was exactly the limitation I hadn't addressed publicly. So I fixed it. Here's how. The constraint The original AURORA Commerce storefront reads products from YAML files via Nuxt Content: const { data : products } = await useAsyncData ( ' products ' , () => queryCollection ( ' products ' ) . where ( ' active ' , ' = ' , true ) . all () ) This works beautifully for a technical operator. For a client who needs to update a product description on a Tuesday afternoon without touching a terminal - it doesn't. The naive fix would be to hardcode Sanity queries throughout the storefront pages. But that means the storefront becomes coupled to a specific CMS. Swap providers and you're touching every page. I wanted something cleaner.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More