A responsive, full stack calculator application built with Spring Boot (Java backend) and React + Vite + Tailwind CSS (frontend). This calculator supports basic arithmetic operations: addition, subtraction, multiplication, and division.
| Operation | Output |
|---|---|
| ➕ Add | ![]() |
| ➖ Subtract | ![]() |
| ✖ Multiply | ![]() |
| ➗ Divide | ![]() |
- Java 24
- Spring Boot
- REST Controller (
@RestController) - CORS enabled for frontend requests
- React
- Tailwind CSS
- Vite
- Axios (for API calls)
FullStackCalculator/
├── backend/ # Spring Boot backend
│ └── src/
│ └── com.example.calculator/
│ ├── controller/CalculatorController.java
│ └── model/OperationRequest.java
├── frontend-calculator/ # React frontend
│ ├── src/
│ │ ├── App.jsx
│ │ ├── index.css
│ ├── tailwind.config.js
│ └── vite.config.js
├── images/ # Screenshots of output
│ ├── Addition.png
│ ├── Subtraction.png
│ ├── Multiplication.png
│ └── Division.png
---
Ensure you have Java and Maven installed.
cd backend
mvn spring-boot:runThe backend will run on: 📍 http://localhost:8080/api/calculator
cd frontend-calculator
npm install
npm run devFrontend runs on: 📍 http://localhost:5173
##📡 API Endpoint
POST /api/calculator/calculate
| In Postman |
|
🔐 CORS Configuration
The backend allows requests from the frontend using: @CrossOrigin(origins = "http://localhost:5173")
💻 Author Developed by Madhuchhanda Das aka latenightcoder-git as part of a full-stack project with Spring Boot and React.



