I'm in charge of a full stack D8 (customer requirement) based project. It's mostly a Leaflet's web mapping application. The Leaflet part itself is almost done and it looks beautiful, fast and powerful. I let you know the URL once it gets released to the public.
Ahead comes a sprint ... This is the basic requirement of this phase:
- The map is made of several, user switched feature layers.
- Some of these layers receives regular updates, for instance: parties in the neighborhood announced witin the last week, two weeks and a month.
- The 'parties' entity is stored in several mapserver endpoints (typically a REST service throwing GeoJSON out). Each period (week, two weeks, month) have its own endpoint.
- Users (not Drupal users, subscribers only) draw an area in the map and 'subscribe' to the events announced on that area. By 'announced' I mean: points occurring within the user selected area.
- At some specific time, my application is going to check the interesting points in the user defined area to send that out to the subscriber.
I forecast lots of challenges here. This is what I came up with to this very moment:
- Create a content type with at least an email field and geofield support to store the points of the location area drawn by the user and her email (sort of a 'subscription backend').
- Compose a new view to expose these subscriptions in some serialized fashion.
- Code a helper script (bash, php, python) that is going to consume this D8 view and get the updated data from the mapserver endpoint.
- Using cron and possibly Message Stack (yeah, yeah, I know, still in dev for D8...) to deliver the message for the final recipient.
This is an example of the entire use case:
In the right toolbox, look for the exclamation sign icon. This is the alert function of that map. Draw a line, enter your email and bang!
There are lots of other requirements for this use case (mobile friendly html emails, screenshots of the map with the 'parties' points and previously drawn area overlaid and such), but for know I'm concerned only with the most basic functionality: to store subscribers, their location of interest and how to transform this in some useful data for their mailboxes.
So, what are your thoughts? Anybody out there already faced this task? Any tips?
I don't need code (nor rejects if you wish). Any insights on a elegant way to get things done right? Oh, the less 3rd party modules, the better. Core ones are ok.
EDIT: the new Courier module (D8 only) just came to my attention. It looks like a good contender to Message Stack in the message delivery front.