onestop icon indicating copy to clipboard operation
onestop copied to clipboard

EPIC: Saved Search

Open zebdelk opened this issue 5 years ago • 1 comments

Summary

As a Person with login.gov
I want to be able to save my searches within the app
So that I can bookmark across browsers

Description

Eventually create a login-based feature that can be expanded and built from in the future. This feature requires no roles, as anyone with a public login is allowed to use it.

Authentication Mechanism

Consider storing our own user states in the following ways:

USER.USERS
id  | createdDate | updatedDate | lastLoginDate | 

Research Tasks

  • [x] micronaught / quarkus research
  • [x] Spike: ksqlDB
  • [x] Gateway api

Database Tasks

  • [x] Persistence - backend store for saved searches, favorites, etc #1148
    • [x] PostGreSQL ? (see ideas below)
    • [x] well-defined schema, bootstrap data
    • [x] table that saves userid, name, url, where name is a user-provided label for the saved search and url contains the context (collection vs granules) and query parameters needed to recreate the search

UI Tasks

  • [x] UI / wireframes #1185
    • [ ] UI mockups for user landing page, and separate page/sections for:
      • saved searches
      • cart
      • CAS-features (dashboards)
  • [ ] make a user /dashboard only allowable to be seen by logged-in users
  • [ ] add UI components, reducers, and actions associated with saving searches
  • [ ] a star button or similar at the top of searches to save (prompts to log in? only available if logged in?)

Service Tasks

  • [x] Add REST endpoint to save searches / remove saved searches (by db id) #1184
    • [x] user service backend (DB) required
    • [x] a way to view saved searches (see mockups for user / saved search page ideas, or via hamburger menu?)
    • [x] a way to delete saved searches

Move this task to security epic -> api gateway pattern

  • [x] replace spring security with pac4j OBE

Saved Searches

  • First rough-pass could simply save the url (or the JSON serialized filter state which derives it)
  • one of these "saved" could be as simple as a row in a PostGreSQL for the login-gov id (not email)
USER.SAVED_SEARCHES (LIMIT per user_id = 100)
id  | user_id       | name             | description?                                        | filter
123   456             "Jurassic Park"    "OneStop Search for Michael-Crichton-related data"  | { JSON }

zebdelk avatar Jan 08 '20 17:01 zebdelk

Working on CORS support

dneufeldcu avatar May 18 '20 21:05 dneufeldcu