Skip to content

PavelKotlov/jungle-rails

Repository files navigation

Jungle

🔗 Jungle

A mini e-commerce application built with Rails 6.1. Jungles allows a consumer to add and remove products from a cart. In addition the shop owner can create new categories of products, and add new products to each caterogry. Finally the consumer can sum their order and checkout using stripe's api to process the payment.

made-with-Node made-with-Ruby made-with-Rails made-with-PostgreSQL made-with-Bootstrap made-with-Stripe made-with-Webpack made-with-Cypress

Table of Content

🌟 Features

  • A consumer can browse, view, and add to cart a number of proudcts from different categories.
  • A consumer can pay for their order and recieve an order summary.
  • A store owner can view a dashboard which shows the number of categories, products, and sales currently in their store.
  • A store owner can add or delete sales, catergories, and proudcts to and from their store.
  • A store owner would need to authenticate before being able to access sensitive areas such as thier dashboard.

Purchase Feature

purchase

Admin Features

admin

Sale Feature

sale

🚀 Getting Started

  1. Fork and clone the repository.
  2. Install all dependencies using the bundle install command1.
  3. Create config/database.yml by copying config/database.example.yml
  4. Create config/secrets.yml by copying config/secrets.example.yml
  5. Run bin/rails db:reset to create, load and seed db
  6. Create .env file based on .env.example
  7. Sign up for a Stripe account
  8. Put Stripe (test) keys into appropriate .env vars
  9. Run bin/rails s -b 0.0.0.0 to start the server
  10. Visit http://127.0.0.1:3000 or localhost:3000 in your browser (port defaults to 3000).
  11. To authenticate user use Jungle and book when prompted.

Database

  • 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 password development to an existing database user.

Stripe Testing

  • Use Credit Card # 4111 1111 1111 1111 for testing success scenarios. More information in the stripe docs

⚫ Endpoints

Http method path Description
GET / products#index
GET /login sessions#new
POST /login sessions#create
GET /logout sessions#destroy
GET /signup users#new
POST /users users#create
GET /admin admin/dashboard#show
GET /admin/products admin/products#index
POST /admin/products admin/products#create
GET /admin/products/new admin/products#new
DELETE /admin/products/:id admin/products#destroy
GET /admin/categories admin/categories#index
POST /admin/categories admin/categories#create
GET /admin/categories/new admin/categories#new
DELETE /admin/categories/:id dmin/categories#destroy
GET /admin/sales admin/sales#index
POST /admin/sales admin/sales#create
GET /admin/sales/new admin/sales#new
DELETE /admin/sales/:id admin/sales#destroy
GET /about about#index
GET /products products#index
GET /products/:id products#show
GET /categories/:id categories#show
POST /orders orders#create
GET /orders/:id orders#show
POST /users users#create
GET /users/new users#new
POST /cart/add_item carts#add_item
POST /cart/remove_item carts#remove_item
GET /cart carts#show

🧱 Main Structure

├─── .github               
├─── app            
├─── bin             
├─── config              
├─── cypress             
├─── db
├─── lib
├─── log
├─── public
├─── spec
├─── storage
├─── test
├─── tmp
├─── vendor
├─── .browserlistrc
├─── .env.example
├─── .gitignore
├─── .ruby-version
├─── Gemfile
├─── Gemfile.lock
├─── README.md
├─── Rakefile
├─── babel.config.js
├─── config.ru
├─── cypress.json
├─── package-lock.json
├─── package.json
└─── postcss.config.js

📦 Tech Stack (Dependencies)

🔨 Dependencies

🧰 Development Dependencies

⚠️ Disclaimer


Footnotes

  1. If running this command fails due to rmagick unable to install, then run this command sudo apt-get install libmagickwand-dev imagemagick and then repeat step 2.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published