A mini e-commerce application built with Rails 4.2 for purposes of teaching Rails by example.
- Visitors may create and log into their account using their email and password; the email is verified to be unique and the password is encrypted.
- When a user places an order, they are redirected to an order details page, which includes a summary of the items they purchased, the total amount charged to their card, and the email address that the order confirmation email was sent to.
- An order confirmation email is sent to the email address associated with the user's account when they place an order.
- A user may rate and review a product; the user may delete a rating they have previously created, and are limited to leave only one rating per product. A visitor may view the ratings and reviews for a product, but may not rate/review the product themselves.
- Admin users may view all the categories of products, and add a new category as well as add new products using the new category.
- When a category has 0 quantity, a sold out badge is displayed on the product list page.
- A user must enter HTTP authentication login/password to access admin functionality.
- When the cart is empty and the user views their cart, a message is displayed indicating that their cart is empty, and a link to continue shopping is displayed.
- When a user successfully completed an order, the quantities in the store are updated.
- When the quantity in a user's cart reaches the total quantity available for the product, the user is not able to add any more of that product to their cart.
- Fork & Clone
- Run
bundle installto install dependencies - Create
config/database.ymlby copyingconfig/database.example.yml - Create
config/secrets.ymlby copyingconfig/secrets.example.yml - Run
bin/rake db:resetto 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.0to 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



