Skip to content

rashedulalbab253/Bengali-with-100_languages-math-physics-chemistry-problem-solver-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ 100+ Language STEM Solver (Math, Physics, Chemistry)

Developed by Rashedul Albab

License: MIT AI Powered Docker

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.).


โœจ Features

  • ๐ŸŒ 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.

๐Ÿš€ Tech Stack


๐Ÿ› ๏ธ Project Structure

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

โš™๏ธ Installation & Setup

๐Ÿš€ Getting Started (FastAPI + HTML/CSS)

Local Development:

  1. Navigate to the backend directory: cd backend
  2. Install dependencies: pip install -r requirements.txt
  3. Add your Gemini API Key to .env
  4. Run the server: python main.py

Frontend:

  1. Open frontend/index.html in your browser.
  2. Ensure the API_BASE_URL in script.js matches your backend URL.

๐Ÿณ Docker Deployment

  1. Build the image:
    docker build -t rashedulalbab1234/global-math-solver:latest .
  2. Run with Docker Compose:
    docker-compose up -d
    Note: Ensure your .env file is in backend/ as it will be loaded by the container.

โ˜๏ธ Deploy on Hugging Face Spaces (Free & Easy)

  1. Create an Account: Go to huggingface.co and sign up.
  2. Create a New Space:
    • Click your profile picture -> New Space.
    • Name: global-stem-solver (or similar).
    • License: MIT.
    • SDK: Select Docker.
    • Template: Select Blank.
  3. Upload Files:
    • Upload Dockerfile, backend/, frontend/, requirements.txt via web interface or git.
  4. Add Secret:
    • Go to Settings -> Variables and secrets.
    • New Secret -> Name: GEMINI_API_KEY, Value: (Your Key).
  5. Done! Your app will build and launch automatically.

โ˜๏ธ Deploy on Render

  1. Push your code to a GitHub repository.
  2. Log in to Render.
  3. Click "New +" -> "Web Service".
  4. Connect your GitHub repository.
  5. Render will automatically detect the render.yaml or Dockerfile (if you choose Docker runtime).
  6. Important: Add your GEMINI_API_KEY in the "Environment" tab on Render dashboard.

๐Ÿ—๏ธ CI/CD (GitHub Actions)

The project includes a GitHub Actions workflow to automatically build and push the Docker image to Docker Hub.

  1. Secrets required in your GitHub repository:
    • DOCKER_HUB_USERNAME: rashedulalbab1234
    • DOCKER_HUB_ACCESS_TOKEN: Your Docker Hub Access Token.
  2. The workflow triggers on every push to the main branch.

๐Ÿ›ก๏ธ Security & Scalability

  • Environment Variables: API keys are stored in .env files 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-flash model for high-speed, accurate mathematical reasoning.

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


About

๐Ÿš€ Multilingual AI STEM Solver. Snap a photo or type a problem to get instant, step-by-step solutions in over 100 languages. Breaking barriers in STEM education. Live: https://bengali-with-100-languages-math-physics.onrender.com/

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors