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
@pawdentity/domainhas no build step:main/typespoint directly atsrc/index.ts.@pawdentity/backendexports./api(convex/_generated/api.js) and./dataModel(generated types). The web app also maps@backend/*→../../packages/backend/convex/*in its tsconfig.
Turbo tasks
| Task | Config | Notes |
|---|---|---|
build | dependsOn: ["^build"], outputs .next/** (minus cache), dist/** | topological |
dev | cache: false, persistent: true | long-running dev servers |
lint | — | |
typecheck | dependsOn: ["^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
| App | Port |
|---|---|
| apps/web | 3200 |
| apps/website | 3300 |
| apps/admin | 3400 |
| Convex local backend | 3210 (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
rootto thev2/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, notailwind.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.