solidus
đź›’ Solidus, the open-source eCommerce framework for industry trailblazers.
Top Related Projects
An open source eCommerce platform giving you full control and customizability. Modular and API-first. Build any eCommerce solution that your business requires. Developed by @vendo-dev
Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
PrestaShop is the universal open-source software platform to build your e-commerce solution.
A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
Shopware 6 is an open commerce platform based on Symfony Framework and Vue and supported by a worldwide community and more than 1.500 community extensions
A free shopping cart system. OpenCart is an open source PHP-based online e-commerce solution.
Quick Overview
Solidus is an open-source, Ruby on Rails-based e-commerce platform that provides a flexible and customizable solution for building online stores. It offers a wide range of features, including product management, order processing, payment integration, and more.
Pros
- Flexibility: Solidus is highly customizable, allowing developers to tailor the platform to meet the specific needs of their e-commerce business.
- Scalability: The platform is designed to handle high-volume traffic and complex business requirements, making it suitable for both small and large-scale e-commerce operations.
- Active Community: Solidus has a vibrant and active community of developers and contributors, providing ongoing support, bug fixes, and feature enhancements.
- Extensive Integrations: Solidus offers a wide range of integrations with popular payment gateways, shipping providers, and other third-party services, making it easy to extend the platform's functionality.
Cons
- Steep Learning Curve: Solidus has a relatively steep learning curve, especially for developers who are new to Ruby on Rails or e-commerce development.
- Performance Overhead: The platform's flexibility and feature-rich nature can sometimes result in performance overhead, particularly for smaller e-commerce sites.
- Limited Out-of-the-Box Functionality: While Solidus is highly customizable, it may not provide all the necessary features out of the box, requiring additional development work to meet specific business requirements.
- Limited Documentation: The documentation for Solidus, while improving, can sometimes be lacking or outdated, making it challenging for new users to get started.
Code Examples
N/A (Solidus is not a code library)
Getting Started
N/A (Solidus is not a code library)
Competitor Comparisons
An open source eCommerce platform giving you full control and customizability. Modular and API-first. Build any eCommerce solution that your business requires. Developed by @vendo-dev
Pros of Spree
- Larger community and more extensive ecosystem of extensions
- More frequent updates and releases
- Better documentation and learning resources
Cons of Spree
- Can be more complex to customize and extend
- Potentially slower performance due to more features
- Higher learning curve for beginners
Code Comparison
Spree:
Spree::Config.currency = "USD"
Spree::Money.new(10.99, currency: "EUR").to_s
# => "€10.99"
Solidus:
Spree::Config.currency = "USD"
Spree::Money.new(10.99, currency: "EUR").to_s
# => "€10,99"
The code comparison shows a subtle difference in number formatting between Spree and Solidus. Spree uses a period as the decimal separator, while Solidus uses a comma, which may be more appropriate for certain locales.
Both Spree and Solidus are powerful e-commerce platforms built on Ruby on Rails. Spree offers a wider range of features and extensions, making it suitable for complex projects. Solidus, a fork of Spree, focuses on stability and performance, making it a good choice for businesses prioritizing customization and scalability. The choice between the two depends on specific project requirements and team expertise.
Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
Pros of Magento 2
- More extensive feature set and ecosystem
- Larger community and wider adoption in enterprise environments
- Better support for multi-store and multi-language setups
Cons of Magento 2
- Steeper learning curve and more complex architecture
- Higher resource requirements and potentially slower performance
- More expensive to develop and maintain
Code Comparison
Magento 2 (PHP):
<?php
namespace Magento\Catalog\Model;
class Product extends \Magento\Framework\Model\AbstractModel
{
public function getName()
{
return $this->_getData('name');
}
}
Solidus (Ruby):
module Spree
class Product < Spree::Base
def name
@name ||= master.name
end
end
end
Both frameworks use object-oriented programming, but Magento 2 employs a more complex structure with namespaces and abstract classes, while Solidus (based on Ruby on Rails) follows a simpler, more concise approach. Magento 2's code tends to be more verbose, reflecting its larger feature set and flexibility, while Solidus prioritizes simplicity and readability.
PrestaShop is the universal open-source software platform to build your e-commerce solution.
Pros of PrestaShop
- Larger community and ecosystem with more modules and themes
- User-friendly admin interface with drag-and-drop functionality
- Built-in multilingual and multi-currency support
Cons of PrestaShop
- Slower performance, especially with many modules installed
- Less flexibility for customization compared to Solidus
- Steeper learning curve for developers new to the platform
Code Comparison
PrestaShop (PHP):
class ProductController extends ModuleAdminController
{
public function initContent()
{
parent::initContent();
$this->content .= $this->renderForm();
}
}
Solidus (Ruby):
class Spree::Admin::ProductsController < Spree::Admin::ResourceController
def index
session[:return_to] = request.url
respond_with(@collection)
end
end
Both platforms use MVC architecture, but PrestaShop uses PHP while Solidus is built on Ruby on Rails. PrestaShop's code tends to be more verbose, while Solidus leverages Ruby's concise syntax. PrestaShop's controller structure is more tightly coupled to its module system, whereas Solidus follows Rails conventions more closely.
A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
Pros of WooCommerce
- Larger community and ecosystem, with more plugins and themes available
- Easier setup and configuration for non-technical users
- Better integration with WordPress, allowing for seamless content and e-commerce management
Cons of WooCommerce
- Performance can be slower, especially for larger stores or high-traffic sites
- Less flexibility for custom development and complex business logic
- More vulnerable to security issues due to its popularity and WordPress integration
Code Comparison
WooCommerce (PHP):
add_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
add_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
Solidus (Ruby):
Spree::Frontend::Config.configure do |config|
config.locale = :en
config.layout = 'spree/layouts/spree_application'
end
WooCommerce uses WordPress hooks and actions for customization, while Solidus uses Ruby configuration blocks. This reflects the different architectures and ecosystems of the two platforms, with WooCommerce being more tightly integrated with WordPress and Solidus offering a more standalone e-commerce solution.
Shopware 6 is an open commerce platform based on Symfony Framework and Vue and supported by a worldwide community and more than 1.500 community extensions
Pros of Shopware
- More active development with frequent updates and releases
- Larger community and ecosystem, providing more extensions and resources
- Built-in content management system (CMS) for easier store customization
Cons of Shopware
- Steeper learning curve due to its complex architecture
- Higher system requirements, potentially leading to increased hosting costs
- Less flexibility for customization compared to Solidus' Ruby-based approach
Code Comparison
Shopware (PHP):
$criteria = new Criteria();
$criteria->addFilter(new EqualsFilter('active', true));
$products = $this->productRepository->search($criteria, $context);
Solidus (Ruby):
products = Spree::Product.active
products = products.in_taxon(taxon) if taxon
products = products.in_cached_group(product_group) if product_group
Both examples show how to retrieve active products, but Shopware uses a more structured approach with criteria and filters, while Solidus relies on Ruby's method chaining for a more concise syntax.
A free shopping cart system. OpenCart is an open source PHP-based online e-commerce solution.
Pros of OpenCart
- Easier setup and configuration for beginners
- Larger community and marketplace for extensions
- More lightweight and faster out-of-the-box performance
Cons of OpenCart
- Less flexible for customization and scaling
- Fewer built-in features for advanced e-commerce needs
- Less robust security measures and update frequency
Code Comparison
OpenCart (PHP):
public function index() {
$this->load->language('product/category');
$this->load->model('catalog/category');
$this->load->model('catalog/product');
// ... more code
}
Solidus (Ruby):
def index
@searcher = build_searcher(params.merge(include_images: true))
@products = @searcher.retrieve_products
@taxonomies = Spree::Taxonomy.includes(root: :children)
end
OpenCart uses a more procedural approach with explicit loading of language files, models, and other components. Solidus, being built on Ruby on Rails, follows a more object-oriented and convention-over-configuration approach, resulting in more concise controller actions.
Both projects are open-source e-commerce platforms, but they cater to different audiences. OpenCart is more suitable for small to medium-sized businesses looking for a quick setup, while Solidus is better for larger enterprises requiring extensive customization and scalability.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Solidus
A free, open-source ecommerce platform that gives you complete control over your store.
- Visit our website: https://solidus.io/
- Read our Community Guidelines: https://guides.solidus.io/policies/community-guidelines/
- Read our guides: https://guides.solidus.io/
- Join our Slack: http://slack.solidus.io/
- Solidus Security: mailing list
Table of Contents
- Supporting Solidus
- Summary
- Demo
- Getting Started
- Installation Options
- Performance
- Developing Solidus
- Contributing
Supporting Solidus
As a community-driven project, Solidus relies on funds and time donated by developers and stakeholders who use Solidus for their businesses. If you'd like to help Solidus keep growing, please consider:
Main Contributor & Director
At present, Nebulab is the main code contributor and director of Solidus, providing technical guidance and coordinating community efforts and activities.
Ambassadors
Support this project by becoming a Solidus Ambassador. Your logo will show up here with a link to your website. Become an Ambassador.
Summary
Solidus is a complete open source ecommerce solution built with Ruby on Rails. It is a fork of Spree.
See the Solidus class documentation and the Solidus Guides for information about the functionality that Solidus provides.
Solidus consists of several gems. When you require the solidus
gem in your
Gemfile
, Bundler will install all of the following gems:
solidus_api
(RESTful API)solidus_backend
(Admin area)solidus_core
(Essential models, mailers, and classes)solidus_sample
(Sample data)
All of the gems are designed to work together to provide a fully functional
ecommerce platform. However, you may only want to use the
solidus_core
gem
combine it with your own custom frontend, admin interface, and API.
Demo
You can try the live Solidus demo here. The admin section can be accessed here.
Getting started
Begin by making sure you have Imagemagick installed, which is required for Paperclip. (You can install it using Homebrew if you're on a Mac.)
To add Solidus, begin with a newly created Rails application with its database.
rails new my_store
Installing Solidus
In your application's root folder run:
bundle add solidus
bin/rails g solidus:install
And follow the prompt's instructions.
Accessing Solidus Store
Start the Rails server with the command:
bin/rails s
The storefront will be accessible at http://localhost:3000/ and the admin can be found at http://localhost:3000/admin/.
For information on how to customize your store, check out the customization guides.
Default Username/Password
As part of running the above installation steps, you will be asked to set an admin email/password combination. The default values are admin@example.com
and test123
, respectively.
Questions?
The best way to ask questions is to join the Solidus Slack and join the #support channel.
Installation options
Instead of a stable build, if you want to use the bleeding edge version of Solidus, use this line:
gem 'solidus', github: 'solidusio/solidus'
Note: The master branch is not guaranteed to ever be in a fully functioning state. It is too risky to use this branch in production.
By default, the installation generator (solidus:install
) will run
migrations as well as adding seed and sample data. This can be disabled using
bin/rails g solidus:install --migrate=false --sample=false --seed=false
You can always perform any of these steps later by using these commands.
bin/rails railties:install:migrations
bin/rails db:migrate
bin/rails db:seed
bin/rails spree_sample:load
There are also options and rake tasks provided by solidus_auth_devise.
Performance
You may notice that your Solidus store runs slowly in development mode. This
can be because in development each CSS and JavaScript is loaded as a separate
include. This can be disabled by adding the following to
config/environments/development.rb
.
config.assets.debug = false
Turbolinks
To gain some extra speed you may enable Turbolinks inside of Solidus admin.
Add gem 'turbolinks', '~> 5.0.0'
into your Gemfile
(if not already present)
and change vendor/assets/javascripts/spree/backend/all.js
as follows:
//= require turbolinks
//
// ... current file content
//
//= require spree/backend/turbolinks-integration.js
CAUTION Please be aware that Turbolinks can break extensions and/or customizations to the Solidus admin. Use at your own risk.
Developing Solidus
-
Clone the Git repo
git clone git://github.com/solidusio/solidus.git cd solidus
Without Docker
-
Install the gem dependencies
bin/setup
Note: If you're using PostgreSQL or MySQL, you'll need to install those gems through the DB environment variable.
# PostgreSQL export DB=postgresql bin/setup # MySQL export DB=mysql bin/setup
With Docker
docker-compose up -d
Wait for all the gems to be installed (progress can be checked through docker-compose logs -f app
).
You can provide the ruby version you want your image to use:
docker-compose build --build-arg RUBY_VERSION=3.0 app
docker-compose up -d
The rails version can be customized at runtime through the RAILS_VERSION
environment variable:
RAILS_VERSION='~> 5.0' docker-compose up -d
Running tests:
# sqlite
docker-compose exec app bin/rspec
# postgres
docker-compose exec app env DB=postgres bin/rspec
# mysql
docker-compose exec app env DB=mysql bin/rspec
Accessing the databases:
# sqlite
docker-compose exec app sqlite3 /path/to/db
# postgres
docker-compose exec app env PGPASSWORD=password psql -U root -h postgres
# mysql
docker-compose exec app mysql -u root -h mysql -ppassword
In order to be able to access the sandbox application, just make
sure to provide the appropriate --binding
option to rails server
. By
default, port 3000
is exposed, but you can change it through SANDBOX_PORT
environment variable:
SANDBOX_PORT=4000 docker-compose up -d
docker-compose exec app bin/sandbox
docker-compose exec app bin/rails server --binding 0.0.0.0 --port 4000
Sandbox
Solidus is meant to be run within the context of Rails application. You can easily create a sandbox application inside of your cloned source directory for testing purposes.
This sandbox includes solidus_auth_devise and generates with seed and sample data already loaded.
-
Create the sandbox application
bin/sandbox
You can create a sandbox with PostgreSQL or MySQL by setting the DB environment variable.
# PostgreSQL export DB=postgresql bin/sandbox # MySQL export DB=mysql bin/sandbox
Depending on your local environment, it may be necessary for you to set environment variables for your RDBMS, namely:
DB_HOST
DB_USER
DB_PASSWORD
If you need to create a Rails 5.2 application for your sandbox, for example if you are still using Ruby 2.4 which is not supported by Rails 6, you can use the
RAILS_VERSION
environment variable.export RAILS_VERSION='~> 5.2.0' bin/setup bin/sandbox
-
You can start the Rails server and other services from either the Solidus folder or the sandbox one by running the command:
bin/dev
Please note: if you run bin/rails server
or similar commands, only the Rails server will
start. This might cause the error couldn't find file 'solidus_admin/tailwind.css'
when you
try to load admin pages.
Tests
Solidus uses RSpec for tests. Refer to its documentation for more information about the testing library.
CircleCI
We use CircleCI to run the tests for Solidus as well as all incoming pull requests. All pull requests must pass to be merged.
You can see the build statuses at https://circleci.com/gh/solidusio/solidus.
Run all tests
ChromeDriver is required to run the backend test suites.
To execute all of the test specs, run the bin/build
script at the root of the Solidus project:
createuser --superuser --echo postgres # only the first time
bin/build
The bin/build
script runs using PostgreSQL by default, but it can be overridden by setting the DB environment variable to DB=sqlite
or DB=mysql
. For example:
env DB=mysql bin/build
If the command fails with MySQL related errors you can try creating a user with this command:
# Creates a user with the same name as the current user and no restrictions.
mysql --user="root" --execute="CREATE USER '$USER'@'localhost'; GRANT ALL PRIVILEGES ON * . * TO '$USER'@'localhost';"
Run an individual test suite
Each gem contains its own series of tests. To run the tests for the core project:
cd core
bundle exec rspec
By default, rspec
runs the tests for SQLite 3. If you would like to run specs
against another database you may specify the database in the command:
env DB=postgresql bundle exec rspec
Code coverage reports
If you want to run the SimpleCov code coverage report:
COVERAGE=true bundle exec rspec
Extensions
In addition to core functionality provided in Solidus, there are a number of ways to add features to your store that are not (or not yet) part of the core project.
A list can be found at extensions.solidus.io.
If you want to write an extension for Solidus, you can use the solidus_dev_support gem.
Contributing
Solidus is an open source project and we encourage contributions. Please read CONTRIBUTING.md before contributing.
Top Related Projects
An open source eCommerce platform giving you full control and customizability. Modular and API-first. Build any eCommerce solution that your business requires. Developed by @vendo-dev
Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
PrestaShop is the universal open-source software platform to build your e-commerce solution.
A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
Shopware 6 is an open commerce platform based on Symfony Framework and Vue and supported by a worldwide community and more than 1.500 community extensions
A free shopping cart system. OpenCart is an open source PHP-based online e-commerce solution.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot