onestop
onestop copied to clipboard
EPIC: Saved Search
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
- user api, micronaut, pac4j integration with OpenID client / login.gov api
- check out this tutorial for some guidance on proper SPA security
- follow these examples for:
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)
- [ ] UI mockups for user landing page, and separate page/sections for:
- [ ] 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 }
Working on CORS support