How can a blockstack app store a list of the user.ids who have signed in

I understand that blockstack is built around the idea that users own their data.

However, I would like to be able to show some public activity of users to other users.
To start I would just like to be able to show who else has signed in and when.

Is there a way for the app itself to store data through Gaia or would I have to build an integration into firebase or some other form of centralized cloud storage?

1 Like

For your problem, I would recommend you implement multiplayer-data-storage for the “public activity”, as it would only be shared between users who grant each other the permission to read the data.

If it must be public, I believe you can store information on a user’s gaia storage unencrypted and therefore public (case in point: the zone file profile.json), though someone else would have to tell you more information about that because I do not have experience writing apps.

Thank you, this tutorial explains how one can set aside public data for others to view, if they looked you up through your block stack id. However I still have the open question of how you would know who to look up.

For example:
If player A posts a status as public and player B logs on the next day, how would it be possible for the blockstack app to show player B the status of player A without asking player B to search for player A’s public data?

Anyway to search for users who have agreed to share public data on your application?
This would be extremely useful.
Otherwise I feel that developers would be forced to store at least some user data in centralized cloud storage to enable lookups.

1 Like

Couldn’t you keep track of your friends (or contacts) by just puting a friends: [ friend1.id, friend2.id ] field in the data you’re storing on the user’s gaia? You will still have to “look up” the other person’s data, but you don’t have to “search” for it every time, though.

Core team will add search feature to the Gaia. I think for now, there is no way to do it o2m and m2m relationship and list data publicly. I’m dogfooding now, built a super simple blockchain to keep relations.