A mini e-commerce application built with Rails 4.2 for purposes of teaching Rails by example.
- Sold Out Badge - When product is sold out, a badge will be displayed
- Admin Categories - Admin users can create new categories and add new products to categories
- User Authentication (with uniqueness validation) - As a visitor you can register as a user and login/logout, has_secure_password and bcyrpt gem are utilized
- Order Details Page - Order page that contains all order items for user with their email and total amount due
- Email receipt - Send email confirmation after order using Active Mailer
- Missing Admin Security - Added HTTP auth login/password to access admin functionality
- Checking Out with Empty Cart - Show error when cart is empty to tell user to add items and go back to the home page
- RSPEC, Capybara, Poltergeist(Phantomjs), Database Cleaner
- Run
bundle install
to install dependencies - Create
config/database.yml
by copyingconfig/database.example.yml
- Create
config/secrets.yml
by copyingconfig/secrets.example.yml
- Run
bin/rake db:reset
to create, load and seed db - Create .env file based on .env.example
- Sign up for a Stripe account
- Put Stripe (test) keys into appropriate .env vars
- Run
bin/rails s -b 0.0.0.0
to start the server
Use Credit Card # 4111 1111 1111 1111 for testing success scenarios.
More information in their docs: https://stripe.com/docs/testing#cards
- Rails 4.2 Rails Guide
- PostgreSQL 9.x
- Stripe