Next.js Discord

Discord Forum

Where should I store my user's balance?

Unanswered
! nolikas posted this in #help-forum
Open in Discord
I need a recommendation to where I should store my user's balance (Game money), so I can quickly access it in server and client components. Is it the Session or in API Route? I don't really know where, just give me the best option for that. Thanks!

7 Replies

I use postres (from Supabase) to save my chat messages and also save user login data
@Anay-208 If game is online game
yup, all on web
So like after every game, I connect to db and just update the balance?
Also to get the balance, always fetch it from database?