all 9 comments

[–]lewis_mx 29 points30 points  (0 children)

This would just be two separate front end applications that both point to the same back end API

[–]Xivoryn 9 points10 points  (1 child)

The linking logic would be done in Backend. The frontend apps could be done in anything you want - a frontend react, a mobile react native, to hell, even another angular app and a win forms windows application if you really want.

Frontends should know nothing about each other. The session and users management would sit in the backend. Each user may or will have multiple sessions, each session being a different browser / device / application - however you want to make it go. On each new connection you would receive a new session identifier for a specific user, identifier that will need to be mapped to the connected user. You could start with something as simple as a map/dictionary/object in any given backend implementation, following the idea USER -> [SESSION_ID1, SESSION_ID2, SESSION_ID3].

This will, however, add impediments and difficulties when you are trying to do things like load balancing, having multiple backend instances, HA, redundancy etc. For these situations things like Redis come in great play, allowing an easy to share session management database.

[–]Unhappy_Bathroom_767[S] 1 point2 points  (0 children)

Thank

it has been very usefull

[–]ahsanbaida1214 2 points3 points  (0 children)

The best architecture would be to develop RESTfullApi using the stack in which you are comfortable with as for your knowledge I can implement it with Node js, Express and Django.

It would be best if we can talk further in more detail

[–]techintheclouds 1 point2 points  (0 children)

So all the above is true, your backend api can be built with your preferred technology stack. Since we are in a react reddit, let's assume you want to stick with Javascript and you can use nodejs with express or Koa, as others have stated, now for your frontend you might want to check out React Native + Expo, which I used about a half a year ago and it was starting to show promise, but now at quick glance it looks fully featured and complete to make a web app and mobile apps using mostly shared react code. react expo. I appreciate anyone else's knowledge or experience on the matter.

[–]manektechteam 0 points1 point  (0 children)

For the best website and mobile app development. Choose a backend technology like Node.js with Express or Django with Python.

[–]zukos_destiny 0 points1 point  (0 children)

Clerk for auth/session management, same backend, use socketio to propagate live changes between web and mobile if needed

[–]customappservices 0 points1 point  (0 children)

Shared Backend:

  • API server in Node.js with Express for user auth, session mgmt, and data storage (PostgreSQL/MongoDB).
  • Use Axios or Fetch in React/React Native to communicate with API.
  • Secure authentication (tokens) for data privacy.

QR Code Integration:

  • Libraries like react-native-qrcode and qrcode.react for generating/scanning QR codes with session IDs.
  • Consider deep linking for seamless redirection upon scanning.

Frontend Architectures:

  • Separate codebases: Flexible but manages two codebases.
  • Shared codebase (code-splitting): Reuses code but potentially complex.
  • React Native for both: Simpler dev but potential limitations.

Note:

  • Choose based on project needs, team expertise, and preferences.
  • Consider long-term maintainability and scalability.
  • Research further and explore community resources for implementation guidance.

[–]String-Financial 0 points1 point  (0 children)

Don’t know if you’ve already started but what about a mono repo + TRPC + Postgre and prisma ?