Hi @KAD9_911 you just need to store the lat and long of does users in the database and then do a query that retrieves the users within a range of lat long that you set. There are lots of videos and examples online.
In terms of the database, I would say Firebase is perfect for this. You have real-time updates of the user location at a very low price and it is optimize for apps like this.
You can use any of the databases, but I would recommend Firestore. I’ve worked with the real-time database since the begining and now I’m changing to Firestore, the collection/doc system is much more practical and easy to maintain, and in my opinion at one point the will pivot everything to Firestore. They are giving much more attention and functionality.
But you said there are other criterias for the query’s, and Firebase has its limitations over other db like graphQl. So open a test project and test some query’s with the params you need and see if you can make it work.