TypeScript project structure, strict tsconfig, module resolution, path aliases, shared types, and monorepo patterns
90
84%
Does it follow best practices?
Impact
100%
1.09xAverage score across 5 eval scenarios
Passed
No known issues
A growing SaaS company has a React dashboard (frontend), a Node.js API (backend), and a growing set of types shared between them. Currently everything is in one flat project, but the frontend and backend have conflicting dependency versions and the shared types are getting complex enough to warrant their own package with its own tests.
The team wants to migrate to a monorepo using npm/pnpm workspaces with three packages: @app/shared (types and validation schemas), @app/server (Express API), and @app/client (React dashboard). They want TypeScript project references so that tsc --build compiles everything in the correct dependency order.
Produce the monorepo structure with:
package.json — Root package.json with workspaces configurationtsconfig.json — Root tsconfig.json with project references to all three packagespackages/shared/package.json — Shared package with name "@app/shared"packages/shared/tsconfig.json — Composite tsconfig with declaration outputpackages/shared/src/types.ts — Shared types: User, DashboardWidget, ApiResponse, Permission union typepackages/shared/src/index.ts — Barrel exportpackages/server/package.json — Server package depending on @app/sharedpackages/server/tsconfig.json — Server tsconfig with project reference to sharedpackages/server/src/index.ts — Express entry point importing from @app/sharedpackages/client/package.json — Client package depending on @app/sharedpackages/client/tsconfig.json — Client tsconfig with project reference to sharedpackages/client/src/App.tsx — React component importing from @app/sharedFocus on correct tsconfig project references (composite, references, declaration), workspace configuration, and proper inter-package imports. Implementation can be minimal.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
typescript-project-structure
verifiers