split

split is a web app to keep track of group expenses on short travel trips with friends.

In my time travelling overseas with friends I found it was a real hassle to keep track of group expenses accurately. Commercial solutions exist, but as a broke student who will only use this infrequently paying for such services isn't great value.

spit is built with the following considerations in mind:

  • Convenience. It's designed as a web based app relying on shareable group links. No need to download an additional app or sign up for any accounts.
  • Privacy focused. No personal data shared, password protection for peace of mind.
  • Mobile first.
  • Self-hostable on Vercel's free hobby tier plan.
Screenshots create group page overview page add expense page settle debts page settings page

Setting up locally

  1. Start the postgres container.
docker-compose up -d
  1. Install dependencies.
npm ci
  1. Create .env file in root of project with the following config.
POSTGRES_DATABASE="postgres"
POSTGRES_HOST="localhost:5432"
POSTGRES_PASSWORD="postgres"
POSTGRES_PRISMA_URL="postgres://postgres:postgres@localhost:5432/postgres"
POSTGRES_URL_NON_POOLING="postgresql://postgres:postgres@localhost:5432/postgres"
POSTGRES_USER="postgres"
PASERK_SECRET="k4.local.<key>"

Replace <key> with your secret key in base64, e.g. k4.local.dZMqv8IrpKAfR8Hzg+twrXL8KNO57Pt7cFP5W0UyYyQ=

  1. Synchronise prisma schema with database schema.
npx prisma db push
  1. Run the development server.
npm run dev

Deploying on vercel

  1. Deploy project on Vercel and set up Vercel storage (postgres), ensuring that the region the serverless functions are located in is close to the region the db is hosted.

  2. Add environment variable PASERK_SECRET.

  3. Initialize db schema using prisma db push.