Interactive Calculator is an innovative web application that enables users to draw complex equations, problems, or diagrams on a canvas and receive real-time solutions using the power of AI. This project leverages ReactJS and Tailwind CSS on the frontend and Python for backend processing, with integration of Gemini AI for deep analysis and solution generation.
- Hand-drawn Problem Recognition: Users can draw equations or diagrams, and the AI will interpret the content.
- AI-powered Solutions: Utilizes Gemini AI to process and solve complex math problems, diagrams, and equations.
- Responsive & Modern UI: Built with ReactJS and Tailwind CSS, offering an intuitive and responsive interface.
- Optimized Request Processing: A well-structured file system in the backend ensures efficient handling of multiple requests with reduced load on each request cycle.
- Frontend: ReactJS, Tailwind CSS
- Backend: Python, Gemini AI Integration
- Other Tools: Canvas for user-drawn input
These instructions will help you set up and run the project on your local machine for development and testing purposes.
- Node.js (v14 or higher)
- Python (v3.8 or higher)
- Gemini AI API Key (required for backend integration)
git clone https://github.com/yourusername/interactive-calculator.git
cd interactive-calculator
Navigate to the frontend
directory and install dependencies.
cd frontend
npm install
Navigate to the backend
directory, set up a virtual environment, and install dependencies.
cd backend
python -m venv venv
source venv/bin/activate # For Windows use `venv\Scripts\activate`
pip install -r requirements.txt
Add your Gemini API key to the environment file:
echo "GEMINI_API_KEY=your_api_key_here" > .env
Frontend: In the frontend directory, start the React app.
npm start
Backend: In the backend directory, run the Python server.
python app.py
The application should now be running at http://localhost:3000
with the backend server handling requests.
- Draw your equation, problem, or diagram on the canvas.
- Submit the drawing, and the AI backend will analyze it using Gemini AI.
- Receive the solution or suggested answer directly on the screen.
The project is divided into two main directories: frontend
and backend
.
interactive-calculator/
├── frontend/ # ReactJS + Tailwind CSS frontend
│ ├── public/
│ └── src/
│ ├── components/ # Reusable UI components
│ ├── hooks/ # Custom hooks for state management
│ └── utils/ # Helper functions and utilities
│
└── backend/ # Python backend
├── api/ # API routes and controllers
├── models/ # Data models and Gemini AI integration
└── utils/ # Helper functions
This structure maintains modularity and reduces the load on each request cycle, ensuring a scalable, efficient architecture.
- Code Consistency: Consistent code style throughout frontend and backend files.
- Optimized File Structure: Maintains separation of concerns for clear readability and maintainability.
- Error Handling: Comprehensive error handling for seamless user experience.
- Security: Sensitive information like the Gemini API key is stored in environment variables.
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create your branch:
git checkout -b feature/YourFeature
. - Commit your changes:
git commit -am 'Add new feature'
. - Push to the branch:
git push origin feature/YourFeature
. - Open a Pull Request.
For questions or support, please contact Ayesha Ashfaq
.