FERNANDO ROCHA FONTELES

Updated 11/2026

← Back to the CV

Projects

Home Share

An app to split a shared home's expenses: everyone logs what they paid and the app tells who owes whom.

Balances screen with example data: house total, each person's balance and who pays whom.

What it does

Home Share is for people who share a house or an apartment. One person creates the house and shares a 6-letter code so the other housemates can join. Each housemate logs what they paid and picks how to split it: equally, by amount or by percentage. The Balances screen shows how much each person should get or pay, and which payments settle everything. It works on phone and desktop, with username and password or Google sign-in, in Portuguese, English, Spanish and French.

  • Split equally, by amount or by percentage, always exact to the cent.
  • Balances with a short list of payments to settle up; marking one as paid updates right away.
  • Several houses with one login, joining with a 6-letter code.
  • Recurring expenses logged automatically, CSV import and export and a shared shopping list.
  • An Activity screen showing who created, changed or deleted each expense.

How it is built

  1. Sign-in with an httpOnly cookie and Google

    The session is a JWT in an httpOnly cookie that page JavaScript never sees. It lasts 30 days and renews itself; "log out everywhere" revokes every token at once, because each token carries a version checked against the database on every call. Google sign-in (OAuth 2.0) with a state check.

  2. Money in integer cents

    All math runs on integer cents. Splitting R$ 100.00 three ways gives 33.34 + 33.33 + 33.33, and percentage splits hand leftover cents to the largest fractions: the total always adds up.

  3. Few payments to settle up

    Balances become a list of payments that starts from the largest amounts; each payment clears at least one person, so n people settle with at most n−1 payments.

  4. 2,184 tests, with a real Postgres in-process

    Vitest with 2,184 tests. The 144 integration tests run on a real Postgres started inside the test process (PGlite), with no Docker or network, and cover tenant isolation: a housemate never sees another house's data.

  5. Versioned database and GitHub Actions CI

    The schema only changes through Prisma migrations. On every PR, CI replays the migrations on an empty database (failing if the schema changed without one), type-checks, runs the tests and builds.

Stack

  • TypeScript
  • Next.js 16
  • React 19
  • Tailwind CSS 4
  • Prisma 7
  • PostgreSQL
  • JWT (jose)
  • Vitest + PGlite
  • GitHub Actions
  • Vercel

Screens