Skip to content
itzPardhivPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

CalcForge — Premium Calculator Web Application

SkillCraft React Vite JavaScript CSS3

A premium Loki-inspired calculator web application built with React, Vite, JavaScript, and modern responsive UI design.


Overview

CalcForge is a fully functional calculator web application built as part of SkillCraft Technology Web Development Internship — Task 02.

The project focuses on implementing calculator logic using JavaScript and React while maintaining a clean, professional, and visually premium user interface. The calculator supports arithmetic operations, decimal input, keyboard controls, error handling, clear/delete actions, and responsive design.

Instead of building a basic calculator, CalcForge is designed with a cinematic dark green-gold Loki Season 1 inspired interface, featuring glassmorphism, animated backgrounds, glowing buttons, smooth motion effects, and a polished modern layout.


Internship Details

Field Details
Internship SkillCraft Technology
Track Web Development
Track Code WD
Task Number Task 02
Task Name Calculator Web Application
Repository Name SCT_WD_2
Intern ID SCT/MAY26/6745
Project Name CalcForge

Project Objective

The objective of this task was to build a calculator web application that demonstrates:

  • DOM manipulation
  • Event handling
  • Input parsing
  • Equal button calculation
  • Error handling
  • Keyboard input handling
  • Responsive frontend design

CalcForge fulfills these requirements through a React-based calculator interface with real-time expression updates and smooth user interactions.


Features

Basic Arithmetic Operations

CalcForge supports standard calculator operations:

  • Addition
  • Subtraction
  • Multiplication
  • Division
  • Percentage
  • Decimal calculations

Interactive Button Controls

Each calculator button is connected to application logic using React event handlers.

The interface includes:

  • Number buttons
  • Operator buttons
  • Decimal button
  • Clear all button
  • Delete button
  • Equal button

Keyboard Input Support

The calculator can also be controlled directly from the keyboard.

Key Action
0-9 Enter numbers
+ Addition
- Subtraction
* Multiplication
/ Division
% Percentage
. Decimal input
Enter or = Calculate result
Backspace Delete last input
Escape or Delete Clear calculator

Error Handling

The application handles invalid calculations safely.

Examples of handled cases:

  • Invalid expressions
  • Division errors
  • Empty calculations
  • Repeated operators
  • Unsafe input patterns

If an invalid calculation occurs, the calculator displays an error state instead of breaking the application.


Premium User Interface

CalcForge uses a premium visual style inspired by cinematic dark green-gold UI design.

UI highlights include:

  • Dark glassmorphism calculator panel
  • Animated green-gold background glow
  • Premium gradient heading
  • Floating 3D calculator card
  • Shiny button hover effects
  • Smooth press animations
  • Glowing equal button
  • Responsive layout
  • Timeline-style visual atmosphere

Tech Stack

Technology Purpose
React Component-based frontend development
Vite Fast development and build setup
JavaScript Calculator logic and event handling
CSS3 Styling, layout, responsiveness, animations
Lucide React Icons used in the interface

Folder Structure

SCT_WD_2/
│
├── node_modules/
├── src/
│   ├── components/
│   ├── App.jsx
│   ├── index.css
│   └── main.jsx
│
├── index.html
├── package.json
├── package-lock.json
└── README.md

How to Run the Project Locally

1. Clone the Repository

git clone https://github.com/itzPardhiv/SCT_WD_2.git

2. Open the Project Folder

cd SCT_WD_2

3. Install Dependencies

npm install

4. Start the Development Server

npm run dev

5. Open in Browser

After running the project, open the local development URL shown in the terminal.

Usually it will be:

http://localhost:5173/

Available Scripts

Command Description
npm install Installs project dependencies
npm run dev Starts the local development server
npm run build Builds the project for production
npm run preview Previews the production build locally

Calculator Logic

The calculator maintains the current expression using React state.

Core logic includes:

  • Updating expression when buttons are clicked
  • Formatting display symbols such as ×, ÷, and −
  • Preventing invalid decimal usage
  • Replacing repeated operators
  • Evaluating expressions safely
  • Displaying calculation history
  • Clearing or deleting input
  • Handling keyboard events

Task Requirements Checklist

Requirement Status
Fully functional calculator Completed
DOM manipulation / dynamic UI updates Completed
Event listeners on buttons Completed
Equal button calculation Completed
Input parsing Completed
Error handling Completed
Keyboard input handling Completed
Clear and delete functionality Completed
Responsive design Completed
Professional UI design Completed

UI Sections

Hero Section

Introduces CalcForge as a premium calculator web application with a modern dark interface and project feature tags.

Calculator Section

Contains the actual working calculator with display, history, buttons, keyboard support, and calculation logic.

Feature Section

Highlights the main technical features such as keyboard control, error handling, and interactive logic.


Learning Outcomes

Through this task, I practiced:

  • Building a React application using Vite
  • Managing calculator input using React state
  • Handling button click events
  • Handling keyboard events
  • Parsing and evaluating arithmetic expressions
  • Creating reusable UI components
  • Implementing error handling
  • Designing a responsive frontend layout
  • Creating premium UI animations using CSS
  • Improving user experience with smooth interactions

Recommended Repository Description

Premium Loki-inspired calculator web application built with React, Vite, JavaScript, and responsive UI design for SkillCraft WD Task 02.

Recommended GitHub Topics

react
vite
javascript
calculator
web-development
frontend
responsive-design
css
skillcraft-technology
internship-task
sct-wd-2

Future Improvements

Possible future upgrades include:

  • Scientific calculator mode
  • Calculation history panel with delete option
  • Theme switcher
  • Sound effects for key presses
  • Copy result button
  • Memory functions
  • Unit conversion mode
  • Currency conversion mode
  • Advanced keyboard shortcuts

Author

A. J. Pardhiv Web Development Intern SkillCraft Technology Intern ID: SCT/MAY26/6745


Acknowledgement

This project was developed as part of SkillCraft Technology Web Development Internship Task 02.

The task helped me strengthen my understanding of React state management, event handling, keyboard interaction, input validation, error handling, and responsive frontend design.


License

This project is created for educational and internship submission purposes.

CalcForge — Calculate Accurate. Build Cleaner. Ship Professionally.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages