react-monorepo

react-monorepo An architecture diagram generated by Archify. Browser · subdomains · Architecture component Browser subdomains landing · example.com · Turborepo workspace landing example.com auth · auth.example.com · Turborepo workspace auth auth.example.com client · app.example.com · Turborepo workspace client app.example.com admin · admin.example.com · Turborepo workspace admin admin.example.com Shared packages · ui · api · auth · types · Turborepo workspace Shared packages ui · api · auth · types API · cookie on .example.com · Architecture component API cookie on .example.com OpenObserve · RUM per app · Architecture component OpenObserve RUM per app HTTPS login JSON + cookie RUM Turborepo workspace Legend Frontend Backend External

One session

  • • The auth app signs in; the cookie covers every subdomain
  • • The API trusts and allows every app's origin
  • • Redirects only go to trusted siblings

Shared code

  • • Packages are consumed as TypeScript source
  • • One baseApi and one auth client for every app
  • • Turborepo builds only what changed

Deploy

  • • One image per app per environment
  • • One shared tag, so a matching set deploys together
  • • Admin is gated to admin and superuser