Skip to content

Frontend Configuration

Meis edited this page Oct 26, 2021 · 1 revision

Environment Configuration

Each environment has its own configuration file. These configurations allow us to modify elements of the runtime application without requiring downtime or redeployment. Some variables, such as filingPeriods, are used across multiple apps (Frontend, HDMA Help) as well as in our automated testing setup. Modify these configurations with caution.

Environment Variables

  • name (String)

    Environment identifier.

  • announcement (Array[Object] | null)

    Controls the 'Announcement' banner displayed on the HMDA landing page. A value of null will suppress the banner. When in maintenance mode, this message text is also reflected on the Filing app .

    [{
       "message": "The filing period is open. Submissions of 2019 HMDA data will be considered timely if received on or before Monday, March 2, 2020.",
       "type": "info",
       "heading": "Announcement"
    }]
    
    type color
    success green
    info blue
    warning yellow
    error red
    null grey
  • defaultPeriod (String)

    The filing period that users will be directed to when clicking a link that takes them to the Filing app, or visit the Filling app directly at /filing.

  • defaultDocsPeriod (String)

    The year that will be highlighted when users click on the DOCUMENTATION link in the page header.

  • filingPeriods (Array)

    An array of filing periods which are accessible to users of the Filing app.

    • Filing App
      • Used to drive the Filing Period drop-down
      • Controls which Filing Periods are accessible via url i.e. /filing/2020 needs 2020 in this array to be reachable by users.
    • HMDA Help
      • Used to determine which Filing Periods are available for administration (creating Institutions, searching Publications/submissions).
    • Cypress Testing
      • Cypress will attempt a Filing for each entry in this array.
    • FFVT
      • Annual entries are used to populate the Filing Period drop-down menu
  • filingQuarters (Object)

    • Used by the Filing app to determine which Filing Periods are open for users to submit data.
    • Used by the Cypress tests to determine what to test for accessible Periods.
    • The filingQuarters.PREVIEW array can contain Filing Periods which we want to be treated as "open" regardless of date boundaries configured in filingQuarters or filingQuartersLate. Filing Periods should also be added to the filingPeriods array.
      • Ex. Opening a Filing Period in Beta (add Period to filingQuarters.PREVIEW and in the filingPeriod array).
  • filingQuartersLate (Object)

    • Used by the Filing app to determine which Filing Periods are open for users to submit data.
    • Used by the Cypress tests to determine what to test for accessible Periods.
  • showMaps (Boolean)

    Feature flag for the Maps & Graphs application

  • maintenanceMode (Boolean)

    A flag used to prevent the user from logging in to the Filing app or attempting new account creations when the backend systems are unavailable. While in maintenance mode, a banner is displayed on the Filing homepage, mirroring the announcement message from the HMDA landing page.

  • filingAnnouncement (Object | null)

    Will display a banner across all Filing app pages to inform users of future events, such as scheduled maintenance. To disable the banner, set the value of this key to null. When in maintenance mode, this should be set to null to avoid duplicate banners.

    "filingAnnouncement": {
        "title": "Scheduled Maintenance",
        "message": "System maintenance is scheduled for Monday",
        "type": "info"
    }
    
    type color
    success green
    info blue
    warning yellow
    error red
    null grey
  • dataPublicationYears (Object)

    • Determines which years are displayed for HMDA Publication products.
    • To configure a specific product, use one of the following keys: dynamic, snapshot, aggregate, disclosure, mlar
      • Ex. If Modified LAR was released ahead of other Publications, we would configure as follows:
        "dataPublicationYears": {
            "mlar": ["2020", "2019", "2018", "2017"]
            "shared": ["2019", "2018", "2017"]
          },
      
    • If a Product does not have a defined configuration, the shared array is used.
  • dataBrowserYears

    The list of years available in the HMDA Data Browser.