saarikabhasi / Book-Website

The Book Fair- A Book reviewing website

Home Page:https://the-booklover.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deployment: https://the-booklover.herokuapp.com/

Youtube: https://www.youtube.com/watch?v=6i0gpEAdXM0&pbjreload=101

alt text alt text alt text alt text alt text alt text

Description:

Development of a Book Reviewing website - 'The Book Fair'

The Book Fair website allows its user to,

  1. Register
  2. Login
  3. search books
  4. see the book details
  5. leave comments and rate the book on the scale of 1 to 5.
  6. Book's average rating and comments left by users
  7. pulls Rating information from third-party websites Good Reads and Google Books.

General information:

  1. Pulls book publisher details, description, book cover thumbnail image from the Google books API.
  2. Database setup using Heroku and PostgreSQL.
  3. Supports smaller screens.
  4. Users can make a API get request to the website by https://the-booklover.herokuapp.com/api/isbn.
    • isbn is the book isbn number:
      • Example:
        • https://the-booklover.herokuapp.com/api/0380753022 (isbn: 0380753022)

          {
            "author":"Johanna Lindsey",
            "average_score":2.67,
            "isbn":"0380753022",
            "review_count":4,
            "title":"Gentle Rogue",
            "year":1990
            }
          
        • 404 error if isbn in not found in the DB:

          {
          "error":"Invalid isbn number",
          "status_code":404
          }
          

Setup:


  # clone repository
    git clone https://github.com/saarikabhasi/CS50-project1-Books.git
    
  # Create a virtualenv(optional)
    python3 -m venv venv  
    
  # Activate the virtualenv
    source venv/bin/activate or .venv/bin/activate
    
  # Install all dependencies
     pip install -r requirements.txt
     
  # ENV Variables
      export FLASK_APP=application.py 
      export FLASK_ENV=development  #To enable debug mode. Reference#https://flask.palletsprojects.com/en/1.1.x/config/
      export DATABASE_URL = Heroku Postgres DB URI 
      export GR_key = Goodreads API Key. Reference#https://www.goodreads.com/api/keys 

Database Schema:


  1. Books( book_id integer, isbn varchar, title varchar, author varchar, year integer)

    • Primary key:
      • isbn
  2. users(user_id integer,email_id varchar, password varchar,name varchar)

    • Primary key:
      • email_id
  3. reviews(id integer, contents text NULL , rating numeric NULL, isbn varchar, email_id varchar)

    • Primary key:
      • id
    • Foreign Key:
      • isbn refers to (books:isbn)
      • email_id refers to (users:email_id)

Built with:


  1. Bootstrap (version: 4.5)

  2. Microsoft Visual code (version:1.44)

  3. Flask (version: 1.1.2)

  4. Flask-Session(version: 0.3.2)

  5. gunicorn (version: 20.0.4)

  6. Jinja2 (version: 2.11.2)

  7. psycopg2 (version: 2.8.5)

  8. requests (version: 2.23.0)

  9. SQLAlchemy(version:1.3.17)

  10. Werkzeug(version:1.0.1)

  11. Python(version 3.7.3)

  12. HTML5

  13. Cascading Style Sheets (CSS)

Author:


NAIR SAARIKA BHASI

About

The Book Fair- A Book reviewing website

https://the-booklover.herokuapp.com/


Languages

Language:HTML 48.8%Language:CSS 29.6%Language:Python 21.6%