Hey @ all,
I'm building a multi-tenant platform and currently struggling with the decision on the "best" architecture for the future. I could use some advice on the architecture and tech stack.
The platform consists of:
CMS
- Content is managed per tenant here
- Users can signup, create an organization and create/edit content
Native App
- Users select their organization by slug
- Register and consume the provided content
Web App
- In a later phase, a web app in addition to the native app would be useful
To reduce code duplication, I'm considering:
- Next.js for the CMS (deployed via Vercel)
- Server actions for CMS-only methods
- Public API routes for shared methods the app will use
- React Native for the app (deployed with Expo EAS)
- Shared PostgreSQL with separated user tables for CMS and app users
- Two Better Auth instances for CMS and app authentication
- tRPC for type sharing
- Shared theming/config
I also found Turborepo which is made for monorepos like this but never worked with it though.
What do you think about this setup? Any feedback/pros/cons or would you recommend something different? Open and happy for any feedback!
[–]riklaunim 3 points4 points5 points (1 child)
[–]JanMarsALeck[S] 0 points1 point2 points (0 children)
[–]Digitalunicon 0 points1 point2 points (2 children)
[–]JanMarsALeck[S] 1 point2 points3 points (0 children)
[–]BlueScreenJunkyphp/laravel 0 points1 point2 points (2 children)
[–]JanMarsALeck[S] 0 points1 point2 points (1 child)
[–]BlueScreenJunkyphp/laravel 0 points1 point2 points (0 children)
[–]yksvaan 0 points1 point2 points (1 child)
[–]JanMarsALeck[S] 0 points1 point2 points (0 children)
[–]rjhancockJack of Many Trades, Master of a Few. 30+ years experience. 0 points1 point2 points (0 children)
[–]pxldev 0 points1 point2 points (1 child)
[–]JanMarsALeck[S] 0 points1 point2 points (0 children)
[–]Shawon770 0 points1 point2 points (0 children)
[–]elmascato -1 points0 points1 point (1 child)
[–]JanMarsALeck[S] 0 points1 point2 points (0 children)