We’ve been hearing so many nice things about Vue.js. So to get to know it better we though it would be good to build a more complete front-end for it.
Also, the same week Sanity launched the kind folks over at Snipcart built a demo using us as the content backend for a simple e-commerce app.
So we thought we should repay the favor and just a few days ago we added to our install a headless localized e-commerce example as one of the defaults we offer when you install Sanity. So we therefore thought we should, nay must, make an e-commerce front-end for Vue.js, Nuxt.js and Snipcart backed by Sanity.io that you can host as a statically generated build on Netlify.
Inspired by Next.js, Nuxt is a framework for creating universal Vue.js applications. It ships with all the stuff you probably will want, preconfigured: routing, async data, middleware, layouts, etc.
We’ve got a sliding scale of getting involved here.
Yes, in five minutes you can add fields or get back at the vikings by removing Norwegian as an available language as well as build your own product database. With variants! Hierarchical categories! Vendors! Tags! Gah!
The readme for the project has the instructions for this as well. All four bullet points of it.
All batteries are included and instructions for deploying on Zeit's Now (type
now) as well as Netlify. Fly little rocket ship, fly. 🚀
Yes, we didn’t implement totally ALL the things implied by the schema. We would maybe have said these were left as exercises to the reader if we weren't afraid of looking super obnoxious.
The localization is locked to English when it should perhaps be reading
Accept-Language, yet again your implementation will vary on your hosting. Also: there aren't any product variants displayed. Maybe your store doesn't have any. Maybe the sweaters you're selling are all a tepid cyan. If they're not, we'll gladly accept a pull request for the display of variants!
npm install -g @sanity/cli && sanity init