Menu

AURORA Commerce Pro: adding Sanity support without touching the storefront
πŸ“°

AURORA Commerce Pro: adding Sanity support without touching the storefront

DEV CommunityΒ·Franck LEBASΒ·6 months ago
#NYfe8tUK
#nuxt#tailwindcss#sanity#vue#software
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 () )

Enter fullscreen mode

Exit fullscreen mode

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.…

Continue reading β€” create a free account

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