Skip to content

Spring MVC Application with Username Password Authentication

Notifications You must be signed in to change notification settings

Yanant27/lost-and-found-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lost & Found System

The system provides CRUD operations (create, read, update and delete data from database), role-based access control (RBAC) and login, logout functionality.

To protect from too many login attempt with incorrect password, account will be locked for more than 3 failed log in.

It will be automatically unlocked after one hour.

Table of Contents

Technologies

  • Front-end
    • Thymeleaf
    • HTML 5
    • CSS 3
    • Bootstrap 5
  • Backend
    • Java 8
    • Spring Web
    • Spring Boot DevTools
    • Spring Data JPA
    • Spring Security
    • Lombok
    • MapStruct
    • H2 Database
    • Validation
    • Maven

Browse the Maven pom.xml file for details of libraries and versions used.

Setup

This application use embedded Tomcat 8. Therefore, no Tomcat or JBoss installation is necessary.

  1. Run in IDE
    • Clone github repository with command git clone https://github.com/Yanant27/lost-and-found-system.git and import project into IDE.
    • Or download .zip file, unzip and import project into IDE.
    • Execute the main method in the e hyk.springframework.lostandfoundsystem.LostAndFoundApplication class from your IDE.
  2. Run with maven
    • You can build the project and run the tests by running mvn clean package.
    • Once successfully built, you can run by one of these two methods.
        java -jar target/lost-and-found-system-0.0.1-SNAPSHOT.jar
        or
        mvn spring-boot:run
    

System Overview

This system is aimed to help people finding their lost properties. If they lost or found something, they can report by using this system. It provides two roles (admin, user) to access the system.

Admin can

  • Manage users – (CRUD – create, read, update, and delete) user detail and information.
  • Manage user roles.
  • Manage lost/found item reports of all users.

User can

  • Create lost/found item reports.
  • Read all lost/found item reports.
  • Edit and delete their own reported items.
  • Edit user information.

System contains validation for all user inputs and all validations are performed in server side.

System Captures

Login

This is an image

Registration

This is an image

Registration Validation

All input items are validated and related error messages are displayed. This is an image This is an image

Admin Home

This is an image

User Home

Side bar menu is different from admin's side bar. There is no "User Management" for user role. This is an image

Profile Detail

This is an image

Profile Update and Validation

This is an image

All Lost/Found Items List for Admin

Admin can operate CRUD operations on all user's reported items. There is three action buttons for all rows. This is an image

All Lost/Found Items List for User

Users can operate edit and delete only on their reported items. Therefore, all action buttons are not shown for all rows. This is an image

Report New Lost/Found Item

Same for both admin and user This is an image All input items are validated and related error messages are displayed. This is an image This is an image

Update Lost/Found Item

Validation is also same with creating item. This is an image

Delete Lost/Found Item

This is an image

User Manangement (Admin Only)

All registered users list This is an image Create Operation This is an image Validation of Create Operation This is an image This is an image Update Operation This is an image Delete Operation This is an image

Access Denied

Although UI components are restricted using Thymeleaf spring security dialect, user might enter URL and try to access unauthorized page. For example, user don't have the right to modify or delete other user's reported items but try to perform that operation from URL. This is an image

Bad Request

For malformed request syntax, customized bad request page will be displayed. This is an image

Resource Not Found

For not existed resource, customized resource not found page will be displayed. For example, user searched all items and look details of one item without refreshing the page and that item was accidently deleted from database. This is an image

Account Lock

If user attempts to log in with incorrect password more than 3 times, account will be locked for 1 hour. This is an image

Ideas for Enhancement

  1. Integrate with Google Maps to show the lost/found location.
  2. Add images of lost/found items.
  3. Add comments on lost/found posts.
  4. Add role management.
  5. Add forget password functionality.