3 ms·
Your use-case is a bit novel, so it might be worth asking in our forum to make sure I haven't misunderstood your requirements: https://github.com/supabase/supab
by kiwicopple 5y ago
Your use-case is a bit novel, so it might be worth asking in our forum to make sure I haven't misunderstood your requirements: https://github.com/supabase/supabase/discussions https://github.com/supabase/supabase/discussions
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 })
Hope that gives you a few ideas!
[0] RPC: https://supabase.io/docs/reference/javascript/rpc https://supabase.io/docs/reference/javascript/rpc
- swman 5y agoThanks! That's awesome. I made a lot of progress yesterday with supabase, setting up some tables and auth :D I really like it, and I'm going to keep maintaining a secondary project with it just to keep up with all the good work. Seriously, all the best!