vlado / earthquake-croatia

Code for app hosted on https://www.potres-petrinja.hr/ used for helping people in need during the earthquake crisis in Croatia
15 stars 13 forks source link

Sync with https://potres2020.openit.hr/ #98

Open vlado opened 3 years ago

vlado commented 3 years ago

https://potres2020.openit.hr/ is an app that is meant for government and expert to coordinate where the help is needed. It is built using Ushahidi. Open source web application for information collection, visualization and interactive mapping. It helps you to process that information, categorize it, geo-locate it and publish it on a map.

They have a lot of data that we could pull in our app (cron/scheduler that would pull regularly) and we have a data that we could submit there (Background job after ad is created).

This should be 2 endpoints that we need to ping:

Resources:

UPDATE: just learned that we could maybe use Webhooks instead of pulling the data https://docs.ushahidi.com/platform-developer-documentation/tech-stack/connected-app-development/web-hooks

markopavlovic commented 3 years ago

@vlado Happy to help! Since we were and will be getting more and more of these requests and initiatives to sync with other platforms - one idea on top of my mind is if we would get up a "proxy" API that would be holding all our ads with unique ids and a unified model, then anybody can build its own system to push/pull data from it? It would definitely be some overhead to do it, but it would ensure we don't dig in systems that lock each other inside and anybody can utilize the data in any way they find it helpful. cc @fsuste

vlado commented 3 years ago

👍 for building the API.

I think It would even be easier to build API on our side then using potres2020 API cause it is a bit messy but unfortunately they just installed the software and do not have a way to code something that would pull from other apps.

berislavbabic commented 3 years ago

We have to make sure we don't pull the ads we already have, be it with the combination of phone number/city or something similar and/or having a uuid that we'd generate on our side and store there when we create new ones via their api?

Also I think we'll have to start geotagging our ads properly (with gmaps api or something similar, which will add overhead costs to the project if we have to start paying for the maps api)

vlado commented 3 years ago

Implementing the gmaps api doesn't look difficult https://gorails.com/episodes/google-maps-places-autocomplete-with-rails?autoplay=1 only question is pricing.

dpoldrugo commented 3 years ago

Hi guys! You can use this to receive events from potres2020: Potres2020 Event Subscription API

As far as I know there is still a problem with syncing back to potres2020 with your data, but if you store the potres2020 post id along with your post, the back-sync can temporarily be done via Integromat. If you send this id and the most recent state of your post, we can then build another Integromat "scenario" which will receive your events and forward them to a Telegram group monitored by the moderators. They will manually apply these changes for now. @grozdanowski is already using this flow.

Here you can see how looks one flow for this kind of sync-back, made on Integromat: Selection_217

And this is how it looks the message in the Telegram group: Selection_216

Ping me for any questions that you might have. Thanks, Davor

vlado commented 3 years ago

Thanks @dpoldrugo

We will check it out.