Giter Club home page Giter Club logo

book-library's Introduction

Books registry

Digital accounting of books in the library

Table of content

  1. Business problem
  2. Technologies used in the project
  3. Connecting to the database
  4. Running application

Business problem

The library needs to move to registering books in digital format. Librarians must be able to register readers, check out books, and release books (after the reader returns the book back to the library). It is necessary to implement a web application for this purpose.

Technologies used in the project

  • Java 17
  • Spring Boot 3.2.2
  • Spring Web MVC
  • Spring Data JPA
  • Hibernate
  • PostgreSQL 16
  • Thymeleaf
  • Apache Tomcat

Connecting to the database

  1. Install the DBMS PostgreSQL
  2. Using PG Admin, create a new database and then connect to the DBMS
  3. Execute DDL scripts located in the folder src/main/resources/db/migration

Running application

  1. Upload jar file from latest release
  2. Run the application using below command (don't forget substitute right values instead of variables)
    java -Dspring.datasource.url=jdbc:postgresql://[database_host]:[database_port]/[database_name] \ 
         -Dspring.datasource.username=[database_username] \
         -Dspring.datasource.password=[database_password] \
         -Dspring.application.days_until_book_overdue=[int_value] \
         -jar target/[jar_file_name]
    The application will be launched at localhost:8080

book-library's People

Contributors

saneci avatar

Watchers

 avatar

book-library's Issues

Create a book search page

We enter the initial letters of the book's title in the field on the page, and we get the full title of the book and the name of the author. Also, if the book is currently in someone's possession, we get that person's name.

Move backend unit to new repo

Backend

  • create GitHub repository
  • add Open API contract
  • develop REST API
  • add GitHub Actions: integration tests

Frontend

  • rewrite project using Open API contract created before
  • fix tests

Fix menu in home view

TODO

  1. href Adding a new reader change to people/new
  2. rename view people/registration to people/new

Write the main implementation

Required functionality:

  • 1) Pages for adding, changing and deleting a person.
  • 2) Pages for adding, changing and deleting a book
  • 3) A page with a list of all people (people are clickable - when clicked,
    go to the person's page).
  • 4) A page with a list of all books (books are clickable - when clicked, you go to the book page).
  • 5) A person’s page, which shows the values of his fields and a list of books that he
    took it. If a person has not taken a single book, instead of the list there should be the text “Man
    I haven’t picked up a single book yet.”
  • 6) A book page that shows the values of the fields of this book and the name of the person,
    who took this book. If this book was not taken by anyone, there should be the text "This
    the book is free."
  • 7) On the book page, if the book was taken by a person, there should be a button next to his name
    "Free the book." This button is pressed by the librarian when the reader
    returns this book back to the library. After clicking this button the book is again
    becomes free and disappears from the person’s list of books.
  • 8) On the book page, if the book is free, there should be a drop-down list (<select>)
    with all people and the "Assign book" button. This button is pressed by the librarian
    when the reader wants to take this book home. After clicking this button, the book
    must begin to belong to the selected person and must appear in his list
    books.
  • 9) All fields must be validated - using Valid and Spring Validator, if so
    required.

Don't release the workbook after updating

If you update any field of a book that is in the reader's possession, then it will be released.
It is necessary to ensure that the book remains assigned to the reader.

Add database

Entities:

  • Person (fields: full name (UNIQUE), year of birth)
  • Book (fields: title, author, year)

Description:

  • Relationship between entities: One to Many.
  • A person can have many books. A book can only belong to one person.
  • The database must have two tables - Person and Book. Set up automatic id generation for all tables.

Add sorting books by year

The getAllBooks() method in the BooksController must be able to accept the sort key in the address bar.

  • If it is true, the output should be sorted by year.
  • If this key is not transmitted in the address book, then the books are returned in the usual manner.

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.