Adding a Product
Using the Generator
The fastest way to create a new product:
npx tsx scripts/gen-product.tsThis will prompt you for:
- Product name — lowercase, kebab-case (e.g.,
my-app) - Platforms — which sub-packages to create (web, backend, mobile)
The script creates:
products/<name>/shared/— always createdproducts/<name>/web/— if web platform selectedproducts/<name>/backend/— if backend platform selectedproducts/<name>/mobile/— if mobile platform selected- CLAUDE.md files for each sub-package
Manual Setup
If you prefer to create a product manually:
1. Create the shared package
mkdir -p products/my-app/shared/srcCreate products/my-app/shared/package.json:
{ "name": "@repo/my-app-shared", "version": "0.0.0", "private": true, "type": "module", "exports": { ".": { "types": "./src/index.ts", "default": "./src/index.ts" } }, "scripts": { "build": "tsc --build", "lint": "eslint .", "typecheck": "tsc --noEmit", "test": "vitest run" }, "devDependencies": { "@repo/eslint-config": "workspace:*", "@repo/tsconfig": "workspace:*", "eslint": "^9.16.0", "typescript": "^5.7.0", "vitest": "^2.1.0" }}2. Add platform sub-packages
Follow the same pattern as the example product. Each sub-package needs:
package.jsonwith appropriate dependenciestsconfig.jsonextending the right base configeslint.config.jsimporting from@repo/eslint-configvitest.config.tsfor tests
3. Run pnpm install
pnpm installThis will link your new packages into the workspace.