#joao-dashboard-discussion
1 messages · Page 1 of 1 (latest)
Hey @dry palm. I'm happy to chat. Can you clarify what you mean by "mount its dashboard"?
Hey @vivid marten, thanks for getting in touch. I mean, to build the dashboard. For example, the dashboard that I want to build is pretty simular. I have my db with a lot of operations for each user. And I want to show specific informations about this operations
Looking at the network tab, i suspect that the stripe team make one API call for every information (such as net volume chart, gross volume, monthly recurring revenue and so on)
We don't have APIs for this. It's impossible for you to replicate our exact UI with one call, you'd have to build all of this yourself from scratch
The question is, in every API call the stripe team make a query to the db, get the information they need and only then calculate the information that is shown on the screen
Yep, I know, I just want to understand how the stripe team does so I can replicate the way of thinking on my own dashbaord
We have built our own logic to calculate all of this server-side and cache it to render it in the Dashboard
Ok, I see. But you cache the information on db or cache the calculated information?
ok, thanks @vivid marten
Overall you need to decide what you want to replicate. You can't realistically calculate MRR in real time for example, you have to aggregate/pre-calculate/cache a lot of it
same for total volume. It's fine when small but when you get companies with thousands (or millions) of charges a day you can't just run a SUM() on your database, you have to do daily/hourly aggregates and such
does that make sense?
yep! make sense! and helped a lot!