jannis.gg
TTCTheo's Typesafe Cult
•Created by jannis.gg on 12/8/2023 in #questions
Completely handle Data Refreshing on client-side using TRPCs setData()
Hello Guys,
I am currently developing a side project where users can set up Contacts, Projects and Tasks which can then be linked together.
Now, all three have their own page and Data Table. There is also a Dashboard where I fetch all the data to show some graphs etc.
What I am doing right now is to fetch all entries of the user and cache it for an hour. Then, when a user creates, makes changes or deletes an entry, it is updated in the related entries as well. (pushed, updated, removed) So I fetch all the entries at the start of the user's session and later just refresh it client-side.
As I am building some subpages for e.g. a specific project entry, I noticed that the structure might not be as smooth as I thought. For example, when I want to get all the tasks for a specific projects, i grab all the tasks (which are cached and thus avoid a refetch) and filter out these with the specific project id.
Is this the right approach I am doing? Should I go to traditionally re-fetching and invalidating the data as soon as something has changed? My thought is that if you e.g. edit a task which is related to a project, I don't like the idea of refetching the whole project table in order to display the changes
2 replies
TTCTheo's Typesafe Cult
•Created by jannis.gg on 12/6/2023 in #questions
Store Bank Account Information in Database
Hello, after some research and no clear path in front of me I would like to ask how I should manage storing bank account information in my database.
In my app, users will be able to generate invoices. For that, they need to enter their bank account data so it can be displayed in an invoice.
I am using this stack + MySQL with Prisma on PlanetScale. PlanetScale states that their data is encrypted, but I guess this is not enough and it should be encrypted also on the database level. I have also thought about using an external provider where i can send and receive the data via an API, but except for Hashicorp Vault i haven‘t found anything.
Would appreciate your help! Thanks in advance
3 replies