A mini e-commerce application built with Rails 6.1 for purposes of teaching Rails by example. Items marketed for sale on this application are residential, indoor plants.
overview.mp4
product_details.mp4
registration_login.mp4
cart_order.mp4
admin.mp4
In order to run this application, you will need to have Ruby and Rails installed. If you do not know how to set it up or if you would like to learn more about it, visit this website.
Prior to installation make sure you go into the directory where you would like jungle-rails to reside.
- Clone the repo
git clone https://github.com/tothenextcode/jungle-rails.git
- Install dependencies
bundle install
- Setup database configuration
cp config/database.example.yml config/database.yml
- Setup secrets to sign and authenticate cookies
cp config/secrets.example.yml config/secrets.yml
- Create, load and seed database
bin/rails db:reset
- Setup environment variables
cp .env.example .env
- Sign up for a Stripe account
- Put Stripe (test) keys into appropriate .env vars
- Start the server
bin/rails s -b 0.0.0.0
If Rails is complaining about authentication to the database, uncomment the user and password fields from
config/database.yml
in the >development and test sections, and replace if necessary the user and passworddevelopment
to an existing database user.
Use Credit Card # 4111 1111 1111 1111 for testing success scenarios.
More information in their docs: https://stripe.com/docs/testing#cards
Once the server is running, you will be able to view, add plants to card and order as a user. The following features are available upon application launch:
Users:
- Plants for sale are listed on the main page.
- Plants can also be viewed based on assigned category.
- Users can click on a plant to view more detailed information and includes reviews from users based on selected product.
- Users logged in can add reviews in each product details page.
- Users can delete their own reviews.
- Users can add items to cart by clicking on the Add button - My Cart total values are updated.
- Users can view their cart by clicking on the My Cart.
- Once done adding plants, users can pay for order by clicking on Pay With Card.
- Users will be redirected to order summary page after payment and if logged in, will be sent a detailed email receipt of the order.
- Users can register and login with provided credentials.
Admin:
- Admins are required to sign-in with admin credentials to access admin pages.
- Admins are provided with jungle statistics on dashboard page.
- Admins can add/delete products.
- Admins can add new categories.
Keep in mind that this application just simulates e-commerce for plants based on arbitrary data. Jungle-rails itself is not tied to a real e-commerce platform.
✔️ Bug Fix: Money Formatting
✔️ Feature: Empty Cart
✔️ Feature: Sold-out Badge
✔️ Feature: Order details
✔️ Bug Fix: Admin Security
✔️ Feature: Admin Dashboard Statistics
✔️ Feature: About Page
✔️ Feature: Admin Categories
✔️ Feature: User Authentication
✔️ Testing: Rspec Model - Product
✔️ Testing: Rspec Model - User
✔️ Testing: Cypress - Home Page
✔️ Testing: Cypress - Product Details
✔️ Testing: Cypress - Add to Cart
✔️ Testing: Cypress - User Login
✔️ Feature: Email Receipt
✔️ Feature: Product Ratings
✔️ Feature: Inventory Adjustment
❕ Bug Fix: Prevent Orders > Store Quantity
❕ Project deployment to Heroku + Netlify