<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sagar Gusain</title>
    <description>The latest articles on DEV Community by Sagar Gusain (@sagargusain96341).</description>
    <link>https://dev.to/sagargusain96341</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F99mvlsfu5tfj9m7ku25d.png</url>
      <title>DEV Community: Sagar Gusain</title>
      <link>https://dev.to/sagargusain96341</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sagargusain96341"/>
    <language>en</language>
    <item>
      <title>FairShare - Making Shared Life Simpler</title>
      <dc:creator>Sagar Gusain</dc:creator>
      <pubDate>Sat, 03 Oct 2026 08:05:11 +0000</pubDate>
      <link>https://dev.to/sagargusain96341/fairshare-making-shared-life-simpler-lfj</link>
      <guid>https://dev.to/sagargusain96341/fairshare-making-shared-life-simpler-lfj</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  FairShare — Making Shared Living Simpler 🤝💰
&lt;/h1&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;FairShare is a shared-living expense management application built for friends, roommates, and people living together in hostels, PGs, apartments, or shared rooms.&lt;/p&gt;

&lt;p&gt;The idea came from a simple problem: when multiple people share expenses, it becomes annoying to remember who paid, who owes whom, how much everyone owes, and how to settle everything fairly.&lt;/p&gt;

&lt;p&gt;FairShare follows a simple flow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Record → Split → Track → Settle&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Users can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create and join shared groups&lt;/li&gt;
&lt;li&gt;Record group expenses&lt;/li&gt;
&lt;li&gt;Split expenses equally or using custom amounts&lt;/li&gt;
&lt;li&gt;Track individual balances&lt;/li&gt;
&lt;li&gt;View settlement suggestions&lt;/li&gt;
&lt;li&gt;Record and complete settlements&lt;/li&gt;
&lt;li&gt;Ask questions about their group using natural language through the AI assistant&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The AI assistant makes the experience even simpler. Instead of navigating through multiple screens, users can say things like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I paid ₹1000 for both of us for lunch."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;FairShare understands the request and records the expense while keeping the actual financial calculations and validation inside the backend.&lt;/p&gt;

&lt;p&gt;The project was built around the idea of making everyday shared expenses less complicated for the people you live with.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🎥 &lt;a href="https://youtu.be/I2b59s4Vhpo" rel="noopener noreferrer"&gt;Watch the FairShare Demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The demo shows the core workflow including expense creation, balance tracking, settlements, and the AI assistant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/Jod4968/FairShare.git" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository contains the complete frontend, Spring Boot backend, database migrations, tests, and AI integration.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;FairShare is built using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React + TypeScript + Vite&lt;/strong&gt; for the frontend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Java + Spring Boot&lt;/strong&gt; for the backend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Security + JWT&lt;/strong&gt; for authentication&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL&lt;/strong&gt; for persistent data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker&lt;/strong&gt; for the development environment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ollama&lt;/strong&gt; for local AI inference&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemma 3 4B&lt;/strong&gt; as the open-weight AI model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most important part of the architecture is the separation between AI interpretation and application logic.&lt;/p&gt;

&lt;p&gt;The flow is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User → React → Spring Boot → Gemma → Structured Intent → Validation → Domain Service → Database&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Gemma is responsible for understanding what the user is asking for and converting natural-language requests into structured intents.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I paid ₹1000 for both of us for lunch."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The AI can identify the intent as creating an expense, identify the description and participants, and extract the monetary amount.&lt;/p&gt;

&lt;p&gt;However, the AI does &lt;strong&gt;not&lt;/strong&gt; directly access the database or perform critical financial operations.&lt;/p&gt;

&lt;p&gt;The Spring Boot backend remains responsible for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authentication and authorization&lt;/li&gt;
&lt;li&gt;Group membership validation&lt;/li&gt;
&lt;li&gt;Expense validation&lt;/li&gt;
&lt;li&gt;Participant validation&lt;/li&gt;
&lt;li&gt;Monetary conversion and precision&lt;/li&gt;
&lt;li&gt;Expense calculations&lt;/li&gt;
&lt;li&gt;Balance calculations&lt;/li&gt;
&lt;li&gt;Settlement calculations&lt;/li&gt;
&lt;li&gt;Database operations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Money is stored as integer paise to avoid floating-point precision problems.&lt;/p&gt;

&lt;p&gt;This means the AI acts as an interface for the application rather than becoming the source of truth for financial data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Open innovation made it possible to build the AI layer around a model that can run locally instead of making the core functionality dependent on a closed external AI API.&lt;/p&gt;

&lt;p&gt;FairShare uses &lt;strong&gt;Gemma 3 4B through Ollama&lt;/strong&gt;, allowing the AI assistant to run locally on the developer's machine.&lt;/p&gt;

