How to Fail at Solidus
In 2022, I spoke at SolidusConf 7 on how to make the most of the Solidus platform (or fail, by doing the opposite of my suggestions.) Solidus is a framework for building custom eCommerce stores. If you choose a platform like Solidus, you need to leverage the benefits of the platform as much as you can to reap advantages that aren’t available to less customizable platforms, like Shopify. Additionally, you don’t want to fall victim to common and avoidable mistakes. My talk helps guide you towards the best experience possible when building on Solidus.
Getting Started With Solidus
The kinds of stores that benefit the most from Solidus are high-volume businesses, stores with large catalogs, marketplaces, stores that sell restricted goods, and anyone that wants to customize parts of the eCommerce stack that aren’t customizable on other platforms (like the checkout.)
There are lots of reasons to choose Solidus, but if you’re a small store with a simple catalog and aren’t going to demand a lot from your eCommerce platform, maybe it isn’t for you. If you’re high-volume store with a custom subscription model, you’re going to love Solidus. Make sure you evaluate your needs against what Solidus offers.
Once you’ve chosen Solidus, take a iterative, incremental approach to getting your site live. Start with must-have functionality, then build incrementally until your organization is satisfied with the site and ready to go live. You can go live with missing features, but you shouldn’t go live with broken features. Keep that in mind when planning your work.
Don’t go crazy with esoteric or trendy technology choices. Keep eCommerce boring. Most eCommerce organizations don’t want to shoulder the burden of bleeding-edge technologies. Solidus is a proven technology. When choosing your stack, choose other proven technologies.
ECommerce stores are relatively long-lived applications. Someone is going to maintain your tech choices down the road. Be nice to those future maintainers, and not just because they might be me… they might be you too.
When making tech choices, consider what resources you have right now, not what resources you might have down the road. You don’t need to build a GraphQL gateway to proxy requests to a bunch of backend services with the hottest JavaScript framework in front of that just to serve your privacy policy page. It’s overkill. There are plenty of nine-figure stores that are doing great without the burden of maintaining a bunch of unnecessary infrastructure.
The reality is that it’s eCommerce. Your business might be a little special because you found the need to use Solidus, but it’s not that special. You’re not a tech startup.
Along the same lines, don’t fight the framework. Solidus is built on Rails. Follow Rails conventions. As your team grows, you’ll see endless pain if you develop your own esoteric ways to do everything.
The Extension Ecosystem
When it comes to Solidus extensions, make sure that you contribute customizations back upstream. In the long run, it’s always worth it to leverage the community.
Don’t be too eager to make your own extensions, though. Our extension tooling is awesome. I know. But, you don’t need to make every feature in your app its own extension. It’s too much overhead to maintain. Once your feature stabilizes, if you find that it’s still worth extracting, and you have the time, then go ahead. You probably won’t, but that’s okay.
For situations where an extension is justified, build it in your app’s repository. This eliminates the overhead of managing multiple projects and keeping things up-to-date. Once the extension stabilizes, you can pull it out and publish it.
Leverage The Platform
When it comes to technical approach, make sure to leverage the platform. I talk about that a bit in my previous SolidusConf talk, but Solidus ships with great support for testing, CI, CD, and all your favourite Agile buzzwords. Don’t sleep on it.
Solidus is the most customizable eCommerce platform. But, just because you have all that power, doesn’t mean you need to use it all the time. Make sure the modifications you’re making are valuable to the business. Customizing the platform comes with maintenance costs. Evaluate those tradeoffs.
This doesn’t apply as much to configurable classes and other configuration points. I’m talking about overriding methods on core classes, Module#prepend
, and other invasive customizations.
In the talk I get into some nitty gritty details of overriding frontend templates, but you’ll have to watch the talk for those. Some of them are less relevant now that we have Solidus Starter Frontend.
When customizing the core classes with overrides, make sure to test those changes thoroughly. Those are the most brittle kinds of customizations.
At the end of the day, it’s about making the most of Solidus’ customizability. Don’t shoot yourself in the foot by completely reworking some system just to make a minor change to the behaviour because your prefer some different design approach.
It can be unintuitive, if you come from an aggressive refactoring Agile discipline, but you want to be a little more targeted when you’re making modifications to code that you don’t own. Where you need to make changes, do so carefully and document those changes.
It’s also important to keep your project update. Don’t fall behind on Solidus upgrades. If you do, you lose out on the awesome improvements the community is making, but it also eliminates your incentive to contribute back your own improvements, since you won’t be able to use them until you upgrade.
It’s project policy that minor releases get security patches for 18 months. While some stores choose to run the bleeding-edge version of Solidus (and I recommend it!), you should at least stay within the security path window. Solidus is vastly easier to upgrade than Spree used to be, so take advantage of that!
The reason I recommend staying on the bleeding edge is that Solidus is very stable, and if you stay up to date, when you want to make changes to Solidus, you’ll immediately see the benefits of those changes. You’re able to directly shape the future of Solidus to fit your business’s needs.
Join The Community
We don’t really know exactly how many Solidus stores are out there, but it’s a lot. Many of them participate in the community in different ways, from joining the Solidus Stakeholders team to contributing changes back to Solidus and more. Here are some easy ways to get started:
- Join the Slack. Slack is where a lot of the conversations about the platform happen. Myself and the rest of the Core Team are active in there answering questions and listening to feedback.
- Participate on GitHub. Chime in on issues. Propose new features in GitHub Discussions. GitHub is where we work on the project itself and offers plenty of opportunities to shape the future of the project.
- Contribute to our OpenCollective. Funding for the development of Solidus comes from the community. This money goes towards development on the platform, hosting events, and more.
Whatever you do, make sure we know you’re out there! There are so many stores using Solidus that we don’t even know about! I learned recently that an NFL team ran their pro shop on Solidus for a period of time! We had no idea, because the people working on that shop didn’t engage with the open-source community around the project.