#user notifications
1 messages · Page 1 of 1 (latest)
That choice heavily depends on how advanced the notification system you want to implement is.
I usually create separate modules for the stuff not entirely associated with the users entity.
When it comes to a notification feature, it's common to store them in a database or interact with external services to handle push notifications, emails, etc. So, having those actions defined in a separate notifications module makes more sense. It helps me to have isolated business logic and a more organized file structure (feature per module).
If the system you have in mind is not that complex, you might want to create a notifications.service.ts in the users module and probably attach some endpoints to it for simplicity and worry about untangling it as the application grows in the future.
thanks @quick spindle appreciate your time
a very simple but very effective way would be to make use of web sockets
these are pretty fast if not instant
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
Why bring in websockets when you have SSE or simple polling
because it a fast way to update the front-end live
might not everybody's cup of tea tho, it is just A idea
i have said dumber things and you know this all to well 😅