B-Open / jobbuzz

Brunei job search database and alert notification
https://jobbuzz.org
MIT License
1 stars 1 forks source link

Job notification subscription feature #57

Open dsychin opened 2 years ago

dsychin commented 2 years ago
dsychin commented 2 years ago

Database

General flow

  1. User sets filters and subscribes to new job notifications
  2. New batch program checks db for newly added jobs and add to notif_queue if job matches filters
  3. Another batch that runs daily checks subscriptions and log for jobs that are due to run. Gets the list of jobs to notify about and include in notification.

User should be able to view the notif_queue in the web app so that they can see the list of jobs that they were notified for?

dsychin commented 2 years ago
sequenceDiagram
    Participant User
    Participant Jobbuzz
    Participant FCM

    User->>Jobbuzz: Subscribe to push/email notification
    Jobbuzz-->>User: OK
    loop Every hour
    Jobbuzz->>DB: Check for new jobs since last processed
    DB -->> Jobbuzz: Found new matching user's filters
    Jobbuzz->>SMTP: Send emails if subscribed
    SMTP-->>Jobbuzz: OK
    Jobbuzz->>FCM: Send webpush if subscribed
    FCM-->>Jobbuzz: OK
    Jobbuzz-->>DB: Log results
    DB-->>Jobbuzz: OK
    end