Skip to content

EgidijusJakimovas/spring-mvc-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring MVC Calculator

Spring MVC Calculator is a web application built using Spring Framework for basic arithmetic calculations.

Table of Contents:

Introduction:

Spring MVC Calculator is a web application built using Spring Boot for basic arithmetic calculations. This project implements a simple calculator application using Spring MVC architecture. It allows users to perform arithmetic operations such as addition, subtraction, multiplication, and division. Additionally, the application incorporates robust validation features to enhance user experience and security. These validations include:

  • Arithmetic Operations: Users can perform various arithmetic operations, including addition, subtraction, multiplication, and division.
  • User Authentication: The application enforces validation for login credentials, providing feedback for incorrect username or password entries.
  • Registration Validation: During registration, the system validates input data, including username uniqueness, email uniqueness, and email format.
  • Password Validation: The registration process includes password validation to ensure security, such as enforcing minimum length requirements and complexity rules.
  • Negative Number Handling: The calculator includes validation to handle negative numbers, ensuring accurate and secure arithmetic calculations.

Features:

  • User authentication and authorization
  • Perform basic arithmetic calculations
  • User-specific calculations history
  • CRUD operations on calculations (admin only)

Setup:

To run this project locally, make sure you have Java, Maven, and a database program (such as XAMPP) installed on your system. Follow these steps:

  1. Clone this repository to your local machine.
  2. Navigate to the project directory.
  3. Start your database program and ensure it's running.
  4. Once your database program is running, proceed to start the application.
  5. Once the application is running, open a web browser and go to http://localhost:8080.

Usage:

  1. Register or login to your account.
  2. Use the calculator interface to perform arithmetic calculations.
  3. View your calculation history.
  4. Administrators can manage calculations (view, update, delete) of all users.
  5. Administrators can view all registered users.

IMPORTANT: Default new registered user role is USER. If you want to change the role to ADMIN (for more experiences like CRUD operations on calculator records or to see registered users), you have to change the ENUM ROLE radio button in the database.

Technologies Used:

  • Java
  • Spring Boot 3
  • Spring Security 6
  • Spring Data JPA
  • Hibernate
  • MySQL
  • Thymeleaf
  • HTML/CSS

Contributing:

Contributions are welcome! If you find any bugs or have suggestions for improvement, please feel free to open an issue or submit a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published