srbhr / Resume-Matcher

Resume Matcher is an open source, free tool to improve your resume. It works by using language models to compare and rank resumes with job descriptions.
https://www.resumematcher.fyi/
Apache License 2.0
4.72k stars 1.86k forks source link

feat: render save service keys on web app ui #135

Closed Sayvai closed 10 months ago

Sayvai commented 10 months ago

Render and Save Third Party Service Keys (API Keys and URL) on Web App UI

Description

There is a requirement to allow users to securely enter and save third-party service keys (and URLs) to be able to work with the overall app (once the backend scripts are later to be completed).

Implemented new feature to allow users to view the required configurable service keys (and urls) to set, on the web app UI.

The configurable required service keys data is dynamically derived from the backend master YAML config file (located in /scripts/similarity/config.yml), and its actual pre-saved secret key values derived from a localised programatically created git-ignored YAML secrets config file (located in /scripts/similarity/config.local.yml).

Whenever a key is no longer required by the app, then it is safe to remove key from the master config file, and in turn this key and any pre-saved secret value will no longer render on the web UI.

If a secret has yet to be set for any of the required keys, then the value will fallback to the default placeholder value defined in the master YAML config.

Related Issue

N/A

Type

Proposed Changes

Screenshots / Code Snippets (if applicable)

Annotated GIF demo of the new feature, showcasing the third-party service keys UI and backend secrets yaml config being created, and holding the secrets, while the master YAML config is safely left untouched.

Resume-Matcher-Web-App-UI-Feature-Add-Service-Keys-2

How to Test

  1. Run the web app (follow instructions from webapp/README.md), and wait for the frontend and backend servers to completely load
  2. Open http://localhost:3000/ in a new browser tab
  3. Replace the existing placeholder service key values from the top of the web app UI page with your own, or any other example values (see example GIF attached to this Pull Request above)

Checklist

Additional Information

⚠️ Because the actual secrets are programatically and safely saved to local file /scripts/similarity/config.local.yml, then any pre-existing Python project scripts which referenced to /scripts/similarity/config.yml to previously retrieve hardcoded secrets, should be refactored to check for existence of saved user secrets from secrets YAML config file /scripts/similarity/config.local.yml to programmatically retrieve secrets from there instead, otherwise fallback to master YAML config file /scripts/similarity/config.yml.