&lt;p&gt;This was particularly useful for experimenting with natural-language expense commands while maintaining control over how the model interacts with the application.&lt;/p&gt;

&lt;p&gt;The most important lesson was that an AI model does not need to control the application's business logic to be useful.&lt;/p&gt;

&lt;p&gt;Gemma understands the user's intent, while the deterministic backend decides whether that intent is valid and performs the actual operation.&lt;/p&gt;

&lt;p&gt;This architecture provides a clear boundary:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI interprets.&lt;br&gt;&lt;br&gt;
Backend validates.&lt;br&gt;&lt;br&gt;
Domain services calculate.&lt;br&gt;&lt;br&gt;
Database stores.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using an open-weight model also made local experimentation and development possible without requiring every AI interaction to depend on a remote proprietary API.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;The project was developed with AI-assisted coding and debugging, including using GitHub Copilot Agent to implement, test, and refine parts of the application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🟢 Gemma
&lt;/h3&gt;

&lt;p&gt;FairShare is entering the &lt;strong&gt;Gemma&lt;/strong&gt; category.&lt;/p&gt;

&lt;p&gt;The project uses &lt;strong&gt;Gemma 3 4B&lt;/strong&gt;, running locally through &lt;strong&gt;Ollama&lt;/strong&gt;, as the open-weight model powering the FairShare Assistant.&lt;/p&gt;

&lt;p&gt;Gemma is integrated into the actual application workflow rather than being used as a standalone chatbot.&lt;/p&gt;

&lt;p&gt;It interprets natural-language requests such as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I paid ₹1000 for both of us for lunch."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and produces structured information that the Spring Boot backend validates before performing the requested operation.&lt;/p&gt;

&lt;p&gt;The backend remains authoritative for financial calculations, authorization, and database changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Highlights
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔐 Authentication
&lt;/h3&gt;

&lt;p&gt;FairShare uses JWT-based authentication with protected backend endpoints and group-level membership checks.&lt;/p&gt;

&lt;h3&gt;
  
  
  👥 Groups
&lt;/h3&gt;

&lt;p&gt;Users can create and join groups using secure join codes and manage their shared-living expenses within those groups.&lt;/p&gt;

&lt;h3&gt;
  
  
  💰 Expense Splitting
&lt;/h3&gt;

&lt;p&gt;Expenses support equal and custom splits.&lt;/p&gt;

&lt;p&gt;Equal splits are calculated deterministically, including handling remainder paise so that the participant amounts always add up exactly to the original expense.&lt;/p&gt;

&lt;h3&gt;
  
  
  📊 Balances
&lt;/h3&gt;

&lt;p&gt;Balances are calculated from actual payments, amounts owed, and completed settlements.&lt;/p&gt;

&lt;h3&gt;
  
  
  🤝 Settlements
&lt;/h3&gt;

&lt;p&gt;FairShare generates deterministic settlement suggestions so group members can see how outstanding balances can be settled.&lt;/p&gt;

&lt;h3&gt;
  
  
  🤖 AI Assistant
&lt;/h3&gt;

&lt;p&gt;The AI assistant allows users to interact with their group's expenses using natural language while keeping AI-generated actions behind backend validation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;The biggest lesson from building FairShare was that integrating AI into an application is not just about calling an LLM.&lt;/p&gt;

&lt;p&gt;The difficult part is deciding &lt;strong&gt;where the AI should and should not have authority&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For financial operations, I wanted the model to understand the user's request but never become responsible for the final calculation.&lt;/p&gt;

&lt;p&gt;This led to a design where:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gemma understands the request → Spring Boot validates it → deterministic services execute it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Building the project also helped me understand how authentication, database design, REST APIs, DTOs, validation, exception handling, deterministic financial calculations, and local AI inference can work together as one application.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;FairShare currently focuses on the core shared-living expense workflow.&lt;/p&gt;

&lt;p&gt;Future improvements could include deploying the application, adding richer spending analytics, improving the AI assistant, and expanding the experience based on feedback from actual users.&lt;/p&gt;




&lt;p&gt;Built for the Hacktoberfest Weekend Challenge: &lt;strong&gt;Build for a Friend&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FairShare — Making Shared Living Simpler.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
    </item>
    <item>
      <title>introduction</title>
      <dc:creator>Sagar Gusain</dc:creator>
      <pubDate>Fri, 02 Oct 2026 05:44:31 +0000</pubDate>
      <link>https://dev.to/sagargusain96341/introduction-441k</link>
      <guid>https://dev.to/sagargusain96341/introduction-441k</guid>
      <description>&lt;p&gt;hello, i am batman&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
