Documentation
IntroductionArchitectureMonorepo & ToolingRunning Locally
Screen Flow MapUser JourneysPersonas & RolesWeb ScreensClient Portal
Convex OverviewData ModelFunctions ReferenceAuth & SessionsRoles & PermissionsJobs & Providers
Web Design SystemAdmin Console DesignPatterns & Conventions
Web AppiOS AppMarketing Website
Testing & HarnessCI Pipeline

Monorepo & Tooling

Monorepo & Tooling

The v2 platform lives in v2/ inside the main Pawdentity repository (the repo root is the v1 Laravel app). It is a pnpm workspace driven by Turborepo.

Layout

v2/
├── apps/
│   ├── web/        @pawdentity/web      — the product (staff app, portal, platform admin)
│   ├── website/    @pawdentity/website  — pawdentity.com marketing site (standalone)
│   ├── admin/      @pawdentity/admin    — this internal admin console (standalone)
│   └── ios/        SwiftUI app (not a JS package; xcodegen project)
├── packages/
│   ├── backend/    @pawdentity/backend  — Convex schema + functions (source of truth)
│   ├── domain/     @pawdentity/domain   — shared enums, business-rule tables, helpers
│   └── seed/       reserved for the v1 MySQL → Convex importer (not yet present)
├── pnpm-workspace.yaml   # globs: apps/*, packages/*
├── turbo.json
└── package.json          # packageManager: pnpm@10.33.2

Requirements: Node 24+, pnpm 10+.

Dependency graph

apps/
web · :3200
the product
website · :3300
marketing — standalone
admin · :3400
this console — standalone
ios
xcodegen project (not a JS package)
packages/
backend
Convex schema + functions · exports generated api types
domain
shared enums & business rules · no build step
api types
enums
workspace:*
mirrors schema shapes (mock today)
Workspace dependency graph — arrows point at what a package depends on
  • @pawdentity/domain has no build step: main/types point directly at src/index.ts.
  • @pawdentity/backend exports ./api (convex/_generated/api.js) and ./dataModel (generated types). The web app also maps @backend/* → ../../packages/backend/convex/* in its tsconfig.

Turbo tasks

TaskConfigNotes
builddependsOn: ["^build"], outputs .next/** (minus cache), dist/**topological
devcache: false, persistent: truelong-running dev servers
lint—
typecheckdependsOn: ["^typecheck"]topological

Root scripts: pnpm dev / build / lint / typecheck run the matching turbo task across the workspace; pnpm seed runs the backend seed.

Dev server ports

AppPort
apps/web3200
apps/website3300
apps/admin3400
Convex local backend3210 (API) / 3211 (site)

TypeScript configuration

There is deliberately no shared base tsconfig — each package carries an independent config with a common baseline: target ES2022, module ESNext, moduleResolution Bundler, strict, skipLibCheck, noEmit. Next.js apps add jsx: react-jsx, the next plugin, and the @/* → ./src/* path alias. The backend includes only convex/ and excludes convex/_generated.

Conventions worth knowing

  • Next.js configs pin Turbopack's root to the v2/ workspace (turbopack.root) because the repo root has its own v1 lockfiles — this keeps watcher scope and caching correct across parallel git worktrees.
  • All Next apps are on Next 16 / React 19 / Tailwind 4 (CSS-first, @tailwindcss/postcss, no tailwind.config.ts).
  • The v1 Laravel app at the repo root shares the same git history; v2 CI only triggers on v2.1** branches. See CI Pipeline.