Skip to content

Add tRPC, use it for group expenses, balances and information page#246

Merged
scastiel merged 3 commits intomainfrom
trpc
Oct 19, 2024
Merged

Add tRPC, use it for group expenses, balances and information page#246
scastiel merged 3 commits intomainfrom
trpc

Conversation

@scastiel
Copy link
Copy Markdown
Member

@scastiel scastiel commented Oct 19, 2024

This PR bootstraps a tRPC API for the project. The idea is to progressively move all the calls to the database in this API for better separation of concerns.

When this migration is finished:

  • It will be easier to implement local-first features
  • It will be easier to consider moving to another storage than PostgreSQL database
  • It will make it possible to develop alternative frontends for the app, e.g. a mobile app

Note that it doesn't necessarily means leaving React Server Components, as it is totally possible to call a tRPC API from the server. But with the goal of making the app usable offline, we might make it client-only.

This PR also uses the new tRPC API for the expense list, balances and group information page,. It handles pagination (infinite scroll) as well as filtering on the server (so that the API returns only the matching expenses).

@scastiel scastiel mentioned this pull request Oct 19, 2024
@scastiel scastiel changed the title Add tRPC, use it for group expense list Add tRPC, use it for group expenses, balances and information page Oct 19, 2024
@scastiel scastiel merged commit 66e15e4 into main Oct 19, 2024
@scastiel scastiel deleted the trpc branch October 19, 2024 21:42
Lipkin10 pushed a commit to Lipkin10/Split-AI-first-version that referenced this pull request Jul 30, 2025
…pliit-app#246)

* Add tRPC, use it for group expense list

* Use tRPC for balances

* Use tRPC in group information + better loading states
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant