A mini e-commerce application built with Rails 4.2 for purposes of teaching Rails by example.
- When a product has 0 quantity, a sold out badge should be displayed on the product list page
- Admin users can list and create new categories
- Admins can add new products using the new category
- As a Visitor I can go to the registration page from any page in order to create an account
- As a Visitor I can sign up for a user account with my e-mail, password, first name and last name
- As a Visitor I can sign in using my e-mail and password
- As a User I can log out from any page
- As a User I cannot sign up with an existing e-mail address (uniqueness validation)
- Passwords are not stored as plain text in the database. Instead, has_secure_password is used in the User model, leveraging the bcrypt gem
- The order page contains items, their image, name, description, quantities and line item totals
- The final amount for the order is displayed
- The email that was used to place the order is displayed
- The e-mail content should be formatted with HTML
- It should list the total as well as each line item in the order
- The Order ID should be in the subject line
- User must enter HTTP auth login/password to access admin functionality
- When the cart is empty and the user goes to the carts#show page, display a friendly message about how it is empty and link to the home page
- As a visitor I can view the overall rating of products as I browse the catalog
- As a visitor I can view the list of ratings and reviews when viewing the product detail
- As a logged in user I can rate & review a product in a single step
- As a logged in user I can delete a rating or review that I previously created
- 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











