Code Monkey home page Code Monkey logo

library-spring's Introduction

Library Portal (in Spring)

Spring MVC web application for borrowing and managing library books inventory.

Description

This is my first Spring MVC project, which is an implementation of the library website. The application allow to borrow books (as a standard user), manage books inventory (add new ones, check availablity, etc.) and user account.

In Library Portal there are three types of users:

  • Readers - they can register themselves and borrow limited number of books.
  • Librarian - limited number of users that can add new books, borrow and return them. They can also confirm payments for penalties in case when a reader keeps a book to long.
  • Admin - person, who can add, edit and deactivate users.

Tools & Frameworks

The application is written using Spring MVC framework and Gradle (for external dependency managment).

Database & configuration

  • MySQL
  • Flyway (for data migration)
  • Gradle
  • Tomcat
  • Git
  • Google Book API

Backend technologies

  • Java
  • Spring MVC, Spring AOP, Spring Security
  • Hibernate ORM, Hibernate Validator, Hibenrate Search (Lucene)
  • Retrofit, JSON
  • JUnit
  • Project Lombok
  • Log4j2

Frontend technologies

  • HTML, CSS, JavaScript
  • JSP, JSTL
  • Bootstrap 4

How to run it?

Prerequisites: Eclipse IDE (with Gradle and Tomcat plugin installed), Tomcat, MySQL Community Edition

  1. Clone this git repository

$ git clone https://github.com/wkrzywiec/Library-Spring

  1. Open MySQL Workbench and type following SQL script:
	CREATE USER 'library-spring'@'localhost' IDENTIFIED BY 'library-spring';
	GRANT ALL PRIVILEGES ON  *.* TO 'library-spring'@'localhost';
	SET GLOBAL EVENT_SCHEDULER = ON;
  1. Go to a folder src/main/resources/properties, create googleAPI.properties file and add your Google API key (here are instructions how to obtain it) as follows:

googleAPI.key=[YOUR KEY HERE]

  1. Run tomcatRun Gradle task (or assign it to the Run button in Eclipse)

  2. The application will avaialble under URL http://localhost:8080/library-spring

Blog Posts

During work on this project I've parallely created some blog posts that describe my path to the working application. In those entires I've tried to explain some of key concepts, tools and frameworks that I used. Here is the list of all entries that was written so far:

Library Portal — Spring Project Overview

General

Configurations

Clean code

Features

User Log Events
Full-text Search
User registration
Add book to library

Deployment

Database Diagram

Big picture on the database relationships. Database

Detailed look on user entity relationships.Some of them, like user_password_toke are specific for Spring Security Forgot password feature.

User database

And book entity relationships.

User database

Finally user-book relationships, those tables stores book status information (like if it is reserved, borrowed, has penalties) or logs.

User-Book database

Screenshots

Login page

Main page, after login. The quote is taken from Random Quote API.

Admin can find and modify user profiles. Also there are possibility for him to see the logs of the user to check what changes were made on the user account.

Librarian can add new books to the library. New book data are fetched from Google Book API when search query is performed.

Every, regular user can register themself in the application.

After registration they can look for a book they want, see their details, and reserve it.

The librarian can borrow and return books. Also he can check book history to get the insight who and when make any action on a book.

library-spring's People

Contributors

wkrzywiec 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

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.