Skip to content

About

A lightweight expense-splitting app for shared groups: create a group, share its link and track who owes what without sign-up.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SplitSmart: Keep the plans. Split the bill. Group expenses, custom shares and recorded settlements. Concept bill-sharing diagram.

Overview · Workflow · Balances · Setup · Screenshots · Source

I built SplitSmart for the practical part of sharing a trip, a flat or a group plan: keeping track of who paid, how the bill is divided and what is still owed. Create a group, share its link and record expenses without a sign-up flow. Supabase stores the group records; the frontend calculates balances and offers a settlement list.

What I built

Group links, equal/custom splits, balances and settlement tracking, plus Artificial Intelligence category suggestions and insights.

The interface includes expense history with category filters, deletion, category spending charts, payer rankings and settlement history. Groq supports category suggestions and generated spending insights; the financial calculations use the application’s JavaScript logic.

From bill to balance

Create a group, log payer and participant shares, review the balances, then record a settlement.

Share the generated group link so others can open that group. The application has no authentication or membership-permission layer. Treat group records as demonstration data unless you add suitable access controls.

How the balances work

Payer credit, participant debits, greedy settlement suggestions and recorded payments.

An expense credits the person who paid and debits participants by their stored shares. A recorded settlement raises the sender’s balance and lowers the receiver’s. The UI labels positive balances as “gets back,” negative balances as “owes,” and values within its small tolerance as settled.

The settlement list uses a greedy debtor/creditor matching algorithm. It simplifies outstanding balances into payment suggestions; it does not guarantee a globally minimum number of payments. Recording a settlement updates the ledger—it does not initiate a bank payment.

Artificial Intelligence and live updates

Expense descriptions are debounced before a Groq request suggests one of seven categories: Food, Travel, Rent, Entertainment, Shopping, Utilities or General. The response is normalized against that list, with General as the fallback. The configured model is llama-3.3-70b-versatile; actual access depends on your provider account.

Supabase Realtime subscribes to the group’s members, expenses and settlements tables. Events trigger a fetch and re-render. The current code does not subscribe directly to all five schema tables, so changes to nested split rows alone may need a refresh.

Set up the project

Configure environment variables, generate js/config.js with node build.js, then open or serve index.html.

git clone https://github.com/adilsukumar/SplitSmart-Expense-Splitter.git
cd SplitSmart-Expense-Splitter

Database

The application expects these Supabase tables:

Table Purpose
expense_groups Group name and creation date
members People associated with a group
expenses Amount, payer, split type and category
expense_splits Each participant’s share of an expense
settlements Recorded payments between members
Existing demo schema

The SQL below preserves the repository’s original demonstration setup. It disables row-level security and provides no private group membership model. Use an isolated test project with non-sensitive sample data; a public production deployment needs an access-control design rather than this configuration.

create table expense_groups (id uuid default gen_random_uuid() primary key, name text not null, created_at timestamp default now());
create table members (id uuid default gen_random_uuid() primary key, group_id uuid references expense_groups(id) on delete cascade, name text not null, created_at timestamp default now());
create table expenses (id uuid default gen_random_uuid() primary key, group_id uuid references expense_groups(id) on delete cascade, description text not null, amount numeric not null, paid_by uuid references members(id) on delete cascade, split_type text default 'equal', category text default 'General', created_at timestamp default now());
create table expense_splits (id uuid default gen_random_uuid() primary key, expense_id uuid references expenses(id) on delete cascade, member_id uuid references members(id) on delete cascade, amount numeric not null);
create table settlements (id uuid default gen_random_uuid() primary key, group_id uuid references expense_groups(id) on delete cascade, from_member uuid references members(id) on delete cascade, to_member uuid references members(id) on delete cascade, amount numeric not null, settled_at timestamp default now());
alter table expense_groups disable row level security;
alter table members disable row level security;
alter table expenses disable row level security;
alter table expense_splits disable row level security;
alter table settlements disable row level security;
alter publication supabase_realtime add table expense_groups;
alter publication supabase_realtime add table members;
alter publication supabase_realtime add table expenses;
alter publication supabase_realtime add table expense_splits;
alter publication supabase_realtime add table settlements;

Enable Realtime for the tables used by the subscriptions and inspect the connected project’s permissions before deployment.

Generate browser configuration

The repository does not track js/config.js. Its build script generates it from environment variables. For example, in PowerShell:

$env:SUPABASE_URL = "https://your-project.supabase.co"
$env:SUPABASE_ANON_KEY = "your-anon-key"
$env:GROQ_API_KEY = "your-groq-key"
node build.js

Open index.html, or serve the repository as a static site. There is no npm package-install step in this repository. Network access is still needed for Supabase, Groq and the frontend’s external resources.

The generated configuration is browser-readable. Putting GROQ_API_KEY in a deployment environment variable does not keep it secret once build.js writes it into JavaScript. Use a restricted test key for personal experiments; keeping a provider credential private requires moving those Groq requests behind a server endpoint. The current code has no such proxy.

Vercel deployment

Import SplitSmart-Expense-Splitter, configure SUPABASE_URL, SUPABASE_ANON_KEY and GROQ_API_KEY, and use the repository’s existing vercel.json: it runs node build.js and publishes the repository root. Verify the generated config and database connection. A repository does not need to be public merely to import it into a hosting account with access.

Current scope

No member authentication, browser-visible generated configuration and subscriptions to three group tables.

Group data is stored in the configured Supabase project. Expense descriptions and group information used for insights are sent to Groq. The original demo schema disables RLS, so a group URL is an identifier rather than a privacy boundary.

The current source displays rupee amounts and has no multi-currency conversion layer. Authentication, CSV/PDF export, recurring expenses, notifications and a PWA remain future ideas in the original README. They are not presented here as completed features.

Screenshots and demo

Open the existing live-app link · Watch the existing demo video

Original application screenshots Original SplitSmart application screenshot 1 Original SplitSmart application screenshot 2 Original SplitSmart application screenshot 3 Original SplitSmart application screenshot 4

Explore the source

Application logic: Groups, expenses, balances and Groq calls Configuration build: Environment values to browser configuration Frontend structure: Group interface and application entry point Deployment settings: Config build command and static output

index.html       application interface and external resources
css/style.css    dashboard styling
js/app.js        groups, expenses, balance calculation and Groq requests
build.js         generates the untracked js/config.js
vercel.json      configuration build and static output

The repository currently has no automated test runner or package scripts. Inspect the balance logic and use an isolated sample group when validating changes.

SplitSmart: More shared stories. Less leftover math. Log it, split it, settle it.

Discuss an improvement · Inspect the balance logic · Meet the builder

About

A lightweight expense-splitting app for shared groups: create a group, share its link and track who owes what without sign-up.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages