Inspiration

What it does

How we built it

Challenges we ran into

Inspiration

Shared expenses are not hard because of the math—they are hard because the evidence is buried in normal conversations.

After a trip, hostel outing, or month of flat-sharing, WhatsApp groups fill with messages like “I paid ₹210 for petrol,” “food was ₹600,” and “send it later.” Someone has to scroll through the chat, collect the numbers, calculate a fair split, and send awkward reminders.

ChatLedger was inspired by the idea that groups should not need a new habit or another spreadsheet. Their chat already knows who paid; the product should make that information useful and fair.

What it does

ChatLedger converts a WhatsApp .txt export into an auditable shared-expense ledger.

It identifies expenses, records who paid and why, calculates balances, and creates the smallest set of payments needed to settle the group. It also provides:

  • A Source chat view for comparing original rough messages with the ledger.
  • An Activity audit trail for every extracted expense.
  • Human confirmation for unclear amounts or splits.
  • Receipt and voice-note support for additional evidence.
  • A WhatsApp-ready settlement summary and payment reminders.

How we built it

We built ChatLedger with React, Vite, and Node.js.

The frontend handles chat upload, example groups, the ledger, audit trail, confirmation controls, and sharing. A small Node.js server keeps the OpenAI API key private and sends uploaded chat text to the OpenAI Responses API.

GPT-5.6 uses structured JSON output to identify expense candidates from English, Hindi, and Hinglish messages. It extracts the payer, amount, description, split participants, confidence, and source evidence.

We deliberately separate AI interpretation from financial arithmetic. GPT-5.6 understands flexible language; deterministic code calculates balances and settlement payments.

For each person (p):

[ \mathrm{balance}(p) = \sum \mathrm{payments\ made\ by\ } p - \sum \mathrm{their\ share\ of\ group\ expenses} ]

A positive balance means the person should receive money; a negative balance means they owe money.

Codex accelerated the entire build: product workflow, React interface, structured extraction routes, parser safety cases, ledger logic, UI refinement, and demo preparation.

Challenges we faced

The largest challenge was trust. A system that guesses an expense incorrectly can create a real social problem.

We addressed this by treating AI output as a candidate rather than unquestionable truth. Unclear entries are held for human review, source messages remain visible, and deterministic code—not the model—performs the final arithmetic.

Another challenge was making the project feel like a reusable product rather than a single demo. We added different realistic examples—flatmates, a Goa trip, and a hostel floor—with distinct people, chats, expenses, totals, and settlement plans.

We also focused on privacy: the browser never receives the OpenAI API key, uploads only happen after explicit user action, and this hackathon prototype does not persist chats.

What we learned

We learned that useful AI is not just about generating an answer. It should be inspectable, correctable, and paired with deterministic systems where accuracy matters.

ChatLedger lets AI understand messy human language, while people retain control and the money math stays reliable.

Your WhatsApp group already knows who paid. ChatLedger makes it fair.

Accomplishments that we're proud of

What we learned

What's next for ChatLedger

Built With

Share this project:

Updates