A production-ready e-commerce starter kit built with Rails 8.1. Ships with everything you need to launch an online store: products with variants, Stripe checkout, customer accounts, discount coupons, inventory tracking, and a full-featured admin dashboard.
Storefront
- Product catalog with variants, options, and faceted filtering
- Category and collection pages
- Full-text product search
- Cart and Stripe Checkout (with coupon support)
- Customer accounts — order history, saved addresses, wishlist
- Magic link authentication (no password required)
- SEO-ready — meta tags, Open Graph, slug-based URLs with redirect history
Dashboard
- Product management — create products, generate variants from options (Size × Color)
- Inventory tracking with movement history
- Order management with status flow (
pending → paid → shipped → completed) - Coupon/discount codes — percentage or fixed, with expiry and usage limits
- Collections and categories management
- User roles — Owner, Admin, Staff
Technical
- Rails 8.1, PostgreSQL, Hotwire (Turbo + Stimulus), Tailwind CSS
- Stripe Checkout + webhook handling
- Background jobs via Solid Queue, caching via Solid Cache
- FriendlyId slug URLs with history (301 redirects when slugs change)
- N+1 protection via Prosopite in development and test
- RSpec test suite
- Ruby 4.0+
- PostgreSQL 14+
- Node.js (for Tailwind CSS watcher)
- A Stripe account
git clone <your-repo-url> my-store
cd my-store
bin/setupbin/setup installs dependencies, creates and seeds the database, and starts the server at http://localhost:3000.
To reset the database and start fresh:
bin/setup --resetAll secrets are managed via Rails credentials. Open the credentials file:
bin/rails credentials:editAdd the following:
stripe:
secret_key: sk_test_...
webhook_secret: whsec_...
smtp:
user_name: your@email.com
password: your-smtp-passwordStripe webhook — in development, use the Stripe CLI to forward events:
stripe listen --forward-to localhost:3000/webhooks/stripeCopy the webhook signing secret it prints and add it to credentials as stripe.webhook_secret.
bin/dev # Start server + Tailwind watcher (port 3000)Default admin account (created by seed):
Email: admin@tokko.com
Password: password
Log in at http://localhost:3000/dashboard.
bundle exec rspec # Full suite
bundle exec rspec spec/models/product_spec.rb # Single fileCode quality:
bin/rubocop # Linting
bin/brakeman # Security audit
bin/bundler-audit # Gem vulnerability checkThis project includes a Kamal configuration. Update config/deploy.yml with your server IP and image registry, then:
kamal setup # First deploy
kamal deploy # Subsequent deploysSet RAILS_MASTER_KEY on your server (found in config/master.key):
kamal env pushMIT