Skip to content

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

Smart Calculator - AI Powered

A sophisticated web-based calculator that uses handwriting recognition powered by Google's Gemini AI to solve mathematical expressions.

image

Features

  • ✍️ Handwriting Recognition: Draw mathematical expressions directly on the canvas
  • 🤖 AI-Powered: Uses Google's Gemini AI for accurate interpretation and calculation
  • 🎨 Rich Drawing Tools:
    • Multiple color options
    • Adjustable stroke width
    • Eraser tool
    • Undo/Redo functionality
  • 💾 Save & Share: Export your calculations as PNG images
  • ⌨️ Keyboard Shortcuts:
    • Ctrl/Cmd + Z: Undo
    • Ctrl/Cmd + Y or Ctrl/Cmd + Shift + Z: Redo
    • E: Toggle eraser mode
    • Delete/Backspace: Clear canvas
  • 📱 Responsive Design: Works on desktop, tablet, and mobile devices
  • 🎯 Touch Optimized: Enhanced support for touch devices and stylus input

Live Demo

Try it out: Smart Calculator Demo

Usage Guide

  1. Drawing Expression:

    • Use the canvas to draw your mathematical expression
    • Select colors from the palette
    • Adjust stroke width using the slider
    • Use eraser tool for corrections
  2. Calculating:

    • Click the "Calculate" button
    • Wait for AI analysis
    • View the solution in the results panel
  3. Additional Tools:

    • Use Undo/Redo for drawing corrections
    • Clear canvas to start over
    • Save calculations as images
    • Reset all settings if needed

Technical Details

Technology Stack

  • HTML5 Canvas for drawing
  • Vanilla JavaScript for functionality
  • CSS3 for styling and animations
  • Google Gemini AI API for handwriting recognition

Key Components

  • SmartCalculator class: Main application logic
  • Canvas management system
  • History tracking for undo/redo
  • Touch and pointer event handling
  • Responsive design system

Browser Support

  • Chrome (recommended)
  • Firefox
  • Brave
  • Safari
  • Edge
  • Opera

Security Considerations

  • API key should be kept private
  • Production deployments should use environment variables
  • Implement rate limiting for API calls
  • Consider adding user authentication for production use

Author

Ajit Kumar

Acknowledgments

  • Google Gemini AI for the handwriting recognition API
  • Contributors and testers who helped improve the application
  • Open source community for inspiration and resources

Support

For support, please:

  • Open an issue in the GitHub repository
  • Contact the developer via GitHub
  • Check the Wiki for additional documentation

Made with ❤️ by Ajit Kumar

Releases

Packages

Contributors

Languages