Hey folks, my application fetches a user's bank transaction data, shows it to them, and asks them to select relevant transactions (e.g. monthly payments). I want to save the selected transactions, but not save the rest of them (to minimise data retention). I'm trying to figure out the best way to design this in Elixir/Phoenix. So far my ideas are:
- Store all transactions in the database, then remove the ones that aren't selected, paired with a task that deletes old transaction records in case the workflow is abandoned by the user
- Store all transactions in an ETS table / Cachex, and verify the user's selections before persisting the selected records into the database
- Fetch the transactions twice: before presenting them to the user, and again after the user makes their selection
- Sign each transaction with a secret key, and have that signature included in the user's selection, which I'll use to verify the transaction data hasn't been tampered with before saving to the database
Is there a more tried-and-tested approach for something like this? Or does one of the above sound reasonable?