GithubHelp home page GithubHelp logo

project-books / book-project Goto Github PK

View Code? Open in Web Editor NEW
467.0 26.0 454.0 21.01 MB

Book tracker web app for book lovers

Home Page: https://project-books.github.io/

License: GNU General Public License v3.0

Java 77.79% CSS 4.20% Dockerfile 0.20% Shell 0.06% HTML 0.61% TypeScript 17.14%
spring-boot books spring-data-jpa spring-security flyway reading docker spring hacktoberfest design

book-project's People

Contributors

anoop01234 avatar ashusharmatech avatar chflick avatar dbar98 avatar dependabot[bot] avatar dro-1 avatar gxpinheiro avatar jacobdadoun avatar josephkenny avatar judeibe avatar kaansonmezoz avatar kateerfle avatar knjk04 avatar kumawatanupriya avatar lrvignesh avatar mareksmelko777 avatar masterdobby avatar mikelowrie avatar ofvoler avatar olusolaa avatar osopromadze avatar pato060 avatar priya1712d avatar rivad2 avatar rubenamcruz avatar tmrd993 avatar tomglk avatar varadeth avatar ybrecher avatar zackhollander avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

book-project's Issues

Change the way ratings are displayed

Is your feature request related to a problem? If so, please describe.
The rating field in the list of books in a given shelf show as their enum value (e.g. NINE), rather than 9/10 (see screenshot).

Describe the solution you'd like
Ratings are shown as a fraction out of 10. For example, if the rating is NINE_POINT_FIVE, it should be displayed as 9.5/10.

Additional context

How the ratings are shown in the list of books in a given shelf:
rating

Current enum:

public enum RatingScale {
    ZERO,
    ZERO_POINT_FIVE,
    ONE,
    ONE_POINT_FIVE,
    TWO,
    TWO_POINT_FIVE,
    THREE,
    THREE_POINT_FIVE,
    FOUR,
    FOUR_POINT_FIVE,
    FIVE,
    FIVE_POINT_FIVE,
    SIX,
    SIX_POINT_FIVE,
    SEVEN,
    SEVEN_POINT_FIVE,
    EIGHT,
    EIGHT_POINT_FIVE,
    NINE,
    NINE_POINT_FIVE,
    TEN
}

This should be similar to issue #20.

Related branch: ui. Please create your branch off ui and submit a PR to merge into it when done.

Make 'book read' a subclass of book

Instead of having the following instance variables in backend/model/Book.java:

// For books that have been read
private RatingScale rating;
private String favouriteQuote;
private LocalDate dateStartedReading;
private LocalDate dateFinishedReading;

Make a subclass of Book (called something like 'BookRead') that extends Book and has the instance variables above

Reset books in shelf grid

After filtering by a book title (see BooksInShelfView.java), the grid results filters as expected.

However, if the clear button is pressed, or the user manually clears the filter field, the grid results should reset (since a shelf is still selected as there is no way to clear the shelf option).

Branch off master.

Design a better 'books in shelf' page

Describe the solution you'd like
A cleaner and simpler UI design for the 'books in shelf page' (see screenshot).

This could be in the form of, for example, drawings, wireframes or direct changes to the UI in Vaadin.

Additional context

Current 'books in shelf' page:
books-in-shelf

Problems with current page:

  • If the user has lots of books in the grid, they might have to scroll a long way to get to the book form. The book form could perhaps be displayed on the top only if the user presses a 'new book' button or selects on a grid entry.

Any other ideas and suggestions for improvement on this page are greatly appreciated.

Branch off master.

Update: please ensure that all work is your own or has an appropriate open source license (if it's not your own but there's a license, let us know so that we can attribute the original source)

Don't show irrelevant grid columns

If the 'to read' shelf is selected from the ComboBox (drop-down list in Vaadin), the date and rating columns should not be shown.

Similarly, if the 'reading' shelf is selected, the date finished and rating columns should not be shown.

book-grid

A book should be able to span multiple genres

A book should be able to have multiple genres.

Suggested implementation:

private Set<Genre> genre;

in backend/model/Book.java

Update

This is now a backend-only issue (no Vaadin or React is required).

Branch from 0.2.0 and create a branch to back into it.

Add login page

Is your feature request related to a problem? If so, please describe.
Users should eventually only be able to modify their own books

Describe the solution you'd like
Add a login page and a way to log out using Spring Security and a Vaadin LoginForm.

Hide date finished if in 'to read' or 'reading' shelf

Is your feature request related to a problem? If so, please describe.
The date finished date picker should not show if the user has not yet finished the book.

Describe the solution you'd like
If a book is being added to the 'to read' shelf or the 'reading' shelf, the date finished field (see BookForm.java) should not show.

Additional context
hide-date-finished

In the example above, the 'date finished' field should not show.

Branch off master.

Moving a book to a different shelf deletes the shelf

Describe the bug

If I try to move a book to a different shelf, the shelf that I was moving the book from is no longer accessible. Also, the shelf that I moving the book from is no longer accessible (since there are now two of them).

To Reproduce
Steps to reproduce the behaviour:

  1. Select the 'reading' shelf
  2. Select a book
  3. In the book form, choose the 'to read' shelf
  4. Switch to the 'to read' shelf. The book is there.
  5. Try switching to the 'reading shelf'. See error.

Expected behaviour

It should be possible to move a book to a different shelf without deleting the shelf.

image

Date started or finished reading should not be after today's date

When the 'date starting reading' field is shown in the book form, the user should not be able to save a book (i.e. add a validation check) with a start date that is after today's date.

Note: the user is allowed to add today's date.

The above also applied for the date finished reading.

Form validation not working

Describe the bug

Form validation is not working. For instance, if the user were to add a new book without a required field (e.g. the book title), the form adds the new book.

To Reproduce
Steps to reproduce the behaviour:

  1. Add a new book without a book title
  2. Select a shelf in the top dropdown
  3. See error

Expected behaviour

The save button should be greyed out until all the required fields have been filled, preventing a user from adding an invalid book.

Screenshots

Adding a new book without a title:
invalid-form1

The book has been added:
invalid-form2

Additional context

Branch: ui
Commit: d3393fa

Add reading goal

Describe the solution you'd like
Add a page where the user can set a target for the number of the books they want to have read by the end of the year.

The page should include

  • The yearly target (e.g. 52 books to read by the of the year)
  • A way to reduce or increase the number of books in that target
  • How many books the user has read1 during the year (so far if the year is not the past)
  • Which books they have read during that year that count towards the target
  • A way to see how many books the user needs to read a week on average in order to reach the target
  • Whether they are ahead of target, behind or on target
  • A visual element that shows what percentage of the way through they are towards that target
  1. Books that have been marked as 'to read' that were started and finished in during the year count towards the year's reading goal. This should be made clear to the user.

Additional context

The reading goal should be an entity so that it is saved in the database (so that users can see previous yearly challenges they set for themselves).

In short, this reading target feature should be similar to Goodreads's.

Add series position

Describe the solution you'd like
Let a user specify which position the book is in a series. For example, 'Harry Potter and the Prisoner of Azkaban' is the third book in the Harry Potter series.

This would involve adding an int field to the Book POJO.

If set, this can be displayed in the title. For example,

