Skip to main content
Spree Commerce - Open Source e-commerce platform

Getting Started with Spree Commerce

Welcome to the Spree Commerce open-source eCommerce documentation guide. Follow the instructions below to learn how to build and deploy your Spree Commerce store.

1. Installing Spree

Spree Starter is a pre-configured Rails application that comes with Spree Commerce, the official Stripe gem, and some other useful gems installed. It is highly recommended to use Spree Starter to get started with Spree Commerce.
If you’re on Windows remember to install the Linux subsystem before proceeding.
  1. Install git if you don’t have it already.
  2. Clone the Spree starter template:
    git clone https://github.com/spree/spree_starter.git
    
  3. Go to the repository directory:
    cd spree_starter
    
Now that you have the Spree Starter template, you can start setting up your development environment.
  1. Install required dependencies On MacOS you can install the dependencies using Homebrew package manager:
    brew install vips libpq
    
    On debian-based systems you can install the dependencies using the package manager:
    sudo apt-get install libvips-dev libpq-dev
    
  2. Install Ruby Spree is based on Ruby and Rails, hence you need to install Ruby language. Install rbenv (ruby version manager):
    curl -fsSL https://rbenv.org/install.sh | bash
    
    And now install Ruby 3.3: Before attempting to install Ruby, check that your build environment has the necessary tools and libraries.(https://github.com/rbenv/ruby-build/wiki#suggested-build-environment)
    rbenv install 3.3.0 && rbenv global 3.3.0
    
  3. Install Docker Desktop
  4. Start Docker Compose services:
    Docker needs to be running before running the setup commands.
    docker compose up -d
    
    This will start the PostgreSQL database which is required for Spree to work. You can also use other databases like MySQL.
  5. Run setup commands:
    bin/setup
    
    This will install the necessary gems, run the database migrations and seed the database with some sample data.
  6. And finally start the development server with:
    bin/dev
    
    This will start the development server on http://localhost:3000.
To add sample data to your store, run:
bin/rake spree_sample:load
This will add a some products, categories, and will setup a checkout flow to your store.

2. Exploring Your Store

Feel free to explore your store. You can do so because Spree comes with a default pre-built Storefront and Admin Panel.
Spree comes with a default pre-built Storefront. You can access it by navigating to http://localhost:3000.

Spree Storefront

You can learn more about Storefront configuration in the Storefront section.
Use your browser window to navigate to http://localhost:3000/admin. You can log in with the default credentials:login:password:
spree123
Upon successful authentication, you should see the admin screen:

Spree Admin Dashboard

Feel free to explore some of the Admin Panel features that Spree has to offer and to verify that your installation is working properly.

All Done!

Congrats! You’ve set up your Spree Commerce and it’s looking amazing! Give Spree a GitHub Star, why dont’t ya? Thank you for supporting Spree open-source! Need support or want to give some feedback? Join our community with 6000+ members or drop us an email at [email protected].
I