یک ماشین حساب ساده و مدرن ساخته شده با React و Zustand برای مدیریت حالت (state management).
- عملیاتهای اصلی ریاضی: جمع، تفریق، ضرب، تقسیم
- طراحی واکنشگرا (Responsive) برای تمام دستگاهها
- پشتیبانی از اعداد اعشاری
- قابلیت پاک کردن ورودیها (Clear)
- حذف آخرین رقم (Delete)
- تاریخچه عملیاتها
- مدیریت حالت با Zustand
- پشتیبانی از تم تاریک و روشن (به زودی)
- طراحی مدرن و زیبا
- Node.js (ورژن 14 یا بالاتر)
- npm یا yarn
- ریپازیتوری را کلون کنید:
git clone https://github.com/your-username/react-zustand-calculator.git
cd react-zustand-calculator- وابستگیها را نصب کنید:
npm install
# یا
yarn install- برنامه را اجرا کنید:
npm run dev
# یا
yarn run dev- مرورگر خود را باز کنید و به آدرس زیر بروید:
http://localhost:3050
- React 19 - کتابخانه
- Zustand 5 - مدیریت حالت
- Vite - بیلدر و دولوپمنت سرور
src/
├── store/
│ ├── calculate/
| | ├──calculate.store.js
| | ├──calculate.state.js
| | └──calculate.action.js
| └── theme/
| | ├──theme.store.js
| | ├──theme.state.js
| | └──theme.action.js
├── styles/
│ └── index.css
├── utils/
| ├── keysArray.js
| └── storeSelector.js
├── App.jsx
└── main.jsx
- اعداد را با کلیک روی دکمههای مربوطه وارد کنید
- عملگر ریاضی مورد نظر را انتخاب کنید
- عدد دوم را وارد کنید
- دکمه مساوی (=) را فشار دهید
- نتیجه محاسبه در صفحه نمایش داده میشود
- CE: پاک کردن تمام محاسبات
- DEL: حذف آخرین رقم
- ±: تغییر علامت عدد (در دسترس نیست)
- %: محاسبه درصد (در دسترس نیست)
برای اجرای تستها:
npm test
# یا
yarn testnpm run build
# یا
yarn build- پروژه را فورک (Fork) کنید
- برنچ (Branch) جدید ایجاد کنید (
git checkout -b feature/amazing-feature) - تغییرات را کامیت کنید (
git commit -m 'Add amazing feature') - به برنچ اصلی پوش (Push) کنید (
git push origin feature/amazing-feature) - پول ریکوئست (Pull Request) باز کنید
این پروژه تحت لایسنس MIT منتشر شده است. برای اطلاعات بیشتر فایل LICENSE را مطالعه کنید.
از شما برای استفاده از این پروژه متشکریم! اگر سوال یا پیشنهادی دارید، لطفاً یک Issue ایجاد کنید.
A simple and modern calculator built with React and Zustand for state management.
- Basic mathematical operations: addition, subtraction, multiplication, division
- Responsive design for all devices
- Support for decimal numbers
- Clear input functionality
- Delete last digit
- Operation history
- State management with Zustand
- Dark/Light theme support
- Modern and beautiful design
- Node.js (version 14 or higher)
- npm or yarn
- Clone the repository:
git clone https://github.com/your-username/react-zustand-calculator.git
cd react-zustand-calculator- Install dependencies:
npm install
# or
yarn install- Run the application:
npm run dev
# or
yarn run dev- Open your browser and navigate to:
http://localhost:3050
- React 19 - Library
- Zustand 5 - State Management
- Vite - Builder & Dev Server
src/
├── store/
│ ├── calculate/
| | ├──calculate.store.js
| | ├──calculate.state.js
| | └──calculate.action.js
| └── theme/
| | ├──theme.store.js
| | ├──theme.state.js
| | └──theme.action.js
├── styles/
│ └── index.css
├── utils/
| ├── keysArray.js
| └── storeSelector.js
├── App.jsx
└── main.jsx
- Enter numbers by clicking the corresponding buttons
- Select the desired mathematical operator
- Enter the second number
- Press the equals (=) button
- The calculation result will be displayed
- C: Clear all calculations
- DEL: Delete last digit
- ±: Change sign (Not available)
- %: Percentage calculation (Not available)
To run tests:
npm test
# or
yarn testnpm run build
# or
yarn build- Fork the Project
- Create your Feature Branch (
git checkout -b feature/amazing-feature) - Commit your Changes (
git commit -m 'Add amazing feature') - Push to the Branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Thank you for using this project! If you have any questions or suggestions, please open an Issue.
Version 0.1.0
