Skip to content

georgiybykov/qna

Repository files navigation

qna

RuboCop RSpec

Ruby on Rails project with questions and answers.


The project includes and consists of:

  • Ruby 2.7.2
  • Ruby on Rails 6.1.4
  • RSpec as framework for tests
  • Sidekiq with Redis for background jobs
  • Elasticsearch for full-text search
  • ActionCable for real-time connection using WebSockets
  • OAuth 2.0 with Authorization Code Flow
  • Role Based Access Control with cancancan for authorization (abilities)
  • RESTful API with Doorkeeper as OAuth 2.0 provider
  • Production web-server is Unicorn (configuration files are in the project tree)
  • Capistrano for deployment

Fetch and start the project:

$ git clone git@github.com:georgiybykov/qna.git
$ cd qna

# Install dependencies:
$ bundle install

$ cp .env.sample .env
$ cp config/database.yml.sample config/database.yml
$ cp config/elasticsearch.yml.sample config/elasticsearch.yml

$ bundle exec bin/rails db:create
$ bundle exec bin/rails db:migrate

# If you need test or development data:
$ bundle exec bin/rails db:seed

Run server:

$ bundle exec bin/rails server

Then visit: http://localhost:3000

Run tests:

$ bundle exec rspec

Run linter:

$ bundle exec rubocop

Examples:

  • Sign in page:

Sign in page

  • Main page:

Main page

  • New question page:

New question page


Good luck! May the force be with you!