Scaffold a new monorepo workspace package with project conventions (tsconfig, eslint, package.json, exports). Use when creating apps/web, packages/db, packages/api, or any new workspace.
Create a new workspace package in the Eat Out Adviser monorepo following all project conventions.
name (required): Package name (e.g., web, db, api, ai, scoring, shared)type (required): app or packagedescription (optional): One-line description@eat-out-adviser/{name} in package.jsonapps/{name}/ for apps, packages/{name}/ for packages../../tsconfig.base.json with strict mode>=22.0.0Create the directory structure:
{type}s/{name}/
├── package.json
├── tsconfig.json
├── src/
│ └── index.ts
└── README.md (only if app)
Generate package.json:
{
"name": "@eat-out-adviser/{name}",
"version": "0.0.0",
"private": true,
"type": "module",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"build": "tsc",
"type-check": "tsc --noEmit",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest run",
"test:watch": "vitest"
},
"devDependencies": {
"typescript": "^5.7.0"
}
}
Generate tsconfig.json:
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"]
}
For apps/web specifically, scaffold Next.js 16 with App Router:
next, react, react-dom dependenciesapp/ directory with layout.tsx and page.tsxnext.config.ts with Turbopack enabledFor packages/db specifically:
drizzle-orm, drizzle-kit, @neondatabase/serverless or pgsrc/schema/ directorydrizzle.config.tsFor packages/api specifically:
@trpc/server, @trpc/client, zodsrc/routers/ directorysrc/trpc.ts with base router setupFor packages/ai specifically:
@google/genai (NOT @anthropic-ai/sdk, NOT @google/generative-ai)src/gemini.ts for client initializationRun pnpm install to link the new workspace
Verify with pnpm type-check that the new package compiles
All comments and README content must be in Portuguese. Code identifiers in English.