alextana
Explore posts from serversTTCTheo's Typesafe Cult
•Created by alextana on 3/24/2025 in #questions
user data encryption
thanks, this is really helpful! I will look into these 👍 it's a whole area I've never looked into before, all this stuff gets managed by other people at work hah!
11 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/24/2025 in #questions
user data encryption
thanks! Looking at E2E as well and I'm keen to try that out at some point, for now I'll go with this 😄 - the only thing I don't like about this approach is the key management, but it's definitely more than at the moment!
11 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/24/2025 in #questions
user data encryption
(this is all for a side project btw, non production or work code - just exploring)
11 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/24/2025 in #questions
user data encryption
hey all, thanks for the replies - I looked into it more, I will probably use hashing for comparing data and other optimisations, I wanted to not store user data in plain text in the database, that's the only problem I was trying to solve
I ended up using crypto-js AES to encrypt the data server side, just before sending it to the DB, with an environment variable as the key, then when I need to read it in the front-end it gets decrypted when fetching from the endpoint (also server side)
seems to work but I don't know if there are any potential issues with it yet
11 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
just pushed a first prototype here if you're interested: https://github.com/alextana/dragdrop-lib / demo: https://dragdrop-lib.vercel.app
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
thanks by the way, very helpful!
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
ah I think I've seen his previous video hahah
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
I've always used them interchangeably, like, if I used interface somewhere else I'll use interface again kinda thing
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
what's the reasoning behind it?
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
ahh! yeah, it's also less confusing, thanks 🙂
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
good point
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
it'd basically be a collection of lists - I guess actually I need to take into account that someone might want to pass only one list
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
yeah
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
In the end I solved by doing something like this:
There was a gotcha with Vue's reactivity that needed sorting out but it now seems to be behaving as expected
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
Thanks!
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
Yeah fair point - I’ll do some more reading about generics
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
then whatever else people pass in that object I don't really care
30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
I can then check if at least
id
is present in every item of the list at runtime30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
I have a function like:
export function useDragDrop(items: Array<object>) { // do stuff }
what I need to define is that object type, but I think type object is probably good enough as I was reading here: https://stackoverflow.com/questions/18961203/any-vs-object30 replies
TTCTheo's Typesafe Cult
•Created by alextana on 3/1/2023 in #questions
Unknown-ish types
what I would like to say is -
const list = Array<MyType>
but my type is kind of unknown, I don't really know what people are going to have in their lists, is it generics I need to look at? Cause any
is not really acceptable, don't want people sending up something that's not an object without at least an id
30 replies