Project Marlin
Tell us a little about yourself your team
I'm Will Milne, Tech Lead on "Project Marlin" at IBM. Our team is composed of me, four developers - Matt Gillespie, Arthur Nagashima, Joyce Feng, and Eram Manasia - and a Business Analyst, Sushama Tangella. We have been working on our Vendure-based project since October 2020. Our team follows agile methodology and performs almost-daily deployments via our CI/CD pipelines on Travis.
Tell us about the project. What were the challenges you faced?
Due to some changes in our organization, instances of a proprietary legacy commerce system were moved under the control of our squad in late 2020. These original stores had been passed through a few teams, and had become quite difficult to modify without deep institutional knowledge. Maintenance was costly, from a financial perspective (the software licenses and server fees), and from a personnel one - any modifications that needed to be made could take days or weeks of a developer’s time. In addition to the maintenance issues, the UI/UX of these stores had become outdated. It wasn’t going to make sense for our team to become experts in these legacy environments and codebases - so we needed to begin looking at how to replace them. The responsibility of maintaining these systems was a bit of a cloud hanging over our heads, so we wanted to migrate off of them to a new, more maintainable platform as soon as possible.
Marlin is IBM’s Vendure instance that is being used to replace these instances of a proprietary legacy commerce system. The largest store we’ve transitioned to date is the IBM Employee Purchase Program which sees hundreds of orders a month - and we’ve moved four smaller stores to the platform as of November 30th, 2021. In the past year or so, we have built out 33 plugins ranging from payment integrations and ETL processors to a Message of the Day service to meet the needs of our business stakeholders.
What factors made you decide to use Vendure?
As we began to look into the next phase for these stores, we saw an opportunity to bring them into the future. When we found Vendure, we were very drawn to its open-source approach and philosophy. After we set up a demo system on IBM’s internal hybrid cloud platform, we were convinced that, out-of-the-box, it would provide 90% of the ecommerce functionality our stores required, and that we would be able to build out the other 10% ourselves. Seeing that Vendure was a headless GraphQL-based solution was also a huge plus, as GraphQL had been something the team was interested in getting experience with.
...we were convinced that, out-of-the-box, Vendure would provide 90% of the ecommerce functionality our stores required, and that we would be able to build out the other 10% ourselves.
We were trying to find a solution that was feature-complete but flexibile. Flexibility was a necessity because we wanted to maintain the legacy system’s interface points with other teams. These interfaces had persisted for a long time, and trying to make other teams change would have been a much slower way to progress. Vendure had exactly what we needed when it came to flexibility so that we could create a drop-in replacement!
Can you tell us about the process of building the project
Building Marlin on top of Vendure has been a truly great experience for our development team - the plugin-based approach has been a huge inspiration to us. In previous projects, it had been very easy to “sneak in” new code to an existing module for convenience, but having plugins be the backbone of our custom functionality kept us honest - it structurally encouraged us to keep functionality organized and separated. Overall, Vendure’s plugin-based architecture empowered and guided us to design a better solution.
Building multi-tenant support
One interesting challenge we ran into was equipping our application for multitenancy. Our goal was to be able to run multiple stores on the same instance of our application, and Vendure was initially built to support the operation of a single store. To address this, we based our multitenancy functionality heavily around Channels in Vendure, as products, categories, and facets are already separated by them.
Our vision for multitenancy was that we wanted our business users to be able to press one button on the admin UI to create a new storefront with no deployment necessary. On the admin side, we created a page where users can create a new store if they have SuperAdmin permissions. Clicking “Create Store” sets up the appropriate entity and the required structures for a new store. Stores are relatively simple channel-wrappers with a few extra configuration options and properties.
Seamless integration with existing systems
Another large integration we did, led by Matt Gillespie, was the creation of a microservice called Marlin Data Sync. The goal of Data Sync was to allow the teams that manage inventory and pricing for the legacy commerce platform stores to integrate with Marlin and require no changes on their side. This was a bit of a challenge at first, but after we dug through some systems-level issues, we were able to ingest the data and simply make calls to Vendure’s Admin API to add products and prices to the proper channel. We’ve now moved forward with the creation of an ETL Plugin directly in our Vendure instance which will allow us to utilize the worker threads and have a tighter integration with the server. We’re hoping to contribute this back to the community sometime next year!
Working with the excellent and developer-centric code that the Vendure team has created has made us all better developers and greatly enhanced our ability to write maintainable and scalable code.
Tell us about the storefront specifically. What technologies did you use? How was your experience of building a client for a Vendure server?
We based our storefront on Vendure’s Angular storefront, and then utilized IBM’s Carbon Angular Components to give it the IBM look and feel. Working from the Vendure example, we haven’t run into any large difficulties when building our Vendure client. It’s generally been quite straightforward - and we really enjoy working with GraphQL as well!
How did Vendure help you to meet the design challenges of the project?
The primary challenges of our project were that we needed to get our first store built and integrated into the existing systems in about 6 months. Since Vendure was equipped with so much baseline e-commerce functionality, we could focus on setting up infrastructure and making the storefront match the store owner’s vision. We also needed to build out some plugins to ensure the integration would work fully with the existing store workflow and would be an easy drop-in replacement for the legacy commerce system.
The focus on plugins and use of Nest.js as a backbone has been a huge boon to our development skills and speed. It’s also prevented us from needing lengthy regression testing as our existing code gets modified very infrequently. It’s been a joy to work with Vendure!
Do you have any future plans with this project and/or with Vendure?
We are continuing to convert legacy stores to make use of Marlin, and once we accomplish our goal of shutting down some key legacy systems, our team is looking forward to contributing some of these plugins back to the Vendure community since we’ve been able to create a lot of generic and configurable functionality that could be useful for any store on the platform.
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.