Harry Potter and the Prisoner of Azkaban (#3)

Branch off master.

Add predefined shelves

Add the shelves:

  • Want to read
  • Currently reading
  • Read

A book can be in at most one of these three shelves. For now, these shelves should not be able to be deleted or renamed

Form labels overlapping

Describe the bug

At lower resolutions, the form labels overlap.

Expected behaviour

The form should adapt to smaller resolutions.

Screenshots

image

Additional context

Not an issue on 2560x1440 displays, but it is an issue on 1920x1080 displays.

Required field indicator not showing

Describe the bug
The required field indicator (blue dot) is not showing with the new FormLayout (it used to show when addFormItem was not used in the FormLayout).

To Reproduce
Steps to reproduce the behaviour:

  1. Go to the new book form
  2. See error

Expected behaviour
The blue dot indicators should show for the book title, book author and shelf fields.

Please create your branch of the ui branch and submit a PR to merge into it when done.

Grid not loaded with list of books

Describe the bug

The grid (see screenshot) is not populated with a list of books in the specified shelf.

To Reproduce
Steps to reproduce the behaviour:

  1. Select a book shelf from the dropdown list
  2. See error

Expected behaviour

A list of books that are in the specified shelf should appear.

Screenshots

empty-grid

Additional context

Branch: shelf-binding

Debug messages have been added. The call to Shelf's getBooks() returns an empty list.

What has changed:

  • The mappings between a Book and a Shelf

Add multiple authors in book form

The current book form does not yet support adding multiple authors.

The Book entity needs to be modified to store a List of authors.

Possible implementation: the user types in a book author in the 'new book' form. After typing in the name of one author, a new text field appears below to allow a user to add in another author.

Form validation errors shown prematurely

Describe the bug

After clicking on the 'add book' button, the form validation errors show when before the user has done anything.

To Reproduce
Steps to reproduce the behaviour:

  1. Click on 'add book'
  2. See error

Expected behaviour

A blank form (without any validation errors) should show when the form is first presented to the user.

Screenshots

image

Change the way genres are displayed

Is your feature request related to a problem? If so, please describe.
It's strange to see the genre in uppercase and for there to be underscores (as in the enum) in the new book form and the shelf grid.

Describe the solution you'd like

  • Every genre to be displayed in lower case
  • Spaces, not underscores, between words

For example, SCIENCE_FICTION should be Science fiction and, as a special case, NON_FICTION should be Non-fiction.

Additional context
Screenshot:
genres

Required rating but should not be required

Describe the bug

The rating field in the book form is required.

To Reproduce
Steps to reproduce the behaviour:

  1. Fill in the details for a book except the rating
  2. Click on 'Add book'

Expected behaviour

The book should be added. There should be a representation in the rating enum for 'no rating'.

Screenshots

required_rating

Possible circular dependency

Describe the bug
Book.java contains a list of Authors, and Author.java contains a list of Books.

This makes it hard to construct a Shelf with a List of Books that have authors attached since a Book depends on having an Author and an Author depends on having a Book.

Author takes in a list of Books in its constructor. Similarly, a Book takes in a list of Authors in its contructor.

Store book edition

Describe the solution you'd like
Let a user specify which edition of the book they have read.

This should only affect the back-end for now. The Book entity should take an int that is at least 1. It should store the book edition as a String.

Examples:

  • If the edition passed in is 1, the edition stored should be "1st edition"
  • If the edition passed in is 2, the edition stored should be "2nd edition"
  • If the edition passed in is 3, the edition stored should be "3rd edition"
    and so on

Refactor to use Lombok

Refactor the code to use Project Lombok so that getters, setters and no-arg constructors are generated.

Branch off master and merge into it when done

Add a new shelf

Describe the solution you'd like
As with the new book form, there should be a way to add a new shelf. The shelf should have a name.

Each shelf should have a unique name (so a custom made shelf should not have the same name as a predefined shelf).

Incorrect fields bound by binder

Describe the bug

If a field in the book form is hidden (e.g. date started because the book is in the 'to read' shelf), a start date should not be shown in the book grid.

To Reproduce
Steps to reproduce the behaviour:

  1. Choose the 'to read' shelf
  2. See error

Expected behaviour

  • A start date should not be shown for books in the 'to read' shelf

  • A finished date should not be shown for books in the 'to read' shelf

  • A finished date should not be shown for books in the 'reading' shelf

  • A book rating should not be shown for books in the 'to read' shelf

  • A book rating should not be shown for books in the 'reading' shelf

Screenshots

to-read-binder

Design a favicon

Design a favicon to be used for the site.

Ideally, if someone sees the icon, they should be able to reasonably extrapolate that the website is book-related.

2 files formats needed:

  • png
  • ico

Update: please ensure that the favicon is of your own making or it has an appropriate open source license. If there's a license, please let us know so that we can attribute the source.

Use Checkstyle for style guide violations

Automate checking for style guide violations on all incoming pull requests.

Checkstyle should be configured to adhere to our style guide (a modified version of Google's). This should then be able to be executed from Maven (e.g. run checkstyle from Maven).

The work for this branch should be off the travis branch.

Write resolutions document

Write a document explaining the different levels of resolution and how they will carried out.

Branch to merge into: master

Unable to find all books

Describe the bug
Null Pointer Exception in ShelfService.java on the line:

List<Book> books = bookRepository.findAll();

To Reproduce
Steps to reproduce the behaviour:

  1. Go to the ui branch
  2. Uncomment the aforementioned line
  3. See error

Expected behaviour
No Null Pointer Exception. A list of books should be returned.

Additional context
Commit: 5476667
Line: 68
Error message: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0

New book added to all shelves

Describe the bug

When a new book is added using the form, it is added to all shelves, not only the shelf specified in the new book form.

To Reproduce
Steps to reproduce the behaviour:

  1. Enter in book details in the new book form (set the shelf to 'read')
  2. Click on 'Add book'
  3. See error -- the book appears in all of the shelves, not just the 'read' shelf

Expected behaviour

A book should only be added to the shelves specified by the user.

Screenshots

'Stardust' has been added to the 'read' shelf:
new_book

But it also appears in the 'want to read' shelf (as well as the 'currently reading' shelf):
new-book2

Additional context

Branch name: ui
Commit: d3393fa

Add book thumbnail

Let a user add a thumbnail for a book in the BookForm.

This thumbnail should show in the list of books in a given shelf.

Additional requirements:

  • The Vaadin upload component should be used
  • Every thumbnail in the grid should be of the same size (it should be quite small so as to not take up so much room)
  • A user should be informed if the image could not be uploaded
  • Book thumbnails should be stored in the Book entity's database table. For example, the file path to the image could be stored.

All matching author names updated

Describe the bug

If I update the name of a particular author that has multiple books, all occurrences of that author's name will be changed. This is not desirable in the case where two authors have the same name.

To Reproduce
Steps to reproduce the behaviour:

  1. Select the 'to read' shelf from the top dropdown list
  2. Select on Dan Brown's first book
  3. Change his first or surname in the book
  4. Click on update book
  5. See error

Expected behaviour

The name should only change on the row the user selected.

Delete button not working

Describe the bug

The delete button does not delete a book.

To Reproduce
Steps to reproduce the behaviour:

  1. Select a shelf
  2. Select a book in the grid
  3. Click on the delete button in the book form
  4. See error

Expected behaviour

The book should be deleted and the grid should no longer contain the deleted book.

Additional context

Branch: ui
Commit: d3393fa

Branch off master.

Add javadoc comments

  • Add a class summary to all Java source files
  • Add method summaries where necessary (e.g. getters and setters don't require comments generally)

Increase width of form fields

The book title field is not wide enough (see screenshot). This, and the other form fields, should be wider.

narrow_book_form

Branch: ui

Unable to add a book

Describe the bug

A new book cannot be added as the 'add book' button is greyed out.

To Reproduce
Steps to reproduce the behaviour:

  1. Fill in the fields to add a new book (see screenshot)
  2. See error

Expected behaviour

The add book button should not be greyed out and the book should be saved into the repository.

Screenshots

cannot-add-new-book

Additional context

Branch: ui

Please create your branch off ui and submit a PR to merge into it when done.

Export saved books to JSON

A JSON file containing a list of shelves and the books in those shelves (and its corresponding data, such as title, author and date started) should be exported to JSON.

Grid does not bind all of the form fields

Describe the bug

The book form no longer populates all (but the shelf) field when a grid item is selected. Only the title and the author's first name is bound (see screenshot)

To Reproduce
Steps to reproduce the behaviour:

  1. Choose a shelf
  2. Select a grid item
  3. See error

Expected behaviour

The form should get populated with all of the fields as in the grid (apart from the shelf for now).

Screenshots

broken_binding

Additional context

Branch: ui

Add shelf option to new book form

The new book form should have an option that lets the user choose which shelves the book should be in.

This should be a required field.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.