Skip to content

About

A modern React-powered smart calculator featuring premium glassmorphism UI, scientific calculations, interactive animations, keyboard shortcuts and responsive design.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🧮 SmartCalc Pro

A Modern Glassmorphism Smart Calculator

Calculate smarter. Experience better.


React Tailwind CSS Vite JavaScript Glassmorphism UI Responsive Design



SmartCalc Pro Preview


📖 Overview

SmartCalc Pro is a modern, high-performance calculator application crafted with React and Tailwind CSS. It combines a frosted dark glassmorphic design system with a mathematically safe calculation engine. Featuring floating ambient gradient orbs, Dijkstra's Shunting-Yard algorithm for token evaluation, persistent calculation history, audio synthesis via the Web Audio API, and keyboard navigation, SmartCalc Pro provides an exceptional user experience on mobile, tablet, and desktop viewports.


✨ Features

✨ Premium Glassmorphism UI

Multi-layered frosted glass chassis with realistic backdrop-blur, specular top-edge highlight reflections, and deep ambient shadows.

🌌 Animated Gradient Background

Four organic GPU-accelerated floating gradient orbs in electric cyan, royal purple, and deep blue combined with an ambient dot-matrix grid overlay.

🔢 Full Arithmetic Suite

Robust support for standard arithmetic operations: addition (+), subtraction (−), multiplication (×), division (÷), percentage/modulo (%), and sign toggling (±).

🔬 Scientific Operations

Dedicated scientific calculation bar featuring square (x²), square root (√), reciprocal (1/x), and high-precision Pi (π) constant injection.

📜 Persistent Calculation History

Slide-in glassmorphic drawer storing up to 50 historical calculations in LocalStorage with one-click expression recall and history clearing.

🧠 Memory Operations (M)

Full memory workflow support: Clear (MC), Recall (MR), Add (M+), and Subtract (M−) with a live visual badge indicator when memory contains data.

⌨️ Full Keyboard Navigation

Physical keyboard mappings for every operation, operator, and hotkey with synchronized ripple animations and visual keypress feedback.

🌓 Dual Glass Themes

Seamless toggle between Deep Navy Dark Glass and Crisp Light Glass themes with instantaneous color transition and LocalStorage state saving.

🔊 Web Audio Synthesizer

Synthesized harmonic audio clicks on keypress generated natively using the Web Audio API without external audio files, with toggle control.

📋 One-Click Copy Result

Instant clipboard copy button for active expressions and computed results with glassmorphic animated toast confirmations.

📱 Fluid Responsive Design

Mobile-first responsive architecture utilizing dynamic viewport units (dvh), ensuring perfect scaling from 320px mobile screens to large desktop displays.

🛡️ Safe Mathematical Parser

Custom tokenization, Dijkstra's Shunting-Yard algorithm, and RPN evaluator. Zero eval() calls, eliminating security vulnerabilities and solving floating-point precision issues.


🛠️ Technology Stack

Category Technology Version Description
Framework React ^18.3.1 Core UI library & reactive component state management
DOM Renderer React DOM ^18.3.1 React rendering engine for document object model
Icons Lucide React ^0.469.0 Sleek, customizable modern icons
Styling Tailwind CSS ^3.4.17 Utility-first CSS framework for modern styling
PostCSS PostCSS ^8.4.49 Tool for transforming CSS with JavaScript
CSS Vendor Autoprefixer ^10.4.20 PostCSS plugin to parse CSS and add vendor prefixes
Build Tool Vite ^6.0.7 Next-generation frontend build tooling & HMR
Vite Plugin @vitejs/plugin-react ^4.3.4 Fast Refresh and JSX support for React in Vite

📁 Project Structure

SmartCalc-Pro/
│
├── assets/
│   └── smartcalc-preview.png
│
├── public/
│   └── favicon.svg
│
├── src/
│   ├── assets/
│   │   └── .gitkeep
│   │
│   ├── components/
│   │   ├── Background.jsx
│   │   ├── Calculator.jsx
│   │   ├── CalculatorButton.jsx
│   │   ├── CalculatorDisplay.jsx
│   │   ├── CalculatorHeader.jsx
│   │   ├── Footer.jsx
│   │   ├── HistoryItem.jsx
│   │   ├── HistoryPanel.jsx
│   │   ├── Keypad.jsx
│   │   ├── MemoryBar.jsx
│   │   ├── ScientificBar.jsx
│   │   ├── ShortcutsModal.jsx
│   │   ├── ThemeToggle.jsx
│   │   └── Toast.jsx
│   │
│   ├── constants/
│   │   └── calculatorConstants.js
│   │
│   ├── hooks/
│   │   ├── useCalculator.js
│   │   ├── useClock.js
│   │   ├── useHistory.js
│   │   ├── useKeyboard.js
│   │   ├── useSound.js
│   │   └── useTheme.js
│   │
│   ├── utils/
│   │   ├── calculatorEngine.js
│   │   ├── expressionParser.js
│   │   ├── numberFormatter.js
│   │   └── storage.js
│   │
│   ├── App.jsx
│   ├── index.css
│   └── main.jsx
│
├── .gitignore
├── index.html
├── package.json
├── package-lock.json
├── postcss.config.js
├── tailwind.config.js
├── vite.config.js
└── README.md

🚀 Installation & Getting Started

Prerequisites

  • Node.js (version 18.x or higher recommended)
  • npm (version 9.x or higher)

1. Clone the repository

git clone https://github.com/berasayan02/SmartCalc-Pro.git

2. Navigate to project folder

cd SmartCalc-Pro

3. Install dependencies

npm install

4. Start the development server

npm run dev

5. Build for production

npm run build

6. Preview production build

npm run preview

⌨️ Keyboard Shortcuts

SmartCalc Pro provides full physical keyboard support with visual keypress synchronization:

Action / Description Shortcut Key Keypad Equivalent
Number Inputs 0 – 9 0 through 9, 00
Basic Operators +, -, *, / +, −, ×, ÷
Calculate Result Enter or = =
Delete Last Entry Backspace DEL
Clear All / Reset Escape or C AC
Parentheses ( and ) (, )
Percentage / Modulo % %
Pi Constant P π
Square ^ x²
Toggle History Drawer H Clock icon button
Toggle Theme T Sun / Moon button
Toggle Sound Feedback S Speaker icon button
Memory Recall M MR
Memory Add Shift + M M+
Shortcuts Modal ? Keyboard icon button

👨‍💻 Developer & Credits

Made with ❤️ by Sayan Bera
FROM TECHNO SB


📄 License

No license has been specified yet for this repository. All rights are reserved by the original author. For licensing inquiries or reuse permissions, please reach out to the repository maintainer.

About

A modern React-powered smart calculator featuring premium glassmorphism UI, scientific calculations, interactive animations, keyboard shortcuts and responsive design.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages