#joao-dashboard-discussion

1 messages · Page 1 of 1 (latest)

vivid marten
#

Hey @dry palm. I'm happy to chat. Can you clarify what you mean by "mount its dashboard"?

dry palm
#

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)

vivid marten
#

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

dry palm
#

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

dry palm
vivid marten
#

We have built our own logic to calculate all of this server-side and cache it to render it in the Dashboard

dry palm
#

Ok, I see. But you cache the information on db or cache the calculated information?

vivid marten
#

it depends on the views

#

I won't be able to tell you exactly how we built it sorry

dry palm
#

ok, thanks @vivid marten

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?

dry palm
#

yep! make sense! and helped a lot!