# kumaraswini-11/monorepo-starter-kit architecture

> Architecture diagram of the GitHub repository kumaraswini-11/monorepo-starter-kit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kumaraswini-11/monorepo-starter-kit
- Repository: https://github.com/kumaraswini-11/monorepo-starter-kit

## Overview

This is a fullstack monorepo starter, not a single end-user product: its clearest runtime journey is the presentational auth UI, alongside an independently configured Better Auth backend and shared data/email infrastructure. The README explicitly says the UI is not yet wired to the backend; the graph therefore shows the API mount and backend internals separately rather than inventing a UI-to-auth flow. Major dashboard, theming, shared UI, and notification capabilities are retained. Edges are limited to excerpted calls and explicit README documentation; unsampled settings, notification, and broader auth-flow links are not inferred.

Main entry points: [`packages/auth/src/auth.ts`](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/auth/src/auth.ts) (Better Auth server), [`apps/web/app`](https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/apps/web/app) (Web app routes), [`apps/web/components/app-shell`](https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/apps/web/components/app-shell) (App shell), [`apps/web/app/(app)/dashboard/page.tsx`](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/apps/web/app/(app)/dashboard/page.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Web app routes"]
  node_authentry["Auth entry<br/>[page.tsx]"]
  node_authflow["Auth screens"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_shell["App shell"]
  node_theme["Theme controls"]
  node_notifications["Notifications"]
end

subgraph group_auth["Authentication"]
  node_route["Auth API mount<br/>[route.ts]"]
  node_authserver["Better Auth server<br/>[auth.ts]"]
  node_authclient["Browser auth client<br/>[client.ts]"]
  node_authseam["Auth client seam<br/>[auth-client.ts]"]
end

subgraph group_data["Data and email"]
  node_db[("Postgres / Drizzle<br/>[client.ts]")]
  node_queries["Session queries<br/>[sessions.ts]"]
  node_email["Email delivery<br/>[send-email.ts]"]
  node_emailtemplates["Email templates"]
  node_env["Validated config<br/>[index.ts]"]
end

subgraph group_shared["Shared interface"]
  node_ui["Shared UI components"]
  node_sidebar["Responsive sidebar<br/>[sidebar.tsx]"]
  node_brand["Brand assets<br/>[logo.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens app"| node_webapp
node_webapp -->|"offers sign-in"| node_authentry
node_authentry -->|"renders controls"| node_authflow
node_webapp -->|"serves dashboard"| node_dashboard
node_dashboard -->|"renders within"| node_shell
node_dashboard -->|"reads session"| node_queries
node_webapp -->|"mounts API"| node_route
node_route -->|"adapts handler"| node_authserver
node_authserver -->|"uses adapter"| node_db
node_authserver -->|"checks sessions"| node_queries
node_authserver -->|"sends notices"| node_email
node_authserver -->|"reads config"| node_env
node_authserver -.->|"selects messages"| node_emailtemplates
node_authseam -->|"re-exports client"| node_authclient
node_shell -.->|"provides controls"| node_theme
node_shell -.->|"hosts bell"| node_notifications
node_shell -.->|"uses navigation"| node_sidebar
node_sidebar -->|"uses primitives"| node_ui
node_ui -.->|"includes branding"| node_brand
node_email -.->|"delivers rendered mail"| node_emailtemplates

click node_webapp "https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/apps/web/app"
click node_authentry "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/apps/web/app/auth/page.tsx"
click node_authflow "https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/apps/web/features/auth/components"
click node_dashboard "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/apps/web/app/(app)/dashboard/page.tsx"
click node_shell "https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/apps/web/components/app-shell"
click node_theme "https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/apps/web/components/theme"
click node_notifications "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/apps/web/features/notifications/components/notification-bell.tsx"
click node_route "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/apps/web/app/api/auth/%5B...all%5D/route.ts"
click node_authserver "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/auth/src/auth.ts"
click node_authclient "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/auth/src/client.ts"
click node_authseam "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/apps/web/features/auth/lib/auth-client.ts"
click node_db "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/db/src/client.ts"
click node_queries "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/db/src/queries/sessions.ts"
click node_email "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/email/src/send-email.ts"
click node_emailtemplates "https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/packages/email/src/emails"
click node_env "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/env/src/index.ts"
click node_ui "https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/packages/ui/src/components/shadcn"
click node_sidebar "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/ui/src/components/shadcn/sidebar.tsx"
click node_brand "https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/ui/src/components/brand/logo.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapp,node_authentry,node_authflow,node_dashboard,node_shell,node_theme,node_notifications toneBlue
class node_route,node_authserver,node_authclient,node_authseam toneAmber
class node_db,node_queries,node_email,node_emailtemplates,node_env toneMint
class node_ui,node_sidebar,node_brand toneRose
class node_visitor toneIndigo
```

## Components

### Web experience

- [Web app routes](https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/apps/web/app): `apps/web/app`
- [Auth entry](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/apps/web/app/auth/page.tsx): `apps/web/app/auth/page.tsx`
- [Auth screens](https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/apps/web/features/auth/components): `apps/web/features/auth/components`
- [Dashboard](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/apps/web/app/(app)/dashboard/page.tsx): `apps/web/app/(app)/dashboard/page.tsx`
- [App shell](https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/apps/web/components/app-shell): `apps/web/components/app-shell`
- [Theme controls](https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/apps/web/components/theme): `apps/web/components/theme`
- [Notifications](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/apps/web/features/notifications/components/notification-bell.tsx): `apps/web/features/notifications/components/notification-bell.tsx`

### Authentication

- [Auth API mount](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/apps/web/app/api/auth/%5B...all%5D/route.ts): `apps/web/app/api/auth/[...all]/route.ts`
- [Better Auth server](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/auth/src/auth.ts): `packages/auth/src/auth.ts`
- [Browser auth client](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/auth/src/client.ts): `packages/auth/src/client.ts`
- [Auth client seam](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/apps/web/features/auth/lib/auth-client.ts): `apps/web/features/auth/lib/auth-client.ts`

### Data and email

- [Postgres / Drizzle](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/db/src/client.ts): `packages/db/src/client.ts`
- [Session queries](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/db/src/queries/sessions.ts): `packages/db/src/queries/sessions.ts`
- [Email delivery](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/email/src/send-email.ts): `packages/email/src/send-email.ts`
- [Email templates](https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/packages/email/src/emails): `packages/email/src/emails`
- [Validated config](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/env/src/index.ts): `packages/env/src/index.ts`

### Shared interface

- [Shared UI components](https://github.com/kumaraswini-11/monorepo-starter-kit/tree/main/packages/ui/src/components/shadcn): `packages/ui/src/components/shadcn`
- [Responsive sidebar](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/ui/src/components/shadcn/sidebar.tsx): `packages/ui/src/components/shadcn/sidebar.tsx`
- [Brand assets](https://github.com/kumaraswini-11/monorepo-starter-kit/blob/main/packages/ui/src/components/brand/logo.tsx): `packages/ui/src/components/brand/logo.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Web app routes: opens app (evidence: `apps/web/app/auth/page.tsx`)
- Web app routes → Auth entry: offers sign-in (evidence: `apps/web/app/auth/page.tsx`)
- Auth entry → Auth screens: renders controls (evidence: `apps/web/app/auth/page.tsx`)
- Web app routes → Dashboard: serves dashboard (evidence: `apps/web/app/(app)/dashboard/page.tsx`)
- Dashboard → App shell: renders within (evidence: `apps/web/app/(app)/dashboard/page.tsx`)
- Dashboard → Session queries: reads session (evidence: `apps/web/app/(app)/dashboard/page.tsx`)
- Web app routes → Auth API mount: mounts API (evidence: `apps/web/app/api/auth/[...all]/route.ts`)
- Auth API mount → Better Auth server: adapts handler (evidence: `apps/web/app/api/auth/[...all]/route.ts`)
- Better Auth server → Postgres / Drizzle: uses adapter (evidence: `packages/auth/src/auth.ts`)
- Better Auth server → Session queries: checks sessions (evidence: `packages/auth/src/auth.ts`)
- Better Auth server → Email delivery: sends notices (evidence: `packages/auth/src/auth.ts`)
- Better Auth server → Validated config: reads config (evidence: `packages/auth/src/auth.ts`)
- Better Auth server → Email templates: selects messages
- Auth client seam → Browser auth client: re-exports client (evidence: `apps/web/features/auth/lib/auth-client.ts`)
- App shell → Theme controls: provides controls
- App shell → Notifications: hosts bell
- App shell → Responsive sidebar: uses navigation
- Responsive sidebar → Shared UI components: uses primitives (evidence: `packages/ui/src/components/shadcn/sidebar.tsx`)
- Shared UI components → Brand assets: includes branding
- Email delivery → Email templates: delivers rendered mail
