Project Info
This project did not submit a demo video on Devpost.
Inspiration
The motivation to start working on "ForMath" was our struggling friends who frequently deal with the frustration of knowing that something is wrong with their problem-solving process but are unable to identify the issue. To solve the same, we developed a website that not only offers answers but also explains the steps involved in reaching the solution. Our goal is to give individuals a comprehensive understanding of the correct problem-solving approach so that they are not just reaching the correct answer, but also following the correct approach to reach it. Through this project, we aim to empower learners with the knowledge and confidence to navigate challenges effectively.
What it does
Our project is a user-friendly website designed to assess image solutions provided by users. It verifies the correctness of answers and evaluates the accuracy of problem-solving steps. Users receive detailed feedback, pinpointing specific mistakes and categorizing errors as either calculational or conceptual, aiding in their learning process. It has two primary target audiences - students and teachers. Teachers can use our web - app to quickly grade test papers which are graded based on math work shown by students. Additionally, students can use our service to ensure that they show all the work; furthermore, they can clarify steps that they might've gotten wrong on previous exams.
How we built it
For the front end, we designed in Figma and coded the UI elements in React. We built the backend using node and express with CockroachDB as the database. Additionally, we leveraged several APIs from Mathpix, WolframAlpha, OpenAI, and an image hosting service.
Challenges we ran into
We faced quite a lot of challenges in terms of implementing and accessing APIs as some of the APIs (Mathpix and ChatGPT), were paid and also they had a limited number of trials (Wolfram).
Accomplishments we're proud of
During the process of trying to give shape to "ForMath" we ran into various challenges, overcame them, and made our way to what it is right now- a beta version of our vision.
What we learned
We explored how to use different databases (Cockroach DB, AWS, etc). Apart from the technical stuff (like environmental setup), we were also able to learn how to work long hours as this was our first hackathon for. We learned how to be organized and manage time efficiently too.
What's next
We look forward to applying our software for the line-by-line checking of works in other subjects as well like chemistry, physics, etc. We further hope to partner with schools to encourage students to follow steps when doing work as showing work and steps is very important in many careers.
ForMath
Step-by-Step Problem Solving Analysis Helper
ForMath is an educational tool that helps students analyze their math homework by identifying calculation errors, conceptual mistakes, and providing detailed feedback on their solutions. The application uses advanced OCR, OpenAI's GPT-4, and Wolfram Alpha to provide comprehensive mathematical analysis and tutoring help.
Features
Core Functionality
- Multi-format Input Support: Upload images (JPG, PNG, GIF, BMP) or PDF files of math homework
- Camera Integration: Capture math problems directly using your device's camera
- Text Input: Enter problems manually or paste from other sources
- Advanced OCR: Extract text from images and scanned PDFs using Tesseract.js
- PDF Processing: Direct text extraction from digital PDFs with OCR fallback for scanned documents
AI-Powered Analysis
- Problem Parsing: Automatically separates original problems from student solutions
- Error Detection: Identifies conceptual errors, computational mistakes, or confirms correct solutions
- Solution Verification: Uses Wolfram Alpha to provide correct solutions for comparison
- Detailed Feedback: GPT-4 powered analysis with explanations, hints, and improvement suggestions
- Topic Classification: Categorizes problems by mathematical topic and difficulty level
Technology Stack
Frontend
- React 18 - Modern UI framework
- React Router - Client-side routing
- Axios - HTTP client for API communication
- Tesseract.js - Client-side OCR processing
- PDF.js - PDF rendering and text extraction
- React Webcam - Camera integration
- React Dropzone - File upload interface
- Recharts - Data visualization
- KaTeX - Mathematical notation rendering
Backend
- Node.js with Express - RESTful API server
- PostgreSQL (CockroachDB) - Database for user data and analytics
- OpenAI GPT-4 - Problem analysis
- Wolfram Alpha API - Mathematical computation and verification
- Multer - File upload handling
- PDF-Parse - Server-side PDF text extraction
Deployment
- Vercel - Frontend hosting and deployment
- Docker - Containerized backend deployment
- Environment Variables - Secure configuration management
Getting Started
Prerequisites
- Node.js 16+ and npm
- PostgreSQL database (or CockroachDB)
- OpenAI API key
- Wolfram Alpha App ID
- Google OAuth 2.0 credentials
Installation
-
Clone the repository
git clone https://github.com/darthvader58/biryani.git cd biryani -
Install frontend dependencies
npm install -
Install backend dependencies
cd backend npm install cd .. -
Configure environment variables
Create
.envin the root directory:REACT_APP_GOOGLE_CLIENT_ID=your_google_client_idCreate
backend/.env:DATABASE_URL=your_postgresql_connection_string OPENAI_API_KEY=your_openai_api_key WOLFRAM_APP_ID=your_wolfram_alpha_app_id PORT=8080 NODE_ENV=development -
Set up the database The application will automatically create the required tables on first run.
-
Start the development servers
Backend server:
cd backend npm startFrontend development server:
npm start
Google OAuth Setup
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URIs:
http://localhost:3000(development)- Your production domain (e.g.,
https://your-app.vercel.app)
Usage
Analyzing Math Problems
- Sign in with your Google account
- Upload your homework using one of three methods:
- File Upload: Drag and drop images or PDF files
- Camera: Take a photo of your math work
- Text Input: Type or paste the problem directly
- Review extracted text and edit if necessary
- Click "Analyze Problem" to get AI feedback
- View detailed results including:
- Original problem identification
- Your solution analysis
- Correct solution from Wolfram Alpha
- Error classification and explanations
- Hints for improvement
Dashboard Features
- Performance Overview: Total problems, accuracy rates, error distribution
- Progress Charts: Visual tracking of improvement over time
- Topic Analysis: Performance breakdown by mathematical topics
- Problem History: Complete record of analyzed problems
API Endpoints
Core Endpoints
POST /api/analyze-problem- Analyze a math problemGET /api/dashboard/:email- Get user dashboard dataPOST /api/upload-file- Upload and process filesPOST /api/feedback- Submit user feedback
Authentication
The application uses Google OAuth for authentication. Users must be signed in to access analysis features and dashboard.
File Processing
Supported Formats
- Images: JPG, PNG, GIF, BMP (processed with OCR)
- PDFs: Digital PDFs (direct text extraction) and scanned PDFs (OCR fallback)
Processing Pipeline
- File Upload: Secure file handling with size limits (10MB)
- Text Extraction: OCR for images, direct extraction for digital PDFs
- Content Parsing: AI separation of problems from solutions
- Analysis: Multi-step AI analysis with external verification
- Storage: Secure database storage with user analytics
Deployment
Frontend (Vercel)
npm run build
vercel --prod
Backend (Docker)
cd backend
docker build -t formath-backend .
docker run -p 8080:8080 formath-backend
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with <3 by Shashwat Raj, Vaibhav Urs, Sahaj Rastogi, Ananya Bhargava
Because everyone deserves to look good without the stress
π Star this repo β’ π Report Bug β’ π‘ Request Feature
Analysis
View
Metric
- 3
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- ExpressIn code
- HTMLIn code
- JavaScriptIn code
- OpenAIIn code
- PostgreSQLIn code
- ReactIn code
- AWSClaimed
- Node.jsClaimed
7 of 9 appear in the indexed code. 2 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
1.2 MB
Source files
35
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
darthvader58/biryani
51 files Β· 2.0 MB Β· @ 2c7e949
Structure
Interface
15 files Β· 29%Screens, components and styles rendered to the user.
API & routing
9 files Β· 18%Request entry points: routes, handlers and controllers.
Application logic
7 files Β· 14%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here β open the file browser to check anything the diagram implies.
Languages
- JavaScript96%
- CSS3%
- Markdown1%
- Shell0%
- HTML0%
- YAML0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm Β· 23- @react-oauth/google
- @testing-library/jest-dom
- @testing-library/react
- @testing-library/user-event
- axios
- katex
- mathjs
- openai
- pdf-parse
- pdfjs-dist
- pg
- react
- react-dom
- react-dropzone
- react-hot-toast
- react-katex
- react-latex
- react-router-dom
- +5 more
backend/package.json
npm Β· 9- axios
- cors
- dotenv
- express
- multer
- openai
- pdf-parse
- pg
- +1 more
Declared in the repositoryβs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectβs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.