Spring MVC Calculator is a web application built using Spring Framework for basic arithmetic calculations.
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.
- User authentication and authorization
- Perform basic arithmetic calculations
- User-specific calculations history
- CRUD operations on calculations (admin only)
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:
- Clone this repository to your local machine.
- Navigate to the project directory.
- Start your database program and ensure it's running.
- Once your database program is running, proceed to start the application.
- Once the application is running, open a web browser and go to http://localhost:8080.
- Register or login to your account.
- Use the calculator interface to perform arithmetic calculations.
- View your calculation history.
- Administrators can manage calculations (view, update, delete) of all users.
- 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.
- Java
- Spring Boot 3
- Spring Security 6
- Spring Data JPA
- Hibernate
- MySQL
- Thymeleaf
- HTML/CSS
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.