Welcome to GrubMath Backend! This is an agentic workflow backend built with Deno for an app that helps users split restaurant bills unevenly based on who ate what. Users can upload an image of a bill, provide context on who had which items, and the system will calculate each person's share accordingly.
- Bill Image Upload: Users can upload a photo of their bill.
- Contextual Assignment: Specify who consumed each item for accurate splitting.
- Uneven Split: Handles cases where people share or have different quantities.
- Agentic Workflow: Modular, step-based workflow powered by agents for extensibility.
GrubMath-backend/
├── src/
│ ├── agents/ # Agent logic for bill understanding and consumption mapping
│ ├── schemas/ # TypeScript schemas for data validation
│ ├── steps/ # Workflow steps (e.g., image parsing, mapping)
│ └── workflows/ # Orchestrated workflows (e.g., bill splitting)
├── .env # Environment variables
└── README.md # This file
- Deno (v1.30+ recommended)
Clone the repository:
git clone <your-repo-url>
cd GrubMath-backend
Install dependencies (Deno will handle these automatically on run):
deno task check
To start the backend server:
deno run -A src/main.ts
-A
grants all permissions (adjust as needed for your environment).
To run tests (if available):
deno test
- Upload Bill Image:
- User uploads a photo of the bill.
- Image Parsing:
- The backend extracts itemized data from the image.
- Context Input:
- User provides info on who had what (e.g., Alice: Pizza, Bob: Salad).
- Agentic Split:
- The workflow calculates each person's share based on their consumption.
- Steps: Each step (image parsing, mapping, splitting) is modular and can be extended.
- Agents: Specialized agents handle context extraction, consumption mapping, and calculations.
Configure your .env
file for any required secrets or API keys (e.g., for OCR
services).
Pull requests and issues are welcome! Please open an issue to discuss your ideas or report bugs.