FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

kothariji/trip-split: ๐Ÿงพ A free, open-source Splitwise alternative for trips โ€” split expenses with friends on a Google Sheet you own. No server, no account, no signup. ยท GitHub

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงพ Trip Split

A free, open-source Splitwise alternative for trips โ€” split expenses with friends on a Google Sheet you own. No server, no account, no signup, no app to install.

Open Trip Split โ†’

index.html is the whole app. AppsScript.gs is the whole backend, running inside your sheet. Nothing else exists โ€” no database, no hosting bill, no company holding your data.

  • Equal, partial, and custom splits
  • Who owes whom, in the fewest payments that clear the trip
  • A personal view: what you lent and what you owe, per expense
  • One ledger of every expense and payment, editable in place
  • Several trips at once, switched from the top-left
  • Built for a phone: bottom tab bar, one-tap settle, skeletons while it loads

๐Ÿ›  Setting up a trip

Only the first person does this. Everyone else just opens an invite link.

  1. Create a blank Google Sheet. This is the trip.
  2. Extensions โ†’ Apps Script. Delete whatever is in the editor.
  3. Paste AppsScript.gs and save. The app's setup screen has a Copy button for it, so you never need this repo.
  4. Run setupSheets once. Pick it from the function dropdown, press Run, and grant the permissions โ€” it is your own script asking for your own sheet. It creates every tab.
  5. Deploy โ†’ New deployment โ†’ Web app, with:
    • Execute as: Me
    • Who has access: Anyone
  6. Copy the /exec URL and paste it into the app.

Open the app and it will walk you through exactly these steps.

๐Ÿ”— Bringing in the rest of the group

Trip menu (top-left) โ†’ Copy invite link. It produces:

https://kothariji.github.io/trip-split/?trip=<the /exec URL>

Anyone who opens it is connected instantly and skips all six steps. The link only accepts script.google.com URLs, so it can never point the app at another host.

โš ๏ธ Anyone with the link can read and write the trip. It is the key to the sheet โ€” share it the way you'd share the sheet itself, and don't post it anywhere public.

Why not Splitwise

Splitwise is good. This exists because a trip's money is a spreadsheet problem, and a spreadsheet you own beats an account you rent:

Trip Split Splitwise
Your data A Google Sheet in your Drive Their database
Account None Required, per person
Cost Free, no limits, no ads Free tier with paid upgrades
Editing outside the app Open the sheet and type Export and re-import
Custom reporting It's a spreadsheet โ€” pivot it Export and hope

Changing the code

The app is served by GitHub Pages from main, so a push to main deploys it.

AppsScript.gs is embedded inside index.html between the gs:embed markers, so the setup screen can hand it out. They must stay identical. After editing the .gs:

python3 - <<'PY'
import io, re
gs = io.open('AppsScript.gs', encoding='utf-8').read()
s = io.open('index.html', encoding='utf-8').read()
s = re.sub(r'\n<!-- gs:embed:start -->.*?<!-- gs:embed:end -->\n', '\n', s, flags=re.S)
block = ('\n<!-- gs:embed:start -->\n<script type="text/plain" id="gsSource">\n'
         + gs + '</script>\n<!-- gs:embed:end -->\n')
marker = '\n<script>\n/* ============================================================\n   CONFIG'
io.open('index.html', 'w', encoding='utf-8').write(s.replace(marker, block + marker))
PY

Existing trips then need Manage deployments โ†’ New version in their own Apps Script editor. The /exec URL stays the same, so no invite links break.

โœ… Checks

What How
Backend maths Run runSelfTest in the Apps Script editor โ€” logs self test OK
Frontend maths Open the app with ?selftest โ€” logs to the console
Syntax node --check on either file

Both self-tests cover the money paths: splits, balances, settle-up, dates, and the personal view. They touch no data.

Data model

Tab Columns
Trip field | value โ€” name, description, startDate, endDate
People name | active
Tags tag | emoji
Expenses id | paidBy | description | amount | tag | splitBetween | splitMode | timestamp | date
Settlements id | fromPerson | toPerson | amount | note | timestamp | date

date is the day the money moved and drives every total; timestamp is when the row was written and only breaks ties within a day.

People and categories are derived from the rows themselves โ€” anyone who appears as a payer, in a split, or in a settlement is on the trip. The People and Tags tabs are just seeds for names you want to see before their first expense.

Columns are matched by the header row, not by position, so renaming case or reordering columns is safe. setupSheets is re-runnable and never overwrites data.

About

๐Ÿงพ A free, open-source Splitwise alternative for trips โ€” split expenses with friends on a Google Sheet you own. No server, no account, no signup.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL