Releases

Announcing Vendure 2

June 07, 2023

Michael Bromley
Michael Bromley
Version 2 of the open-source headless commerce platform Vendure is now generally available! This is a monumental release that marks a new chapter for Vendure as the commerce platform that empowers developers to build anything, for anyone.

The first commit to Vendure was 5 years ago in May 2018. I was scratching my own itch as I set out to build something that simply didn't exist yet: an ecommerce platform built on a modern stack (Node.js, TypeScript, GraphQL), using headless api-first architecture, and with a laser-focus on outstanding developer experience and productivity.

The first stable release came in May 2021, and since then Vendure has come to be used by thousands of developers in hundreds of projects of all sizes, from small shops to billion-dollar startups to Fortune 500 enterprises. Last year my co-founder David and I formed a company around Vendure to ensure the continued growth of the platform, to better support our growing base of large business users, and to provide a foundation for ambitious plans we have for the future.

Over the past couple of years we have listened to the feedback from our growing community and learned the common pain points and limitations that people have run into with version 1. Many of these limitations arise once you try to move beyond the typical retail use-case. Building an app to sell t-shirts is pretty simple - but how about building a crowd-funding platform or a marketplace?

The Business-Model-Agnostic Commerce Platform

With Vendure 2, we are casting aside these limitations and presenting you with the most flexible and extensible commerce platform in the world. Now you can build anything, for any business use-case, no matter how complex: business-to-business (B2B), multi-tenant, multi-region, multi-vendor marketplace, subscriptions; Vendure provides the underlying APIs and plugin architecture that you can extend in any way you need - no matter what business model you need to support!

Our wording here - business model agnostic - is very deliberately chosen. Over the past two decades, people have grown accustomed to buying things online. In response to this, platforms have evolved to the point that there are now many good options for building a typical business-to-consumer e-commerce application. B2C as a business model is served well by all the major commerce platforms, both SaaS and open source.

But what about B2B? Now we're getting into some significant complexity - and many of the big platforms will have trouble accommodating your requirements. Or how about if you want to build a multi-vendor marketplace, a rental service, or a crowd-funding app? Good luck finding anything that fits your requirements! And building from scratch will be a truly onerous undertaking. You need a commerce platform that can work with your business model. With any business model.

With the carefully-planned changes to our core data model and the addition of new APIs in version 2, Vendure is that platform. It will enable you to build anything - and actually have fun while doing so!

Here’s a rundown of the major new features we are releasing today:

New Admin UI

The Admin UI is used by shop administrators to manage inventory, orders, customers, and all other aspects of the shop. It is the thing people interact with when they use Vendure. Our existing UI was lacking features, had some areas of poor usability, and kinda just looked "meh". While we were giving Vendure developers an A+ experience with our TypeScript & GraphQL APIs, end-users who interacted with our UI only got a B- treatment.

So we set out to transform the experience into something much more powerful, slick, and easy to use. We also now take full advantage of Vendure's powerful GraphQL API with our new data tables, which allow full control over sorting, advanced filtering, and customization of columns.

The Admin UI is also much more customizable - not only fully themeable via CSS custom properties, but also richly extensible: add your own components, routes, form controls, menu items, dashboard widgets, page tabs. You can even create completely new routes using any front-end technology you like, all the while being deeply integrated with the rest of the UI app!

Multi-vendor marketplace APIs

While Vendure v1 was already one of the most extensible platforms out there, there was one type of app that lots of teams wanted to build that was just not well supported: multi-vendor marketplaces. Think eBay, Etsy, Amazon or any variation where customers place orders containing items from multiple individual sellers. This kind of application introduces a significant amount of complexity over and above the typical ecommerce use-case: splitting orders so sellers only see the part that belongs to them; splitting shipping and payments; managing multiple shipping methods and fulfillments on a single order; handling platform fees and commissions.

Attempting to build marketplace apps on Vendure v1 was challenging to say the least. What was needed were some fundamental changes to our data model, as well as a set of APIs that allow Vendure to handle all the extra complexity that marketplaces bring. So that's what we've built in to Vendure 2.

No more need to hack together your own method of splitting orders - we now have built-in support. Likewise with shipping, payments and platform fees. And of course, all of this is supported out-of-the-box by our new Admin UI!

Since the specific requirements of each marketplace app are varied, we are providing a reference marketplace implementation which you can then customize to your needs, as well a multi-vendor marketplace guide in our docs.

Multiple stock locations

Vendure's stock management capabilities can now extend to multiple locations: set up a location for each warehouse and set the stock levels for each. Then when a customer places an order, use the new StockLocationStrategy API to select which warehouse should provide the stock. This could be based on available stock levels, geographical proximity, or something even more sophisticated. The Admin UI is also set up to allow you to quickly view and update stock levels at each location.

Multiple currencies per Channel

In Vendure v1, each channel could only have a single currency, and to support more currencies involved setting up a new channel for each supported currency. While channels are an incredibly powerful feature (they form the basis of our multi-vendor marketplace support), they come with overhead.

In Vendure 2 you can now support multiple currencies without needing to set up additional Channels. Instead, you just specify which currencies you want to support, and add new prices to each product variant. Your storefront can then select the best price based on any logic you like, using our new ProductVariantPriceSelectionStrategy API.

In combination with our existing built-in localization support (which has been extended further in v2), Vendure is now the clear choice for commerce applications that sell across multiple markets and regions.

Other notable changes

In addition to the headline features covered above, there are over a hundred new features in Vendure 2, as well as dozens of fixes and performance improvements. You can see all of these in the changelog, but I want to highlight some of the most impactful features here:

