Skip to content

A desktop web app where users can create opinions about books. Users post opinion of books and other users can comment them. Users can follow and be followed by other users. Built with Ruby on Rails, HTML, CSS and Bootstrap.

Notifications You must be signed in to change notification settings

Maclenn77/book_opinions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Book Opinions

Description

This is a web-app where users can share their opinions about books and book's authors.

Each time that users create a new opinion, a link to worldcat is generate. In this way, other users can find their recommendations.

For some reason, the video link is not showing in the request. This is the link to the video presentation. videolink

Associations

  • Users have a username and an email. They can follow other users. They can read book opinions of other people and they can create, edit or destroy their own book opinions. Opinions They have a title and a body. Users can read in the index the book opinions of their followed users.
  • Following is a join table. Each time that a user follows other user, is created a new relationship between them. This relationship can be non-reciprocal.

Diagram of database relationships

diagrammodels

Validations

Validations are defined in the model of each class. New objects need to pass the following validations:

Users

  • Name: presence should be true and unique. The username should have more than 3 characters and less than 10.
  • Fullname: mandatory with a length between 3 and 20 characters.

OPINIONS

  • Title: mandatory, with a length between 2 and 50 characters.
  • Body: mandatory, with a length between 2 and 50 characters.

Getting started

Prerequisites

  • Ruby
  • Rails
  • Bundle
  • MySQL 3 for development Note: You can change the database in GemFile.
  • Postgrest for Deployment

Built With

  • Ruby 2.7.0 - A programming language.
  • Ruby on Rails 6.0.3.1 - A Ruby framework for web development

Installing

  1. Download this repository

$ git clone repo_url

  1. Install all required gem.

$ bundle install

  1. Migrate the database.

$ rails db:migrate

  1. Run localhost

$ rails server

Running the tests

You can check specs into the folder 'tests'. Run test with

$ rspec

Also, you can run tests with

$ rails test

If any error relate to selenium webdriver appears, run

$ bundle install

If this doesn't solve the problem, open an issue.

Tested with

  • Test Unit
  • RSpec
  • Capybara

Live Version

Author

👤 Juan Paulo Perez Tejada

Visit my blog

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

To DO

  • Add validations to image sizes
  • Find an alternative storage for images

About

A desktop web app where users can create opinions about books. Users post opinion of books and other users can comment them. Users can follow and be followed by other users. Built with Ruby on Rails, HTML, CSS and Bootstrap.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published