Websocket advice nextjs-nestjs
Hi everyone,
I'm currently working on a Point of Sale (POS) web app that is primarily used on Samsung tablets with a special browser called Star WebPRNT. This browser is required for receipt printing functionality.
Recently, I started developing a QR code scanning feature to scan vouchers and apply discounts for customers. The feature works perfectly on Chrome, but unfortunately, it doesn't work in the Star WebPRNT browser, which is quite frustrating.
To work around this, my team and I decided to move the QR code scanning feature to a separate page that will be accessed via Chrome (or any browser other than Star WebPRNT). When a QR code is scanned, it should notify the app running in the Star WebPRNT browser about the scanned voucher data. We plan to send this data via WebSockets and then set it in the React state.
Here's the setup we envision:
- Main POS app:
https://ourproject.vercel.app/
(running in the Star WebPRNT browser)
- QR code scanning page: https://ourproject.vercel.app/scan-voucher
(running in another browser, like Chrome)
Both pages will communicate with each other via WebSockets.
My question is: What WebSocket service would you recommend for this setup?
The company I work for doesn't want to use AWS, even though we have used it in the past. So, I'm looking for alternatives.
Additional context:
- The app is built with Next.js and communicates with a NestJS backend.
Any advice or recommendations would be greatly appreciated! Thank you.0 Replies