Fully customizable order processes: Vendure has always featured very advanced workflow customizations for orders, payments and fulfillments. However, there were still some hard-coded assumptions baked in to these processes that made certain use-cases challenging to accurately model. Now, we have extracted all of this hard-coded logic into a set of fully-replaceable "default processes" which you are free to use, modify or replace entirely as you require. This change makes it possible to finely tune these key business processes to exactly fit the needs of your project. See our extended docs on customizing order processes.

Support for very large orders: Orders containing hundreds or even thousands of items are not typical in retail, but in wholesale scenarios can be common. Vendure v1 made support for very large orders difficult due to the way we stored order items - essentially the time taken to perform operations on an order such as adding an item to the cart would increase linearly with the number of items in the order. With thousands of items this became too slow to be practical. For v2 we redesigned this aspect of the data model, resulting in constant-time operations. On our testing with 5,000 items, we saw a 360x speed increase! You can read more about this in issue #1981.

Improved control over guest checkouts: Vendure has always supported both signed-in and guest checkouts. However, once a customer had registered with a given email address, they could no longer perform a guest checkout. In v2 we've introduced the GuestCheckoutStrategy API which gives you full control over how a customer is able to check out.

Support for tiered pricing: An extension to our existing OrderItemPriceCalculationStrategy API allows the price of an item being added to an order to also take into account the quantity being added. This small change unlocks the ability to support tiered or bulk pricing, a requirement very common to wholesale or B2B shops.

Updates of all underlying dependencies: Vendure is built on a solid foundation of stable, well-supported and widely-loved open source technologies. With v2 we took the opportunity to update everything to take advantage of the latest developments with TypeScript, NestJS, GraphQL, Angular and more. Some of these updates bring very significant DX improvements (Angular v16 alone is the biggest and best ever update of that framework) as well as new features and security & performance improvements across the board.

Control over collection inheritance: Vendure's Collections feature allows you to group products based on dynamic "filters", e.g. the "New Arrivals" collection could filter for all products created in the past month. Moreover, collections can be nested to build a taxonomy for your catalog and form the basis of shop navigation. With Vendure 2 we are giving you even more control by selecting whether nested collections should inherit the filters of their parent collection. This change makes many types of taxonomies much simpler to implement for administrators.

Payment and shipping methods are now translatable: We have extended our localization support to also cover payment and shipping methods - your storefront can now show information about available payment and shipping options to your customers, translated into all languages you need to support.

Plugins can now indicate version compatibility: With our growing ecosystem of official and community plugins, we've introduced the plugin compatibility API for plugins to declare what version(s) they are compatible with, which Vendure will check and enforce during startup.

Improved handling of monetary values: Like many commerce systems, Vendure represents monetary values as integers in order to avoid floating-point calculation problems. However, some of our enterprise users were dealing with such large transaction amounts that they began running into the maximum integer limit of the GraphQL spec. Plus, some currencies which deal with much higher values (Vietnamese Dong, Indonesian Rupiah) could even run into the maximum limits for integers imposed by the underlying database engine! To address this, we introduced a brand new Money scalar to represent all monetary values in our GraphQL APIs, as well as a new MoneyStrategy API which gives you full control over how monetary values are stored in the database.

Migrating from v1.x

Since this is a major release, there are breaking changes for those who will be migrating existing projects from version 1. Some of this is an unavoidable side-effect of our update of key dependencies such as TypeORM. Other breaks are due to updated data models required to support new features such as multiple stock locations. Other breaks are deprecations of old APIs, or fixes to inconsistent APIs to make our API surface more coherent.

To make the migration process as smooth as possible for you and your team, we have created and extensively tested an automated database migration tool, and created a comprehensive migration guide to point out the code you'll need to change.

What comes next

As monumental a release as this is - there is much more to come! We see Vendure 2 as laying the groundwork for the next phase of our mission: to create a commerce platform that allows you to build anything, for anyone.

Vendure 2 has all the low-level APIs you need. Next we're going to turbo-charge the development experience, allowing you to rapidly deliver sophisticated, world-class commerce experiences in record time. Join our mailing list and discord community to be the first to know.

Thank you Vendure Community

As an open source project, our community plays an invaluable role in shaping the development of Vendure. Not only in the many, many significant direct code contributions from community members; but also contributions in the form of feedback, suggestions, bug reports, word-of-mouth promotion and inspiration. I am personally very thankful to all of you, and count it as a pleasure to be able to share this journey with all of you. If you didn't already join, our Discord community is welcoming and vibrant!

Especially during the beta phase for v2 - without your feedback, these 100+ new features and countless fixes would be impossible to test and validate in a reasonable time!

I'd like to highlight our top contributors and community maintainers:

Our top contributors to the core framework by commits: Drayke, Vinicius Rosa, Martijn van de Brug, Artem Danilov, Hendrik Depauw, Alexander Shitikov, Lukas Chladek, Pieter Doms, Thomas Blommaert, Alexis Vigoureux. And the entire contributor team can be found on our new contributors page - I'm well aware some of your have made a small number of very impactful commits - so thank you all!

Thank you to Giorgio Boa for maintaining our lightning-fast Qwik Storefront, (shout out to Prasanna Malla for his recent work on this too!) and to Timur Dogan for maintaining & battle-testing our Remix Storefront! (with help from Daniel Biegler to update to Vendure 2).

I'm looking forward to seeing what you build with Vendure!

Vendure
Get started

Create your first commerce experience with Vendure in less than 2 minutes

Vendure is a registered trademark. Our trademark policy ensures that our brand and products are protected. Feel free to reach out if you have any questions about our trademarks.

Newsletter

Get the latest product news and announcements delivered directly to your inbox.

© Copyright 2022 - 2024, Vendure GmbH. All rights reserved.