Skip to content

Push server component of the alertR alarm and monitoring system

License

Notifications You must be signed in to change notification settings

sqall01/alertR-Push-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

alertR Push Server

The push server component of the alertR alarm and monitoring system. The service can be used by registering an account at alertr.de and following the setup instructions. If you are searching for a detailed description of the push service design, please read the pages in the official alertR Github Wiki.

The directory "service" contains the server part and the directory "website" contains the registration website for the service.

The service needs the following tables in the MySQL database:

CREATE TABLE IF NOT EXISTS users (
    id INTEGER PRIMARY KEY AUTO_INCREMENT, 
    email VARCHAR(255) NOT NULL UNIQUE, 
    active BOOLEAN NOT NULL);

CREATE TABLE IF NOT EXISTS acl (
    users_id INTEGER NOT NULL, 
    acl INTEGER NOT NULL, 
    PRIMARY KEY(users_id, acl), 
    FOREIGN KEY(users_id) REFERENCES users(id));

CREATE TABLE IF NOT EXISTS tokens (
    users_id INTEGER PRIMARY KEY, 
    token VARCHAR(255) NOT NULL, 
    timestamp INTEGER NOT NULL, 
    expiration INTEGER NOT NULL, 
    FOREIGN KEY(users_id) REFERENCES users(id));

CREATE TABLE IF NOT EXISTS passwords (
    users_id INTEGER PRIMARY KEY, 
    password_hash VARCHAR(255) NOT NULL, 
    FOREIGN KEY(users_id) REFERENCES users(id));

CREATE TABLE IF NOT EXISTS bruteforce_info (
    id INTEGER PRIMARY KEY AUTO_INCREMENT, 
    users_id INTEGER NOT NULL, 
    addr VARCHAR(255) NOT NULL, 
    counter INTEGER NOT NULL, 
    last_attempt INTEGER NOT NULL, 
    blocked_until INTEGER NOT NULL, 
    FOREIGN KEY(users_id) REFERENCES users(id));

CREATE TABLE IF NOT EXISTS statistics_send (
    id INTEGER AUTO_INCREMENT, 
    users_id INTEGER NOT NULL, 
    addr VARCHAR(255) NOT NULL, 
    channel VARCHAR(255) NOT NULL, 
    timestamp INTEGER NOT NULL, 
    PRIMARY KEY(id, users_id, timestamp), 
    FOREIGN KEY(users_id) REFERENCES users(id));

Support

If you like this project you can help to support it by contributing to it. You can contribute by writing tutorials, creating and documenting exciting new ideas to use it, writing code for it, and so on.

If you do not know how to do any of it or do not have the time, you can support me on Patreon. Since services such as the push notification service have a monthly upkeep, the donation helps to keep these services free for everyone.

Patreon

Patreon

Paypal

Donate

About

Push server component of the alertR alarm and monitoring system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published