I think we have all the pieces in place for you to use:
- a Postgres database with PostGIS
- a Realtime listener for listening to database changes
I don't know if you need realtime though if you are constantly sending the user's location to the database. It might look something like this:
- Turn on PostGIS
- Create a Postgres function which takes in the user's location and calculates radius results. eg: get_objects(lat text, lng text, radius smallint)
- Call this function from the client every XX seconds using the client[0] `supabase.rpc('get_objects', { lat, lng, 10 })
I think we have all the pieces in place for you to use:
I don't know if you need realtime though if you are constantly sending the user's location to the database. It might look something like this: Hope that gives you a few ideas![0] RPC: https://supabase.io/docs/reference/javascript/rpc