Announcing Vendure 2.0 Beta
June 06, 2023
$ npx @vendure/create@next my-shop
Overview
The first stable release of Vendure was in May 2021. Since then, Vendure has been extensively used in production projects of all kinds and sizes, from established retailers to startups to Fortune 500 enterprises. Based on feedback and experience gathered since that release, we learned what was missing and what we needed to improve in order to make Vendure the most powerful open-source commerce platform in the world.
Vendure v2 builds on the solid foundation laid by v1 to allow you to:
Build virtually any type of business-to-consumer (B2C) commerce application
Build complex business-to-business (B2B) commerce applications
Build multi-vendor marketplace applications
Let's take a look at the major new capabilities that make up Vendure v2, with a note on the current status as of this first beta release.
Note: this is a technical post, so I'll focus on the implementation details as they affect developers who are migrating to v2.
Update of all core libraries
The building blocks upon which Vendure is built - NestJS, GraphQL, TypeORM and Angular - have all been updated to their latest versions. This means you have access to all the latest features, fixes, security updates and performance improvements. As one example, if you are using our ui-devkit
package to compile a custom Admin UI, you'll be able to build your app using Angular's new esbuild support, which can dramatically reduce build times.
Massive performance improvement
We've reworked the way we model orders internally, resulting in massive performance improvements when working with large orders. In our tests, we saw a 360x speedup for an order containing 5000 items! Previously, this performance limitation made certain types of application very challenging to implement on Vendure. Imagine a B2B parts supplier that sells orders with hundreds or thousands of a given item. In v2 this limitation is completely gone. Here's a video with an explanation and demonstration of this change.
Multi-vendor marketplace support
This is one of the most hotly-anticipated new features (issue #1329). If you are looking to build a custom marketplace platform, your choice until now has been severely limited. In Vendure v1, a number of teams started using our Channels feature to model these kids of applications, and - while somewhat workable - the experience was much more complex than it should be.
Vendure v2 builds on and extends our Channels feature and also introduces the concept of Sellers, which allows you to build marketplace applications with full support for split orders including split shipping & payments via platforms like Stripe Connect. Here's an early preview video of this feature, and an example Multivendor Plugin which demonstrates how the new APIs are used to enable these features. We'll be publishing more documentation on this topic for the final release, because it encompasses many new APIs and features.
Admin UI refresh
Our Admin UI app is getting a full-on refresh! We're working with a team of experienced UI & UX designers to bring you and your store admins a clean, fresh modern look. When you update to the current v2 beta, you'll notice a few preliminary changes - but there is much, much more to come over the coming beta releases.
Multiple stock location support
This is another key piece of our focus on better supporting large retailers and B2B projects. We've reworked our inventory tracking data model and introduced the new StockLocationStrategy which gives you full control over how stock flows into and out of multiple locations. The TypeScript APIs, database schema & GraphQL API updates (issue #1545) are in place. What's still missing is the Admin UI changes, which will be done as we work through the Admin UI refresh.
Currency & price improvements
There are a number of improvements when it comes to how we handle monetary values and currencies. Firstly, we have a new MoneyStrategy which allows you to control how monetary values are stored in the database, enabling better support for currencies with very high denominations or B2B shops that deal with high-value orders in the tens of millions. It also allows better control over the rounding rules applied when e.g. applying a percentage discount to an OrderLine.
We will also be supporting multiple currencies in a single Channel - meaning that you'll no longer need to create new Channels (with all the overhead that implies) simply to support multiple currencies (issue #1691). Right now, the data model is in place, as well as a new ProductVariantPriceSelectionStrategy. Still to do is the Admin UI changes, which will be done as we work through the Admin UI refresh.
Provinces support
We're planning to add support for provinces - regions below the Country
level - for better control of things like tax and shipping rules. We've been working with community members on the best design for this feature, so if you have any feedback or suggestions, please leave a comment on issue #76!
...And more
There are far too many features to cover here, but to give you a taste of just how big a release this is, you can also expect:
A new GuestCheckoutStrategy which gives you full control over how to deal with guest checkout flows.
You can now control whether Collections inherit filters from their parents.
The
PaymentMethod
andPromotion
entities are now translatable.We've added a new
localeText
custom field which allows you to store large localized text data on virtually any of the built-in entities.Price lists / tiered pricing support is coming - see issue 1920.
The complete changelog can be found in the changelog_next.md file.
Migration
If you are currently on Vendure v1.x, the migration to v2 will consist of two main steps:
Updating and migrating your database. This is done with the help of the
@vendure/migrate-v2
package. Full instructions are included in the project readme.Updating any custom TypeScript code that may be subject to breaking changes. Instructions for this part are contained in our Migrating to Vendure v2.0 guide.
During the beta phase, feedback on your migration experience is very valuable. We will be using it to refine the migration experience so that by the final release, migration will be as smooth as possible.
Next steps
During the beta phase, we'll be wrapping up the features mentioned above as well as a few others, which you can see on our technical roadmap. This work will be released as a series of beta release (beta.1, beta.2 etc.) leading up to the final, stable v2 release which is expected in around a month from now.
We'll also be working on a more complete migration guide; new documentation and guides to help you work with the new capabilities in v2; as well as general points of polish and stability.
V2 beta is not yet recommended for general production use, but if you are starting a project with a go-live date after May, then it could makes sense to start on v2 right away, rather than migrating later.
We look forward to your help with testing and feedback so we can make the final v2 launch a truly monumental event!
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.
Documentation
Newsletter
Get the latest product news and announcements delivered directly to your inbox.