Skip to content

spree/spree-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,396 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spree Starter

A Rails application pre-configured with Spree Commerce. Use it as a starting point for your own store, or as the backend for a headless storefront.

Quick Start

The fastest way to get started is with create-spree-app:

npx create-spree-app my-store

This scaffolds a full project with Docker, a Next.js storefront, and this backend — all configured and ready to run.

Deploy to Render

Deploy to Render

One click deploys the backend (web + worker), PostgreSQL, and Redis.

Manual Setup

Prerequisites

  • Ruby (see .ruby-version)
  • PostgreSQL
  • Redis

Install & Run

bin/setup will use Mise to install all dependencies.

bin/setup
bin/dev

The app starts at http://localhost:3000.

Default admin credentials are created during db:seed.

Docker

Build and run with Docker:

docker build -t my-spree .
docker run -p 3000:3000 \
  -e DATABASE_URL=postgres://user:pass@host:5432/spree \
  -e REDIS_URL=redis://localhost:6379/0 \
  -e SECRET_KEY_BASE=$(bin/rails secret) \
  my-spree

See Docker deployment docs for a full docker-compose.yml example.

Environment Variables

Copy .env.example to .env and configure:

Variable Required Description
DATABASE_URL Yes (production) PostgreSQL connection URL
REDIS_URL Yes (production) Redis URL for jobs, caching, and Action Cable
SECRET_KEY_BASE Yes (production) Generate with bin/rails secret
PORT No Web server port (default: 3000)

See Environment Variables docs for the full list (SMTP, S3, Sentry, SSL, etc.).

Customization

This is a standard Rails application. Customize it however you need:

  • Add gems to Gemfile
  • Override models with decorators in app/models/
  • Add controllers in app/controllers/
  • Configure Spree in config/initializers/spree.rb
  • Add migrations with bin/rails generate migration

See the Spree Customization Guide for details.

Spree Core Development

To develop against a local checkout of the Spree gems:

# Set SPREE_PATH to your local spree monorepo
echo 'SPREE_PATH=../spree' > .env
bundle install
bin/dev

The Gemfile automatically uses local gems when SPREE_PATH is set.

License

MIT

About

@spree application starter template

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages