Giter Site home page Giter Site logo

kartevonmorgen / kvm-email-notification Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 578 KB

This Notification Service sends mails to new entries, when they are added to openfairDB.

License: GNU Affero General Public License v3.0

SCSS 1.68% HTML 0.18% JavaScript 1.70% Dhall 2.57% PureScript 93.87%
karte kartevonmorgen mapping notifications openfairdb

kvm-email-notification's Introduction

Karte von morgen

Screenshot

Mapping for Good

von morgen supports kindness, sustainability and joint action. Everything that brings a little happiness to our world. We believe that living in a de‐stressed, environmental‐friendly and trust‐worthy society, is already in progress. We want to support people in finding ways to embrace those values.

The Map von morgen is a website and app, that allows users to share their favorite places in the world. Places that are forward‐thinking and inspiring. The goal is to collect projects, companies and events that make a world of tomorrow, already experienceable today.

Website: https://kartevonmorgen.org/

Development

Build Status License

Are you're interested in contributing to KVM? The following is a description of a quickstart. If you're looking for a more comprehensive introduction, have a look at CONTRIBUTING.md.

Dependencies

To be able to start development you'll need the following tools:

Now clone this repository:

git clone https://github.com/kartevonmorgen/kartevonmorgen

Go to the root of it and install all the dependencies:

cd kartevonmorgen/
yarn install

Build

To build the web application run:

yarn run pack

The result can be found in dist/.

Deployment to another URL than www.kartevonmorgen.org

running

yarn run pack-beta

will automatically use https://api.ofdb.io as API url (instead kartevonmorgen.org/api - which will only work when also deploying to production).

Development

You may either use a remote instance of the OpenFairDB server or start your own instance locally.

Remote OpenFairDB server

The easiest way to get a local setup running is by using the remote API of OpenFairDB. To do so change src/constants/URLs.js to

OFDB_API: {
    //link: window.location.origin + "/api" //use when you run openfairdb locally
    link: window.location.protocol + "//" + "api.ofdb.io/v0" //use this to use the remote api
}

Don't forget to skip those changes later when comitting or revert them before starting a local server instance as described next!

Local OpenFairDB server

The alternative is to run OpenFairDB server locally. A static executable for all recent versions is available on the OpenFairDB Releases page.

Download, unpack and run (on Linux):

wget https://github.com/kartevonmorgen/openfairdb/releases/download/v0.5.5/openfairdb_v0.5.5.x86_64-unknown-linux-musl.tar.xz
tar xJf openfairdb_v0.5.5.x86_64-unknown-linux-musl.tar.xz
RUST_LOG=info ROCKET_PORT=6767 ./openfairdb

openfairdb should be listening on port 6767. Stop the server for finishing the initial setup.

Database setup

The file openfair.db with an empty SQLite3 database has been created during the first startup in the current working directory. This empty database needs to be populated with 3 categories that are referenced from the frontend by their ids.

For this purpose start your favourite SQLite3 management tool, open the openfairdb.db file and execute the SQL statements in res/init_openfairdb_categories_de.sql. You can also accomplish this task with the SQLite CLI tool:

sqlite3 openfair.db < res/init_openfairdb_categories_de.sql

The actual names of the categories in the database do not matter, but you may translate them into your preferred language.

Now restart the server again and keep it running in a terminal to monitor the logs:

RUST_LOG=info ROCKET_PORT=6767 ./openfairdb

Web app

Get the web app running:

cd /path/to/kartevonmorgen/
yarn start

The web app is now listening on port 8080. Open it in your browser https://localhost:8080. Ignore the security warning that is caused by a self-signed certificate in the local proxy.

On every file change in src/, the app will be build for you and the browser reloads automatically.

Tests

All the tests can be found in the spec/ folder. To run the tests type

yarn test

Backend

KVM uses the OpenFairDB as its backend.

License

This project is licensed under the AGPLv3 license.

kvm-email-notification's People

Contributors

magdaddy avatar wellemut avatar

Watchers

 avatar  avatar  avatar  avatar

kvm-email-notification's Issues

D. a) Send yearly reminder to update or archive entry

Microservice (Cronejobe mit Admin-Acccount für Backend) aufsetzen, der checkt, welche Einträge seit einem Jahr nicht mehr aktualisiert wurden, deren Status auf unconfirmed setzt und eine Mailnotification an den Eintrag auslöst

Problem

After 5 years of running this map we have a lot of outdated entries there

Solution

  • If an entry was not updated or modified for W (=365) days, write an email (same way like when they are added kartevonmorgen/openfairdb#333) to the entry-mailadress, that it was not modified or rated since W (=365) days, with title: Please update your entry now!

Mail contains:

Um das Mailtemplate anpassen zu können braucht es ein Editor, wie jetzt schon auf https://kvmmail.shiv.uber.space/ für die Begrüßungsmails.

  • If an entry was not updated or modified for X (=400) days, send an email to the pilots: #3
  • Take out the colour of the pin and just leave the contour, if the entry was not edited for X (=690) days (-> frontend issue) kartevonmorgen/kartevonmorgen.ts#139

Steps

Update-Reminder and DB-Processing are complete independent steps:

Update Reminder

  1. Microservice (Cronejobe mit Admin-Acccount für Backend) that checks the last editing-dates of entries -> if more than one year not edited -> set entry as "uncomfirmed"
  2. If status set to unconfirmed -> Mailingservice sends mails first to entries -> ask to confirm or update or achive (Mailgun ist schon eingereichtet) kartevonmorgen/openfairdb#202
  3. If 400 days uncomfirmed and not edited -> send to pilots (Connected to Algorythmus of Subscriptions) -> ask to confirm or update or achive (kartevonmorgen/openfairdb#166) 1Tag

Independently the frontend will grey-out outdated pins

  1. Datenbank so einstellen, dass Einträge, die seit über 800 Tagen nicht beantwortet wurden, auch nur noch grau sind.

Notifications still come, although abo is stopped

Das Abonnement habe ich schon vor einer Weile beendet und habe auch nochmal nachgeschaut. Da ist nichts eingetragen.

grafik

Die Änderungsmails bekomme ich aber auch trotzdem noch.

Ins Admin-Backend komme ich auch rein.

LG E

Solution

kartevonmorgen/openfairdb#45 ?

Weitere Problemanalyse


Ahh, das ist interessant.

D.h.
  •     Sie konnten sich einloggen mit Mailadresse und Passwort?
    
  •     Sie konnten ihr Abonnement beenden?
    
  •     Sie bekommen auch keine Mails mehr bei Änderungne in Ihrer Region
    
  •     und dennoch kommen die "Ist der Eintrag noch aktuell" mails weiterhin?
    

    Danke für die Hilfe bei der fehlersuche.

    Lg

    Helmut

Helmut Wolman 

    Hallo E

    An einem einfachen "Unsubscriebe" Link arbeiten wir  noch.

    Bitte nutze den login auf dieser Seite https://v0.kartevonmorgen.org/ um dein Abo zu löschen. Hast du das schon versucht?

    falls es nicht klappt, melde dich bitte wieder.

    Herzlichen Gruß

    Helmut
 E :
    Hallo,

    ich habe versucht mich von den Mails abzumelden, aber ich bekomme sie immer noch.

    Bitte löscht alle meine Daten.

    LG E

D. b) Update-Erinnerung für Regional- und Themenpilot*innen einrichten

Mailnotification für Regional- und Themenpilot*innen einrichten, für Einträge, die nach 400 Tagen immer noch nicht aktualisiert wurden

  • Second step after: #2
  • Based on subscriptions on the map

if x=400 days an entry was not changed than:
-> Write a mail to anybody who has subscribed to the area (or the topic kartevonmorgen/openfairdb#258) and to all who have updated the entry in the past. (kartevonmorgen/kartevonmorgen#635)
Title:

Next Issue


Issues which should be included:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.