Developed by Rashedul Albab
A powerful, AI-driven multimodal reasoning engine designed to break language barriers in STEM education. Whether it's a handwritten calculus problem, a physics circuit diagram, or a chemical equation, this app provides instant, step-by-step solutions in over 100 languages (including Bengali, Hindi, English, etc.).
- ๐ 100+ Language Support: Explain complex concepts in your native language (Bengali, Hindi, Spanish, Arabic, etc.).
- ๐ฌ Multi-Subject Mastery:
- Mathematics: Algebra, Calculus, Geometry, Statistics.
- Physics: Mechanics, Thermodynamics, Electromagnetism, Quantum Physics.
- Chemistry: Stoichiometry, Organic Chemistry, Balancing Equations.
- ๐ธ AI Image Solver (OCR): Simply upload a photo or PDF of your homework/diagram, and the AI will analyze and solve it.
- ๐ข Step-by-Step Solutions: Don't just get the answer; understand the process with detailed walkthroughs.
- ๐ก "Explain Like I'm 5" Mode: If the solution is too complex, one click gives you a simplified, easier-to-understand explanation focusing on core concepts.
- ๐จ Premium UI: A modern, responsive interface built with Tailwind CSS, featuring glassmorphism and smooth animations.
- Frontend: HTML5, Vanilla JavaScript, Tailwind CSS
- Backend API: FastAPI (Python)
- AI Engine: Google Gemini 2.5 Flash
- Cloud Platform: Docker Hub & GitHub Actions
- Monitoring: Google Analytics
The project is organized into a clear Backend/Frontend separation:
.
โโโ backend/ # FastAPI Backend
โ โโโ main.py # Server logic & Gemini integration
โ โโโ requirements.txt # Python dependencies
โ โโโ .env # Gemini API Key (keep secure!)
โโโ frontend/ # Plain HTML/CSS/JS Frontend
โ โโโ index.html # Structure
โ โโโ style.css # Styling
โ โโโ script.js # Frontend logic
โโโ Dockerfile # Docker image definition
โโโ docker-compose.yml # Local orchestration
โโโ .github/workflows/ # CI/CD Pipeline
Local Development:
- Navigate to the backend directory:
cd backend - Install dependencies:
pip install -r requirements.txt - Add your Gemini API Key to
.env - Run the server:
python main.py
Frontend:
- Open
frontend/index.htmlin your browser. - Ensure the
API_BASE_URLinscript.jsmatches your backend URL.
- Build the image:
docker build -t rashedulalbab1234/global-math-solver:latest . - Run with Docker Compose:
Note: Ensure your
docker-compose up -d
.envfile is inbackend/as it will be loaded by the container.
- Create an Account: Go to huggingface.co and sign up.
- Create a New Space:
- Click your profile picture -> New Space.
- Name:
global-stem-solver(or similar). - License: MIT.
- SDK: Select Docker.
- Template: Select Blank.
- Upload Files:
- Upload
Dockerfile,backend/,frontend/,requirements.txtvia web interface or git.
- Upload
- Add Secret:
- Go to Settings -> Variables and secrets.
- New Secret -> Name:
GEMINI_API_KEY, Value:(Your Key).
- Done! Your app will build and launch automatically.
- Push your code to a GitHub repository.
- Log in to Render.
- Click "New +" -> "Web Service".
- Connect your GitHub repository.
- Render will automatically detect the
render.yamlorDockerfile(if you choose Docker runtime). - Important: Add your
GEMINI_API_KEYin the "Environment" tab on Render dashboard.
The project includes a GitHub Actions workflow to automatically build and push the Docker image to Docker Hub.
- Secrets required in your GitHub repository:
DOCKER_HUB_USERNAME:rashedulalbab1234DOCKER_HUB_ACCESS_TOKEN: Your Docker Hub Access Token.
- The workflow triggers on every push to the
mainbranch.
- Environment Variables: API keys are stored in
.envfiles and never exposed to the frontend. - FastAPI: Provides a robust, asynchronous backend capable of handling multiple concurrent requests.
- Gemini AI: Uses the latest
gemini-2.5-flashmodel for high-speed, accurate mathematical reasoning.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.