Skip to content

Technology-Development/library-management-system-angular-springboot-mysqldb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Library Management System

Spring Boot Angular MySQL Hibernate Maven Bootstrap

A full stack application using Spring Boot, Angular and MySQL.

  • This is a Library Management System with an Admin and a User side for the application.
  • Admin can perform CRUD with books/users.
  • User can borrow and return a book.
  • Uses JWT to authenticate login.
  • Uses BCryptPasswordEncoder to encrypt the password stored in the database.
  • Redirects to forbidden page if a role doesn't have access to the url.

APIs

Authenticate

  • Post Mapping to return JWT.
{
    username: "user",
    password: "password"
}

Book

  • Get Mapping to find all books in the database.
  • Get Mapping to find book by id provided.
  • Post Mapping to create book.
{
    "bookName": "Book Name",
    "bookAuthor": "Author Name",
    "bookGenre": "Genre",
    "noOfCopies": 5
}
  • Put Mapping to edit book.
{
    "bookName": "New Book Name",
    "bookAuthor": "Author Name",
    "bookGenre": "Genre",
    "noOfCopies": 7
}
  • Delete Mapping to delete a book.

User

  • Get Mapping to find all users in the database.
  • Get Mapping to find user by id provided.
  • Post Mapping to create user.
{
    "username": "user",
    "name": "First User",
    "password": "password",
    "role": [
        {
            "roleName": "Admin"
        }
    ]
}
  • Put Mapping to edit user.
{
    "username": "user",
    "name": "New First User",
    "password": "password",
    "role": [
        {
            "roleName": "User"
        }
    ]
}

Borrow

  • Get Mapping to find all transactions taken place.
  • Get Mapping to find list of books borrowed by a user.
  • Get Mapping to find list of users who have borrowed a particular book.
  • Post Mapping to borrow a book.
{
    "bookId": 3,
    "userId": 5
}
  • Post Mapping to return a book.
{
    "borrowId": 1
}

Screenshots

Home & Login

Home

Home Page

Login

Login Page

Admin

All books present

Book List Page

Adding a book

Add Book Page

Updating book details

Update Book Page

Borrow history of a book

Book Details Page

All users present

User List Page

Adding a user

Add User  Page

Borrow history to the user

User Details Page

User

Borrow book

Borrow Book

Return book

Return Book

Forbidden

Forbidden


Application Properties

server.port = yourPreferredPortNumber

spring.datasource.url = jdbc:mysql://localhost:3306/yourSchemaName
spring.datasource.username = yourUsername
spring.datasource.password = yourPassword

Development

  • Frontend
npm install
  • Backend
mvn install

Build

  • Frontend
ng serve
  • Backend
mvn spring-boot:run

About

Full stack application using Spring Boot, Angular and MySQL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 49.1%
  • Java 33.8%
  • HTML 15.2%
  • JavaScript 1.6%
  • CSS 0.3%