# 🧮 Ruby Calculator Pro

> Advanced Interactive Calculator Built with Ruby on Rails 7

[![Ruby](https://img.shields.io/badge/Ruby-3.1.0-red.svg)](https://www.ruby-lang.org/)
[![Rails](https://img.shields.io/badge/Rails-7.0.4-red.svg)](https://rubyonrails.org/)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

## 📋 Overview

Ruby Calculator Pro is a comprehensive web-based calculator application featuring:

- **Basic Calculator**: Standard arithmetic operations with memory functions
- **Scientific Calculator**: Trigonometric functions, logarithms, factorials
- **Graphing Calculator**: Function plotting, derivatives, integrals
- **Unit Converter**: Currency, length, weight, temperature conversions
- **Financial Calculator**: Loan calculations, compound interest
- **Health Calculator**: BMI, BMR, body fat percentage
- **Modern UI**: Responsive design with theme switching

## 🚀 Live Demo

Open `index.html` in your browser to see the project showcase and installation guide.

## 🛠️ Tech Stack

- **Backend**: Ruby on Rails 7.0.4
- **Frontend**: HTML5, CSS3, JavaScript (ES6)
- **Database**: SQLite3
- **Build Tools**: esbuild, Sass
- **UI Framework**: Bootstrap 5
- **JavaScript Libraries**: Turbo, Stimulus

## 📦 Installation

### Prerequisites

- Ruby 3.1.0 or higher
- Node.js 14+ and npm
- SQLite3
- Git

### Quick Setup

```bash
# Clone the repository
git clone https://github.com/rskworld/ruby-calculator.git
cd ruby-calculator

# Install Ruby dependencies
bundle install

# Install JavaScript dependencies
npm install

# Build assets
npm run build
npm run build:css

# Setup database
rails db:create
rails db:migrate

# Start the server
rails server
```

Visit `http://localhost:3000` to access the calculator.

## 📁 Project Structure

```
ruby-calculator/
├── app/
│   ├── controllers/          # Rails controllers
│   ├── models/              # Data models
│   ├── views/               # ERB templates
│   ├── javascript/          # Frontend JavaScript
│   └── assets/              # Stylesheets and assets
├── config/                  # Rails configuration
├── db/                      # Database files and migrations
├── public/                  # Static assets
├── test/                    # Test files
├── Gemfile                  # Ruby dependencies
├── package.json             # Node.js dependencies
├── index.html               # Project showcase page
└── README.md               # This file
```

## 🎯 Key Features

### Calculator Functions
- ✅ Basic arithmetic (+, -, ×, ÷)
- ✅ Scientific functions (sin, cos, tan, log, ln, √)
- ✅ Memory operations (MR, M+, M-, MC)
- ✅ Keyboard shortcuts
- ✅ Calculation history

### Advanced Features
- ✅ Function graphing
- ✅ Currency conversion
- ✅ Unit conversion
- ✅ Financial calculations
- ✅ Health metrics
- ✅ Theme switching

## 🏗️ Development

### Available Scripts

```bash
# Start Rails server
rails server

# Run tests
rails test

# Build JavaScript
npm run build

# Build CSS
npm run build:css

# Watch mode (if configured)
npm run watch
```

### Database

```bash
# Create database
rails db:create

# Run migrations
rails db:migrate

# Seed data (if available)
rails db:seed
```

## 🤝 Contributing

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 👥 Authors

- **Molla Samser** - *Founder & Developer* - [RSK World](https://rskworld.in)
- **Rima Khatun** - *Designer & Tester* - [RSK World](https://rskworld.in)

## 📞 Contact

- **Email**: help@rskworld.in
- **Phone**: +91 93305 39277
- **Website**: [https://rskworld.in](https://rskworld.in)

## 🙏 Acknowledgments

- Ruby on Rails community
- Bootstrap for UI components
- Font Awesome for icons
- All contributors and supporters

---

⭐ **Star this repo** if you found it helpful!
