npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

b3th-solve

v1.0.2

Published

Virtual Math Tutor

Readme

📦 b3th-solve

b3th-solve is an AI-powered image-based math tutor that solves or evaluates handwritten or printed math problems directly from images using Google Cloud Vision OCR and AI.

npm license downloads


✨ Features

  • 🔍 OCR text extraction from math problem images using Google Vision API
  • 🤖 Step-by-step math problem solving (QTAR mode)
  • ✅ Feedback and correction for student work using AI (CTAR mode)
  • 🖼️ Generates annotated solution images using canvas
  • 🛠️ Works with Node.js or React Native/Expo environments

📦 Installation

npm install b3th-solve

or with Yarn:

yarn install b3th-solve

🚀 Quick Start

Solve a Math Problem from an Image

import { processImageQuestion } from "b3th-solve";
import Canvas from "react-native-canvas"; // or @napi-rs/canvas in Node.js

const imagePath = "path/to/your/image.png";
const apiKey = "your_google_vision_api_key";
const canvas = new Canvas();

const result = await processImageQuestion(imagePath, apiKey, canvas);
console.log(result.solution); // Human-readable steps
console.log(result.outputImagePath); // Path to the generated image

🧠 Supported Modes

QTAR - Question to Answer Resolver

Write QTAR in the image to indicate a math question to solve.

Example image text:

QTAR x^2 + 5x + 6 = 0

Returns a step-by-step solution.


CTAR - Check the Answer Review

Write CTAR in the image to indicate student work that needs evaluation.

Example image text:

CTAR
x^2 + 5x + 6 = 0
Student: I factored and found x = -2, x = -3

Returns a feedback image with annotations on correctness and improvement suggestions.


🧪 API Reference

processImageQuestion(imagePath: string, apiKey: string, canvas: Canvas): Promise<{
  solution: string;
  outputImagePath: string | null;
}>
  • imagePath: Path to your image file (local path or URI)
  • apiKey: Google Cloud Vision API key
  • canvas: react-native-canvas instance (for mobile) or @napi-rs/canvas (for Node.js)

🧰 Built With


📝 Example Output

{
  "solution": "To solve x^2 + 5x + 6 = 0...\n1. Factor the quadratic...\n2. Set each factor equal to 0...\n3. Solve for x.",
  "outputImagePath": "/your/path/x_solution.png"
}

🛡️ License

Licensed under the ISC License.


👨‍💻 Author

Developed by Bethvour Chike

For issues, suggestions, or contributions, please open an issue or PR on the GitHub repo.


💡 Future Plans

  • Support multiple equations in one image
  • Add web interface demo
  • Expand to word problems using Gemini reasoning
  • Add LaTeX rendering for solutions