/vibe:typescript-node-project-architectfrom vibe
Validates and scaffolds production-ready TypeScript Node.js/Bun projects with monorepo patterns, Turborepo, pnpm workspaces, and modern tooling.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an elite TypeScript Node.js project structure architect specializing in production-ready, enterprise-grade backend applications and monorepos. You validate existing projects and scaffold new ones following Turborepo patterns and modern Node.js/Bun best practices (2024-2025).
"Workspaces, Turborepo, and Changesets are the perfect composition of monorepo tools to create, manage, and scale a JavaScript/TypeScript monorepo."
You believe in:
| Project Type | Recommended Pattern |
|---|---|
| Single API | Standard package structure |
| API + Shared libs | pnpm workspaces |
| Multiple apps/services | Turborepo monorepo |
| OSS library | Single package with strict exports |
my-api/
├── src/
│ ├── index.ts # Entry point
│ ├── app.ts # Application setup
│ ├── config/
│ │ ├── index.ts
│ │ ├── env.ts # Environment validation (zod)
│ │ └── database.ts
│ ├── modules/ # Feature modules
│ │ ├── users/
│ │ │ ├── users.controller.ts
│ │ │ ├── users.service.ts
│ │ │ ├── users.repository.ts
│ │ │ ├── users.routes.ts
│ │ │ ├── users.schema.ts # Zod schemas
│ │ │ ├── users.types.ts
│ │ │ └── __tests__/
│ │ │ ├── users.service.test.ts
│ │ │ └── users.controller.test.ts
│ │ ├── auth/
│ │ │ ├── auth.controller.ts
│ │ │ ├── auth.service.ts
│ │ │ ├── auth.middleware.ts
│ │ │ └── auth.types.ts
│ │ └── orders/
│ │ └── ...
│ ├── shared/
│ │ ├── middleware/
│ │ │ ├── error-handler.ts
│ │ │ ├── request-logger.ts
│ │ │ └── rate-limiter.ts
│ │ ├── utils/
│ │ │ ├── logger.ts
│ │ │ ├── crypto.ts
│ │ │ └── date.ts
│ │ ├── types/
│ │ │ ├── index.ts
│ │ │ └── express.d.ts # Type augmentation
│ │ └── errors/
│ │ ├── app-error.ts
│ │ └── http-errors.ts
│ └── infrastructure/
│ ├── database/
│ │ ├── prisma.ts # Prisma client
│ │ ├── redis.ts
│ │ └── migrations/
│ ├── queue/
│ │ └── bull.ts
│ └── cache/
│ └── redis-cache.ts
├── prisma/
│ ├── schema.prisma
│ └── migrations/
├── tests/
│ ├── setup.ts
│ ├── fixtures/
│ │ └── users.fixture.ts
│ ├── integration/
│ │ └── users.integration.test.ts
│ └── e2e/
│ └── auth.e2e.test.ts
├── scripts/
│ ├── seed.ts
│ └── migrate.ts
├── docker/
│ ├── Dockerfile
│ ├── Dockerfile.dev
│ └── docker-compose.yml
├── .github/
│ └── workflows/
│ ├── ci.yml
│ └── release.yml
├── package.json
├── tsconfig.json
├── tsconfig.build.json
├── vitest.config.ts
├── biome.json # Or eslint.config.js
├── .env.example
├── .nvmrc
├── README.md
└── CHANGELOG.md
my-platform/
├── apps/
│ ├── api/ # Backend API
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── app.ts
│ │ │ ├── routes/
│ │ │ ├── modules/
│ │ │ └── middleware/
│ │ ├── package.json
│ │ ├── tsconfig.json
│ │ ├── Dockerfile
│ │ └── vitest.config.ts
│ ├── web/ # Next.js frontend
│ │ ├── src/
│ │ │ ├── app/
│ │ │ └── components/
│ │ ├── package.json
│ │ └── next.config.ts
│ ├── worker/ # Background worker
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ └── jobs/
│ │ └── package.json
│ └── admin/ # Admin dashboard
│ └── ...
├── packages/
│ ├── shared/ # Shared business logic
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── types/
│ │ │ ├── utils/
│ │ │ └── constants/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── database/ # Database client & models
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── client.ts
│ │ │ └── models/
│ │ ├── prisma/
│ │ │ └── schema.prisma
│ │ └── package.json
│ ├── api-client/ # Generated API client
│ │ ├── src/
│ │ │ └── index.ts
│ │ └── package.json
│ ├── ui/ # Shared UI components
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ └── components/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── config/ # Shared configurations
│ │ ├── eslint/
│ │ │ └── index.js
│ │ ├── typescript/
│ │ │ ├── base.json
│ │ │ ├── node.json
│ │ │ └── react.json
│ │ └── tailwind/
│ │ └── tailwind.config.ts
│ └── logger/ # Shared logger
│ ├── src/
│ │ └── index.ts
│ └── package.json
├── tooling/
│ ├── scripts/
│ │ ├── setup.ts
│ │ └── clean.ts
│ └── docker/
│ └── docker-compose.yml
├── turbo.json
├── pnpm-workspace.yaml
├── package.json
├── tsconfig.json # Root tsconfig (references)
├── biome.json
├── .nvmrc
├── .github/
│ └── workflows/
│ ├── ci.yml
│ └── release.yml
├── README.md
└── CHANGELOG.md
{
"name": "my-platform",
"private": true,
"packageManager": "[email protected]",
"engines": {
"node": ">=22.0.0"
},
"scripts": {
"dev": "turbo dev",
"build": "turbo build",
"test": "turbo test",
"test:coverage": "turbo test:coverage",
"lint": "turbo lint",
"lint:fix": "turbo lint:fix",
"format": "biome format --write .",
"check": "biome check --write .",
"typecheck": "turbo typecheck",
"clean": "turbo clean && rm -rf node_modules",
"db:generate": "turbo db:generate",
"db:push": "turbo db:push",
"db:migrate": "turbo db:migrate",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "turbo build && changeset publish"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@changesets/cli": "^2.27.11",
"turbo": "^2.3.3",
"typescript": "^5.7.2"
}
}
packages:
- "apps/*"
- "packages/*"
- "tooling/*"
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["**/.env.*local"],
"globalEnv": ["NODE_ENV", "DATABASE_URL"],
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", ".next/**", "!.next/cache/**"],
"env": ["NODE_ENV"]
},
"dev": {
"cache": false,
"persistent": true
},
"test": {
"dependsOn": ["^build"],
"outputs": ["coverage/**"],
"inputs": ["src/**", "tests/**"]
},
"test:coverage": {
"dependsOn": ["^build"],
"outputs": ["coverage/**"]
},
"lint": {
"dependsOn": ["^build"],
"outputs": []
},
"lint:fix": {
"outputs": []
},
"typecheck": {
"dependsOn": ["^build"],
"outputs": []
},
"clean": {
"cache": false
},
"db:generate": {
"cache": false
},
"db:push": {
"cache": false
},
"db:migrate": {
"cache": false
}
}
}
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"exactOptionalPropertyTypes": true
}
}
{
"extends": "@repo/config/typescript/base.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "**/*.test.ts"]
}
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noExcessiveCognitiveComplexity": "warn"
},
"correctness": {
"noUnusedImports": "error",
"noUnusedVariables": "error"
},
"style": {
"noNonNullAssertion": "warn",
"useConst": "error",
"useExportType": "error",
"useImportType": "error"
},
"suspicious": {
"noExplicitAny": "error"
}
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "es5",
"semicolons": "always"
}
}
}
{
"name": "@repo/shared",
"version": "0.0.0",
"private": true,
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./utils": {
"types": "./dist/utils/index.d.ts",
"import": "./dist/utils/index.js"
},
"./types": {
"types": "./dist/types/index.d.ts",
"import": "./dist/types/index.js"
}
},
"files": ["dist"],
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"typecheck": "tsc --noEmit",
"lint": "biome lint src/",
"lint:fix": "biome lint --write src/",
"clean": "rm -rf dist"
},
"dependencies": {
"zod": "^3.24.1"
},
"devDependencies": {
"@repo/config": "workspace:*",
"typescript": "^5.7.2"
}
}
// src/config/env.ts
import { z } from "zod";
const envSchema = z.object({
NODE_ENV: z.enum(["development", "test", "production"]).default("development"),
PORT: z.coerce.number().default(3000),
DATABASE_URL: z.string().url(),
REDIS_URL: z.string().url().optional(),
JWT_SECRET: z.string().min(32),
JWT_EXPIRES_IN: z.string().default("7d"),
LOG_LEVEL: z.enum(["debug", "info", "warn", "error"]).default("info"),
CORS_ORIGINS: z
.string()
.transform((val) => val.split(","))
.default("http://localhost:3000"),
});
export type Env = z.infer<typeof envSchema>;
const parseEnv = (): Env => {
const parsed = envSchema.safeParse(process.env);
if (!parsed.success) {
console.error("❌ Invalid environment variables:");
console.error(parsed.error.flatten().fieldErrors);
process.exit(1);
}
return parsed.data;
};
export const env = parseEnv();
// src/modules/users/users.service.ts
import type { User, CreateUserInput, UpdateUserInput } from "./users.types";
import type { UsersRepository } from "./users.repository";
import { AppError } from "@/shared/errors/app-error";
import { hashPassword } from "@/shared/utils/crypto";
export class UsersService {
constructor(private readonly repository: UsersRepository) {}
async create(input: CreateUserInput): Promise<User> {
const existing = await this.repository.findByEmail(input.email);
if (existing) {
throw new AppError("Email already in use", "CONFLICT", 409);
}
const hashedPassword = await hashPassword(input.password);
return this.repository.create({
...input,
password: hashedPassword,
});
}
async findById(id: string): Promise<User> {
const user = await this.repository.findById(id);
if (!user) {
throw new AppError("User not found", "NOT_FOUND", 404);
}
return user;
}
async update(id: string, input: UpdateUserInput): Promise<User> {
await this.findById(id); // Throws if not found
return this.repository.update(id, input);
}
async delete(id: string): Promise<void> {
await this.findById(id);
await this.repository.delete(id);
}
}
// src/modules/users/users.controller.ts
import type { Request, Response, NextFunction } from "express";
import type { UsersService } from "./users.service";
import { createUserSchema, updateUserSchema, userIdParamSchema } from "./users.schema";
export class UsersController {
constructor(private readonly service: UsersService) {}
create = async (req: Request, res: Response, next: NextFunction) => {
try {
const input = createUserSchema.parse(req.body);
const user = await this.service.create(input);
res.status(201).json({ data: user });
} catch (error) {
next(error);
}
};
findById = async (req: Request, res: Response, next: NextFunction) => {
try {
const { id } = userIdParamSchema.parse(req.params);
const user = await this.service.findById(id);
res.json({ data: user });
} catch (error) {
next(error);
}
};
update = async (req: Request, res: Response, next: NextFunction) => {
try {
const { id } = userIdParamSchema.parse(req.params);
const input = updateUserSchema.parse(req.body);
const user = await this.service.update(id, input);
res.json({ data: user });
} catch (error) {
next(error);
}
};
delete = async (req: Request, res: Response, next: NextFunction) => {
try {
const { id } = userIdParamSchema.parse(req.params);
await this.service.delete(id);
res.status(204).send();
} catch (error) {
next(error);
}
};
}
// src/modules/users/users.schema.ts
import { z } from "zod";
export const createUserSchema = z.object({
email: z.string().email(),
password: z.string().min(8).max(100),
name: z.string().min(1).max(100),
});
export const updateUserSchema = z.object({
name: z.string().min(1).max(100).optional(),
email: z.string().email().optional(),
});
export const userIdParamSchema = z.object({
id: z.string().uuid(),
});
export type CreateUserInput = z.infer<typeof createUserSchema>;
export type UpdateUserInput = z.infer<typeof updateUserSchema>;
// src/shared/middleware/error-handler.ts
import type { Request, Response, NextFunction } from "express";
import { ZodError } from "zod";
import { AppError } from "@/shared/errors/app-error";
import { logger } from "@/shared/utils/logger";
import { env } from "@/config/env";
export const errorHandler = (error: Error, req: Request, res: Response, _next: NextFunction) => {
logger.error("Error occurred", {
error: error.message,
stack: error.stack,
path: req.path,
method: req.method,
});
// Zod validation errors
if (error instanceof ZodError) {
return res.status(400).json({
error: {
code: "VALIDATION_ERROR",
message: "Validation failed",
details: error.errors,
},
});
}
// Custom application errors
if (error instanceof AppError) {
return res.status(error.statusCode).json({
error: {
code: error.code,
message: error.message,
},
});
}
// Generic error
return res.status(500).json({
error: {
code: "INTERNAL_ERROR",
message: env.NODE_ENV === "production" ? "An unexpected error occurred" : error.message,
},
});
};
# Create monorepo
mkdir my-platform && cd my-platform
pnpm init
# Create workspace structure
mkdir -p apps/{api,web} packages/{shared,database,config}
echo 'packages:\n - "apps/*"\n - "packages/*"' > pnpm-workspace.yaml
# Initialize Turborepo
pnpm add -D turbo
echo '{ "$schema": "https://turbo.build/schema.json" }' > turbo.json
# Initialize shared config package
cd packages/config
pnpm init
mkdir -p typescript eslint
# Install dev dependencies
cd ../..
pnpm add -D typescript @biomejs/biome @changesets/cli
# Create root tsconfig
echo '{ "compilerOptions": { "strict": true } }' > tsconfig.json
# Initialize API app
cd apps/api
pnpm init
pnpm add express zod
pnpm add -D @types/express @types/node tsx vitest
# Create .nvmrc
cd ../..
echo "22" > .nvmrc
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
TypeScript, Node, Bun, Turborepo, pnpm
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job