
For your use-case I'll create collection that no user has reading access, and each user will get reading access to is own.
That means no one get writing access.
So, all the writing access gonna be through a function.

Is this make sense?

yeah but I can use nodejs instead of functions right or would you recommend against that?

You mean access node-appwrite
using your nodejs project?

Yup

That will great.

I've suggested function because the is most-common

But any server side logic is good

alright and how would I for instance store it?

just a integer or is there something that is more "secure" that you know of

Mmm, You mean in case someone gained access to your database?

yeah

I think at the end even banks use Integer (float) for the amount value.

I don't think putting it behind some secret-logic will make it more secure.

Hmm yeah prob I am overthinking it

Just make sure to protect the database.

Yeah that wouldnt be too hard

Like, I assume that if someone got access to your Appwrite, then the attacker will grab or change other stuff.

It's a right way of tackling it Let me check something.

From what I see in that topic The best logic be like that, You'll have two collections
The Wallets collection that will simply have
- wallet_id
- user_id
Then the Transactions collection that will have
- wallet_id
- amount (minus or plus)
And the wallet value will be the sum of all the transactions documents, So in start you'll give each user for example plus transaction with 100

Oh yeah thats way smarter to calculate the transactions then just store it as a integer

Of course you can add more attributes to the trabnsaction table so it easy to track

Yeah

Thanks!

[SOLVED] How should I save a instore wallet in Appwrite
Recommended threads
- CSV Import not working
I am running 1.7.4, trying the sample book csv import. I get a pop up saying import started and then a quick follow up saying completed. Nothing ever appears ...
- ❗[Help] Function stuck in "waiting" stat...
Hi Appwrite team 👋 I'm trying to contribute to Appwrite and followed the official setup instructions from the CONTRIBUTING.md guide to run the platform locall...
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
