A modern, interactive formula calculator built with Next.js and TypeScript. This application allows users to build and evaluate mathematical expressions with support for variables, real-time calculation, and an intuitive tag-based interface.
- 🧮 Dynamic formula building with tags
- 🔢 Support for variables and custom values
- ⚡ Real-time calculation and validation
- 💡 Smart autocompletion for operators and variables
- 🎯 Intuitive cursor-based navigation
- 🎨 Modern UI with neumorphic design
- 📱 Fully responsive layout
- Framework: Next.js 14
- Language: TypeScript
- Styling: Tailwind CSS
- State Management: Zustand
- Development: ESLint, Prettier
- Node.js 18.0 or later
- npm or yarn
- Clone the repository:
git clone https://github.com/yourusername/formula-calculator.git
cd formula-calculator- Install dependencies:
npm install
# or
yarn install- Start the development server:
npm run dev
# or
yarn dev- Open http://localhost:3000 in your browser.
-
Adding Numbers and Operators:
- Type numbers directly
- Use +, -, *, / operators
- Press Enter or click to add
-
Working with Variables:
- Set variables using the variable input field
- Format:
variableName = value - Use variables in your formula
-
Navigation:
- Use arrow keys to move between tags
- Backspace to delete tags
- Click to position cursor
-
Calculations:
- Click "Calculate" to evaluate the formula
- Results update in real-time
- "Clear" button to reset
src/
├── app/
│ ├── components/
│ │ └── FormulaInput.tsx
│ ├── store/
│ │ └── formulaStore.ts
│ ├── globals.css
│ ├── layout.tsx
│ └── page.tsx
├── ...
npm run test
# or
yarn testnpm run lint
# or
yarn lintnpm run build
# or
yarn build- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js team for the amazing framework
- Tailwind CSS for the utility-first CSS framework
- Zustand for simple yet powerful state management