Skip to content

react-monorepo features

Generated from templates/react-monorepo/template.json. The apps are features too: app-auth and app-client are on by default; app-landing and app-admin are opt-in.

FeatureDefaultWhat it adds
ui
UI kit (@scope/ui)
Always

shadcn-style Radix components, a Formik+Zod form helper, light/dark theming with a no-flash init script, and page-meta helpers.

api
Data layer (@scope/api)
Always

One shared RTK Query baseApi that every feature extends via injectEndpoints, a configured store, and an upload-aware base query. Endpoint names and tagTypes live in one global namespace — collisions are silent, so keep them unique.

auth
Auth client (@scope/auth)
Always

better-auth browser client, session slice, route guards and login redirects, shared across every app via a cross-subdomain cookie.

layouts
Layouts (@scope/layouts)
Always

App shell, auth layout, marketing layout, error boundary and the loading/empty/forbidden/not-found state screens.

config
Shared config (@scope/config)
Always

Base tsconfigs, the shared Vite config factory, the ESLint base and the Tailwind theme.

hooks
Shared hooks (@scope/hooks)
On
Files it owns (1)
  • packages/hooks/**
types
Generated API types (@scope/types)
On

OpenAPI-generated request/response types and Zod schemas, regenerated from the backend's /openapi-json.

Files it owns (1)
  • packages/types/**
telemetry
Browser monitoring → OpenObserve
On

The @acme/telemetry package: OpenObserve RUM and logs in every app — page views, errors (including the error boundary's), slow resources, user actions, the signed-in user id, and traceparent headers on API calls so frontend and backend traces link up. Session replay is off unless a project turns it on. Off at runtime until VITE_OPENOBSERVE_* are set.

Packages: @acme/telemetry

Files it owns (1)
  • packages/telemetry/**
app-auth
Auth app
On

Login, signup, forgot/reset password, email verification. The one app that owns the session; the others redirect here.

Files it owns (1)
  • apps/auth/**
app-client
Client app
On

The authenticated product surface — app shell, protected routing, feature directories.

Files it owns (1)
  • apps/client/**
app-admin
Admin console
Opt-in

Internal console over the same data layer, gated to the admin and superuser roles in the UI. The API must enforce the role on every endpoint it calls.

Files it owns (1)
  • apps/admin/**
app-landing
Marketing site
Opt-in

Public marketing site: a home page, an SEO route table, and build-time robots.txt, sitemap.xml and security.txt.

Files it owns (1)
  • apps/landing/**
realtime
Socket.IO client
Opt-in

socket.io-client wired to the backend's /realtime path, with room helpers and shared event-name constants. Pairs with the nest-api realtime feature.

Packages: socket.io-client

Files it owns (2)
  • packages/api/src/socket.ts
  • packages/api/src/realtime-events.ts
pwa
Installable PWA (client app)
Opt-in

vite-plugin-pwa configured for the client app: app-shell offline caching, and registerType 'prompt' so a new build waits for the user instead of swapping assets under a running app. The update prompt and install button are yours to build with the plugin's useRegisterSW.

Requires app-client

Packages: vite-plugin-pwa

charts
Charts (client app)
Opt-in

ApexCharts and react-apexcharts in the client app, with a theme-aware chart palette (the --chart-* tokens in the UI kit). No chart components ship.

Requires app-client

Packages: apexcharts, react-apexcharts

husky
Git hooks + lint-staged
On

Packages: husky, lint-staged

Files it owns (1)
  • .husky/**
docker
Docker image
On

Multi-stage build producing a static bundle per app, served by the nginx config in docker/ (cache rules, SPA fallback, security headers).

Files it owns (4)
  • docker/nginx.conf
  • Dockerfile
  • .dockerignore
  • build.sh
ci
Forgejo Actions CI
On
Files it owns (1)
  • .forgejo/**
secrets
Infisical secret sync
On
Files it owns (2)
  • apps/*/.bin/**
  • packages/types/.bin/**
  • Dropping app-auth means another app must own /login: every guard and every 401 sends users to VITE_APP_AUTH_HOST/login.
  • pwa and charts configure the client app only.
  • types off removes generated types; apps then type their API calls by hand.
  • The Dockerfile, CI matrix and build.sh follow the app set: only the apps you generate are built.