Skip to content
🛒Solidus, Rails eCommerce System
Ruby HTML JavaScript CSS Other
Branch: master
Clone or download
Latest commit b494770 Jan 17, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Remove Rails 5.1 jobs from CircleCI build Sep 13, 2019
.github Ask to provide screenshots for PRs with visual changes Oct 18, 2019
api [Api] Improve line items params documentation Dec 2, 2019
backend Fix issue with user breadcrums Jan 10, 2020
bin Update Teaspoon for Rails 6 support Sep 2, 2019
core Remove Rails 5.1 conditional code to run migrations Jan 15, 2020
frontend Merge pull request #3391 from JDutil/fixes-2078 Nov 7, 2019
guides Merge pull request #3462 from solidusio/dependabot/bundler/guides/rac… Jan 10, 2020
lib Merge pull request #3325 from nebulab/kennyadsl/sandbox-sqlite-rails6 Sep 9, 2019
sample Merge pull request #3389 from JDutil/fix-2978 Oct 26, 2019
.editorconfig Add max_line_length for Markdown files Oct 27, 2019
.eslintrc.json Disable all backend-specific ESLint offenses Jun 11, 2019
.gem_release.yml Improve gem-release configuration Jul 1, 2019
.gitignore Ignore node_modules folder and lock files May 20, 2019
.hound.yml Update rubocop version Dec 9, 2019
.rubocop.yml Disable Rails/SkipsModelValidations in spec folder Oct 26, 2019
.yardopts Move yard opts file into root folder Jan 3, 2019
CHANGELOG.md Remove a duplicate CHANGELOG line (v2.8) Jan 15, 2020
CONTRIBUTING.md Add links to the community guidelines Nov 23, 2019
GOVERNANCE.md Document our governance model Jun 27, 2019
Gemfile Update rubocop version Dec 9, 2019
LICENSE.md Capitalize LICENSE.md Jun 12, 2015
README.md Merge pull request #3437 from jacobherrington/link-to-community-guide… Jan 17, 2020
Rakefile Explicitly require Bundler within Rakefile Jan 4, 2019
SECURITY.md Document security policy location Aug 22, 2019
logo.svg Update README.md header Aug 13, 2019
package.json Add basic tooling for JS linting May 20, 2019
solidus.gemspec Bump required ruby version to 2.4.0 Sep 19, 2019

README.md

Solidus logo

Solidus

Circle CI Gem License Reviewed by Hound

Enthusiasts on Open Collective Supporters on Open Collective Ambassadors on Open Collective Open Source Helpers Slack

A free, open-source ecommerce platform that gives you complete control over your store.

Table of Contents

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.

Nebulab

Ambassadors

Support this project by becoming a Solidus Ambassador. Your logo will show up here with a link to your website. Become an Ambassador.

Engine Super Good Software Karma Creative ModdedEuros

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 gems maintained in this repository:

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

Try out Solidus with one-click on Heroku:

Deploy

Alternatively, you can use Docker to run a demo on your local machine. Run the following command to download the image and run it at http://localhost:3000.

docker run --rm -it -p 3000:3000 solidusio/solidus-demo:latest

The admin interface can be accessed at http://localhost:3000/admin/, the default credentials are admin@example.com and test123.

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 Rails 5/6 application and a database configured and created. Add the following to your Gemfile.

gem 'solidus'
gem 'solidus_auth_devise'

Run the bundle command to install.

After installing gems, you'll have to run the generators to create necessary configuration files and migrations.

bundle exec rails g spree:install
bundle exec rails g solidus:auth:install
bundle exec rake railties:install:migrations

Run migrations to create the new models in the database.

bundle exec rake db:migrate

Finally start the rails server

bundle exec rails s

The solidus_frontend 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 (rails g spree:install) will run migrations as well as adding seed and sample data. This can be disabled using

rails g spree:install --migrate=false --sample=false --seed=false

You can always perform any of these steps later by using these commands.

bundle exec rake railties:install:migrations
bundle exec rake db:migrate
bundle exec rake db:seed
bundle exec rake 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
  • Install the gem dependencies

    bundle install

    Note: If you're using PostgreSQL or MySQL, you'll need to install those gems through the DB environment variable.

    # PostgreSQL
    DB=postgresql bundle install
    
    # MySQL
    DB=mysql bundle install

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

    bundle exec rake sandbox

    You can create a sandbox with PostgreSQL or MySQL by setting the DB environment variable.

    # PostgreSQL
    DB=postgresql bundle exec rake sandbox
    
    # MySQL
    DB=mysql bundle exec rake sandbox

    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'
      bundle install
      bundle exec rake sandbox
  • Start the server

    cd sandbox
    rails server

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 frontend and 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_cmd gem.

Contributing

Solidus is an open source project and we encourage contributions. Please read CONTRIBUTING.md before contributing.

You can’t perform that action at this time.