A simple yet fully functional web-shop application built with Ruby on Rails
This app is a store with features close to the real ones.
The user can add products to the cart and buy, navigate by categories and brands, search, filter and sort products. The administrator is able to manage products, add and change them, and also has access to the API and the administrator page.
You can go to the website or view the images in the docs/images folder
- Sign up / sign in / forgot password
- Sign in with Facebook
- Filter products by categories and brands
- Add products to the shopping cart
- Search for products using auto-completion
- View related and recent products
- Product's pagination
- Use app's API if the administrator has given you UID and secret
- Admin Page
- OAuth 2 provider
- Built with
Ruby on Rails 5 - Using
Boostrap 3and own stylesheets for styles Deviseas authentication solutionPunditfor authorizationPagyfor paginationrails_adminfor admin pageHAMLas templating engine for HTMLCoffeeScriptinstead of JS in scripts- Using
jQueryand plugins:easydropdown,responsiveslides,simpleCart,typeahead, etc. meta-tagsfor SEO optimizationOmniAuthprovides authentication using third-party credentialsDoorkeeperasOAuth 2provider andAPIauthenticatorAPIbuilt withjbuilderandactive_model_serializersacts-as-taggable-onfor filtering products by tagsrack-attackas middleware for throttling and blocking abusive requests- TDD with
RSpec+ShouldaMatchers+FactoryBot+etc.(over110tests) - Profiling and optimization tools:
BulletasN+1problem profileractive_record_doctorhelps to keep the database in a good shape
- Code quality scanners:
rails_best_practices,rubocop,rubycritic,brakeman - CI/CD
Travis CICoveralls.iofor test coverage history & statisticsHakiri.io&GuardRails.ioas security vulnerabilities scanner
Docker&docker-compose
Clone this repository:
git clone [email protected]:maxbarsukov/shoeshop.git
Install gems:
bundle install
Setup database and seeds:
bundle exec rails db:create db:migrate db:seed
Setup your test database:
bundle exec rails db:test:prepare
With Foreman:
- Dev:
foreman start - Production:
foreman start -f Procfile
Using Docker: docker-compose up
Run tests with rspec
Check security vulnerability with bundle exec brakeman --exit-on-warn -f plain -5
Check the quality of code with bundle exec rails_best_practices . --spec -c config/rails_best_practices.yml
Run bundle exec rubycritic for code quality reporter
MIT License. Copyright 2021 nyapsilon