This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
If you've ever shared a flat with friends, you probably know the conversation:
"Bro, who owes whom?"
Someone pays for dinner. Someone else buys groceries. Another person pays a utility bill. A few days later, everyone remembers the expense differently, and someone ends up searching through WhatsApp messages, UPI transactions, or doing the math manually.
I built FlatMate OS to solve that everyday problem.
FlatMate OS is a local AI-powered expense assistant designed for people sharing a flat. Instead of filling out a traditional expense form, you can simply describe what happened in natural language.
For example:
"I paid ₹1800 for dinner for me, Arun and Vishal."
FlatMate OS understands the message and turns it into a structured expense:
- Amount: ₹1,800
- Payer: You
- Category: Food & dining
- Participants: You, Arun, Vishal
- Share: ₹600 each
The important part is that the AI doesn't directly decide the financial result. It interprets what the user said, while deterministic application code handles the actual splitting, balances, and settlement calculations.
The user reviews the extracted expense before confirming it, and only then is it added to the household ledger.
I built this specifically around the kind of small but annoying problem that comes up when living with friends: keeping track of shared expenses without making everyone become an accountant.
The goal is simple:
Just tell FlatMate OS what happened. Let it handle the bookkeeping.
Demo
🎥 Video Demo: Watch FlatMate OS in action
The demo shows the complete experience from natural-language input to settlement:
- I describe an expense in normal language.
- Gemma 3 4B extracts the relevant information locally.
- FlatMate OS presents the result as a reviewable draft.
- I confirm the expense before it is saved.
- The expense flows into the dashboard and expense history.
- The deterministic finance engine updates the household balances.
- The Settle Up screen shows who owes whom.
The demo also shows the key architectural idea behind the project:
AI interprets. Deterministic code calculates.
Code
💻 GitHub: RojanFrancis/flatmate-os-ai
The repository contains the complete FlatMate OS application, including the frontend, Convex backend, local Gemma/Ollama integration, extraction providers, validation and normalization logic, and deterministic finance engine.
The most important part of the implementation is the separation between language interpretation and financial computation. The model can help understand a user's message, but the application remains responsible for the actual accounting logic.
How I Built It
The core idea behind FlatMate OS is to give the AI one job: understand what the user means.
Everything that affects financial correctness is handled by deterministic application logic.
The overall flow is:
Natural-language expense
↓
Gemma 3 4B
+ Ollama
↓
Structured extraction
↓
Validation + normalization
↓
Deterministic finance engine
↓
Convex
↓
Dashboard / Expenses / Settle Up
## Why Does Open Innovation Matter?
**This is extremely important.**
The template explicitly asks:
> Why does open innovation matter for what you built? What did it make possible that a closed API wouldn't?
So we should answer that **directly**, not just say "Gemma is open source."
Paste:
markdown
Why Does Open Innovation Matter?
For FlatMate OS, using an open-weight model isn't just a way to add an AI feature. It fits the actual problem I wanted to solve.
Expense descriptions can contain personal information:
- how much someone spent
- what they bought
- who they live with
- who paid for something
- household spending patterns
For a simple message like:
"I paid ₹800 for dinner yesterday."
I don't necessarily want to send that sentence to a proprietary AI API just to turn it into structured fields.
FlatMate OS uses Gemma 3 4B locally through Ollama, so the language-understanding step can happen on the user's own machine.
That gives the project a local-first AI architecture and more control over where the natural-language processing happens.
Open-weight AI also gives the application more flexibility. The extraction layer is separated from the finance engine, so the model can be changed or upgraded without rebuilding the accounting system around a particular closed provider.
There is also a practical benefit: local inference doesn't require a paid model API request for every expense.
But the biggest reason is control.
For something involving personal household spending, I like the idea that the user can run the language model locally rather than having every casual expense description depend on a remote proprietary AI service.
That's what open innovation made possible for this project: AI that can be useful at the edge of the application without making the entire product dependent on a closed API.
My Agent Session
I built FlatMate OS with AI-assisted development as part of the build process.
I used AI coding tools to help with project scaffolding, implementation, debugging, and iteration, while making the product and architecture decisions myself. The development process included building the natural-language extraction layer, integrating local Gemma inference through Ollama, testing extraction edge cases, and separating the AI layer from the deterministic finance engine.
One of the most important parts of the process was iterating on real examples rather than assuming that a language model would always extract expenses correctly. For example, I tested cases involving multiple participants, explicit exclusions, missing participants, and natural date expressions.
The final application was then manually tested end-to-end:
Natural-language expense
↓
Gemma extraction
↓
Validation / normalization
↓
User confirmation
↓
Convex persistence
↓
Dashboard
↓
Deterministic settlement
Prize Categories
Best Use of Gemma
I'm entering FlatMate OS in the Best Use of Gemma category.
Gemma 3 4B is the natural-language interpretation layer of the application. It converts everyday expense descriptions into structured information that FlatMate OS can validate and process.
Gemma runs locally through Ollama, while the actual financial calculations remain deterministic.
This separation is central to the project:
Gemma understands the language. The finance engine understands the money.
Top comments (0)