DEV Community

Sachindu Nethmin
Sachindu Nethmin

Posted on

RoomPot: our room's cooking money, split by an open model

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

Built by me together with my roommates and teammates @bimsara_wickramanayaka_10, @chathuraz and @ashan_lima.

RoomPot cover

What I Built

Four of us share a room: Chathura, Bimsara, Ashan and me. We cook together, so one of us is always running to the shop for rice, eggs, onions or a new gas cylinder.

Most of the time that person is Chathura. Chathura buys whatever the room needs and pays up front. At the end of the month we're supposed to add up everything, divide the total by four, and pay back whoever spent more. We tried keeping it in an Excel sheet, but in practice receipts get lost, someone forgets to add a purchase, and the collecting just... doesn't happen. Chathura ends up quietly covering money nobody remembers to give back, and asking for it feels awkward.

So I built RoomPot for Chathura and for the rest of us. It's a small group chat for the room. Whoever buys something just says it, the way you'd text a friend:

chicken 1.2k, onions 300, tomatoes 250

RoomPot reads the message with an open-weight AI model (Google's Gemma). It knows who is logged in, so it records that person as the payer. It splits the cost between the four of us and keeps a running tally of who owes whom. Nobody has to remember anything or do maths at the end of the month.

Chathura logs a purchase and RoomPot splits it four ways

What it does:

  • Log costs by chatting. "rice 1200, eggs 450" works, and so do "Chathura bought bread 200" (credits Chathura) and "shampoo for me and Ashan 800" (splits between just those two).
  • Receipt photos. Snap the shop bill and every item is logged. Totals, cash and change lines are ignored.
  • Average daily spend. The number we actually wanted to know: what the room spends per day and per person, plus today's spend, this month, the last 7 days, and a 30-day chart.

Average daily spend

  • Settle up. It works out the fewest payments that clear everyone's debts, with a Mark paid button. You can also just type "gave Chathura 1500".
  • Ask it anything about our money. "What's our average daily spend and who still owes me?" is answered from our own data.

The Money tab: average daily spend, 30-day chart and settle-up

Demo

Live app: https://roompot.onrender.com

Sign up with any username, create a room, and try messages like:

  • rice 1200, eggs 450, gas 3800
  • shampoo for me and <a roommate's name> 800
  • what's our average daily spend?

You can also invite a second account with the room's invite code to see the splitting and settle-up. (It's on Render's free plan, so if it has been idle, the first load takes about a minute to wake up.)

Asking RoomPot a question about our spending

Code

GitHub logo Sachindu-Nethmin / roompot

Shared room budget for roommates who cook together. Chat what you bought; Gemma (open-weight, via Ollama) splits it and tracks who owes whom.

🍳 RoomPot

A shared room budget for roommates who cook together. Tell the group chat what you bought, like "rice 1200, eggs 450, gas 3800", or send a photo of the bill. An open-weight model (Gemma) reads it. It runs on a server by default so it works in any browser, and anyone can switch on private mode to run it inside their own browser instead. It logs the cost under whoever is logged in, splits it between the room, and keeps a running tally of who owes whom. No more "machan, did I give you money for the gas last week?"

Chat where roommates log purchases and RoomPot splits them   Money dashboard with average daily spend, 30-day chart and settle-up

Why it exists

Four of us share a room and cook together. Whoever goes to the shop pays, and at the end of the month we add it all up and divide by four. Except someone always forgets to write a purchase down, and someone else forgets…




How I Built It

Stack: Next.js (App Router), MongoDB Atlas with Mongoose, and Tailwind CSS, deployed on Render.

Gemma is the core. Every chat message goes to Gemma along with the room's member names and a short set of rules. Gemma returns structured JSON:

{
  "intent": "expense",
  "items": [{ "name": "chicken", "amount": 1200 }, { "name": "onions", "amount": 300 }],
  "paidBy": null,
  "splitWith": [],
  "settleTo": null,
  "settleAmount": null,
  "reply": null
}
Enter fullscreen mode Exit fullscreen mode

The intent can be an expense, a payment back to someone, a question, or just chat. From that, the app records the purchase, records the payment, or answers the question using the room's real numbers.

The model is never trusted blindly. Every response is checked with a zod schema. Amounts must be positive and sensible, and names must match real room members. A bad or missing answer falls back to a simple rule-based parser, so the room never stops working. The money maths (balances, the fewest settle-up payments, daily averages in our timezone) is plain, exact code. The AI only does what it's good at: turning messy human text and photos into clean data.

The same open model runs in three places, and switching between them is one setting:

Where Model Used for
Render + Google AI Studio Gemma 4 (gemma-4-26b-a4b-it) The live app. Works in any browser and reads receipt photos.
My laptop, through Ollama Gemma 4 E4B Building and testing, fully offline
Inside the phone's browser Gemma 2 2B through WebLLM (WebGPU) Optional private mode: after a one-time download, messages and photos never leave the phone. Receipts are read on-device with Tesseract.js.

Before shipping I ran a set of test messages through Gemma: purchases, "someone else paid", partial splits, paying someone back, questions, and a purchase with no price. All 13 were handled correctly, and a printed receipt was read line by line with the total, cash and change ignored.

Why Does Open Innovation Matter?

  • Our money is personal. Who bought what and who owes whom is our business. Because Gemma's weights are open, the same model family can run inside a phone's browser, so private mode keeps every message on the device. With a closed API, the only option would be sending everything to someone else's server.
  • It costs nothing to run. Four roommates splitting cooking costs are not going to pay for an AI subscription. Ollama on a laptop is free, the in-browser model is free, and Gemma on Google AI Studio's free tier is free.
  • It works offline. On my laptop with Ollama, RoomPot keeps working with no internet at all. That's how I built and tested most of it.
  • No lock-in. The model is one environment variable. Moving from Gemma 3 to Gemma 4 was a one-line change, and the same code also works with any OpenAI-compatible open-model server.

To be honest about the trade-off: in the hosted version, messages are sent to Google AI Studio to be read by Gemma. Private mode exists for anyone in the room who doesn't want that.

What My Roommates Said

I sent the link to the room. Bimsara tried it first and messaged me:

"Machan, just tested it. It works perfectly, way better than our messy Excel sheet."

(Machan is Sri Lankan slang for "buddy".)

Prize Categories

  • Best Use of Gemma: Gemma 4 powers the live app and my offline setup, and Gemma 2 2B runs in the browser for private mode.
  • Best Use of Render: the app is deployed as a Render web service, built straight from the GitHub repo.
  • Best Use of MongoDB Atlas: Atlas is the data layer for users, rooms, purchases, payments and the chat history behind the open-weight model.

I built RoomPot with help from an AI coding assistant. The idea, the problem, the decisions, and testing it with my roommates are ours.

Top comments (0)