1. Ability to input email address

    1. When visiting a Career website, I should be able to enter my email address
    2. Nice to have: I should receive a confirmation link
  2. Ability to dismiss popup

    1. When visiting a career site, if I don't want to leave my email address I should be able to dismiss the popup. It shouldn't show again the next time I visit
  3. Ability to receive digest of new job openings

    1. Every week, I should receive a digest of all new job openings that opened in the last week
    2. I should only receive job openings from companies I subscribed to
    3. The email should contain the following structure
    Hi there 👋
    Your weekly job digest is here! These companies you follow opened up jobs in the last week:
    **H2 {{Company Name}}**
    - {{Job Opening 1}}
    - {{Job Opening 2}}
    Psst! Since this is a new tool, we'd love to get your feedback. If you would like to see something added, please let us know by replying to this email! 

Technical Flow

  1. Plugin checks whether currentUrl is a Greenhouse URL and if so, shows a popup with an email input field and a submit button
  2. User submits as prop userEmail and companyName
    1. Firebase: check if doc with key userEmail exists. If so, add an new property: companyName: true
    2. If it doesn't, create a new doc in the Users collection
    3. Firebase checks if a key companyName exists in companies. If it does, it updates the subscriberCount.
    4. If it doesn't, it creates a doc with key companyName and adds the properties:
      1. creationDate
      2. subscriberCount: 1
      3. companyURL: {{URL}}
      4. latestJobOpeningsBlurb: {{HTML}}
      5. latestJobOpenings: [ ]
  3. Every week, firebase iterates over all companies and
    1. Calls the Greenhouse API to get latest JobOpenings and saves it to latestJobOpenings: [ ]
    2. Creates an HTML blurb for each new jobOpening since 1 week and saves it to the latestJobOpeningsBlurb section
  4. Every week, firebase iterates over all users and
    1. Creates an email template and
    2. For Each companyName gets the latestJobOpeningBlurb
    3. Sends the email