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 3
and own stylesheets for styles Devise
as authentication solutionPundit
for authorizationPagy
for paginationrails_admin
for admin pageHAML
as templating engine for HTMLCoffeeScript
instead of JS in scripts- Using
jQuery
and plugins:easydropdown
,responsiveslides
,simpleCart
,typeahead
, etc. meta-tags
for SEO optimizationOmniAuth
provides authentication using third-party credentialsDoorkeeper
asOAuth 2
provider andAPI
authenticatorAPI
built withjbuilder
andactive_model_serializers
acts-as-taggable-on
for filtering products by tagsrack-attack
as middleware for throttling and blocking abusive requests- TDD with
RSpec
+ShouldaMatchers
+FactoryBot
+etc.
(over110
tests) - Profiling and optimization tools:
Bullet
asN+1
problem profileractive_record_doctor
helps to keep the database in a good shape
- Code quality scanners:
rails_best_practices
,rubocop
,rubycritic
,brakeman
- CI/CD
Travis CI
Coveralls.io
for test coverage history & statisticsHakiri.io
&GuardRails.io
as security vulnerabilities scanner
Docker
&docker-compose
Clone this repository:
git clone git@github.com: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