Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Oct 19, 2024

Conversation

scastiel
Copy link
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
1 check passed
@scastiel scastiel deleted the trpc branch October 19, 2024 21:42
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