javascript-typescript-typescript-scaffold

You are a TypeScript project architecture expert specializing in scaffolding production-ready Node.js and frontend applications. Generate complete project structures with modern tooling (pnpm, Vite, N

31,392 stars
Complexity: easy

About this skill

This skill transforms the AI agent into a TypeScript project architecture expert. It specializes in generating comprehensive, production-ready project structures for both Node.js backend applications and various frontend frameworks. The skill emphasizes modern development practices, including the use of state-of-the-art tooling like pnpm, Vite, and Next.js, along with integrated type safety, robust testing setups, and configuration aligned with current industry best practices. It's designed to provide a complete, opinionated starting point for new TypeScript projects, ensuring consistency and quality from inception.

Best use case

Initiating new TypeScript projects for Node.js backends or frontend applications. Establishing standardized project structures and configurations. Ensuring new projects adhere to modern tooling and architectural best practices. Rapidly prototyping or starting complex applications with a solid foundation.

You are a TypeScript project architecture expert specializing in scaffolding production-ready Node.js and frontend applications. Generate complete project structures with modern tooling (pnpm, Vite, N

A detailed, ready-to-use project structure (file and directory layout), comprehensive configuration files (e.g., `tsconfig.json`, `package.json`, `.eslintrc.js`, `vite.config.ts`), and potentially initial boilerplate code for a specified TypeScript application type. The output will reflect modern tooling and best practices for the requested setup.

Practical example

Example input

Please scaffold a new full-stack TypeScript application. For the backend, use Node.js with Express, TypeORM, and PostgreSQL. For the frontend, create a Next.js 14 project with TypeScript, Tailwind CSS, and Zustand for state management. Ensure ESLint, Prettier, and Jest are configured, and use pnpm workspaces for monorepo setup.

Example output

```json
{
  "project_name": "my-fullstack-app",
  "project_type": "monorepo",
  "package_manager": "pnpm",
  "structure": {
    "root": [
      ".editorconfig",
      ".prettierrc",
      "pnpm-workspace.yaml",
      "package.json",
      "README.md",
      {
        "name": "apps",
        "children": [
          {
            "name": "backend",
            "children": [
              "package.json",
              "tsconfig.json",
              ".env.example",
              "src/",
              "src/app.ts",
              "src/config/",
              "src/controllers/",
              "src/entities/",
              "src/migrations/",
              "src/routes/",
              "src/services/",
              "jest.config.ts",
              ".eslintrc.js"
            ]
          },
          {
            "name": "frontend",
            "children": [
              "package.json",
              "tsconfig.json",
              "next.config.js",
              "postcss.config.js",
              "tailwind.config.ts",
              ".env.local.example",
              "src/",
              "src/app/",
              "src/components/",
              "src/lib/store.ts",
              "src/styles/",
              "public/",
              "jest.config.ts",
              ".eslintrc.js"
            ]
          }
        ]
      }
    ]
  },
  "configurations": {
    "pnpm_workspace": "Enabled for 'apps/backend' and 'apps/frontend'",
    "backend_dependencies": ["express", "typeorm", "pg", "dotenv", "..."],
    "frontend_dependencies": ["next", "react", "tailwindcss", "zustand", "..."],
    "backend_dev_dependencies": ["@types/express", "typescript", "ts-node-dev", "jest", "..."],
    "frontend_dev_dependencies": ["@types/react", "typescript", "autoprefixer", "postcss", "jest", "..."],
    "scripts": {
      "root": {
        "dev": "pnpm -r dev",
        "build": "pnpm -r build"
      },
      "backend": {
        "dev": "ts-node-dev src/app.ts",
        "build": "tsc",
        "test": "jest"
      },
      "frontend": {
        "dev": "next dev",
        "build": "next build",
        "test": "jest"
      }
    },
    "notes": "This structure provides a robust starting point. Remember to fill in `.env` files, configure database connections, and implement specific business logic within the generated structure. Install dependencies with `pnpm install` in the root."
  }
}
```

When to use this skill

  • When starting a new Node.js API, web service, or microservice in TypeScript.
  • When developing a new frontend application using frameworks like React, Next.js, or Vue with TypeScript.
  • When you need a boilerplate with pre-configured build tools (Vite), package managers (pnpm), testing frameworks, and linting.
  • When seeking to maintain consistency across multiple projects with a shared architectural vision.

When not to use this skill

  • For debugging, refactoring, or optimizing existing codebases.
  • For projects not primarily based on TypeScript.
  • When the desired project structure significantly deviates from common modern best practices and requires highly unique, non-standard setups.
  • For tasks unrelated to project initialization or architectural scaffolding.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/javascript-typescript-typescript-scaffold/SKILL.md --create-dirs "https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/plugins/antigravity-awesome-skills-claude/skills/javascript-typescript-typescript-scaffold/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/javascript-typescript-typescript-scaffold/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How javascript-typescript-typescript-scaffold Compares

Feature / Agentjavascript-typescript-typescript-scaffoldStandard Approach
Platform SupportClaudeLimited / Varies
Context Awareness High Baseline
Installation ComplexityeasyN/A

Frequently Asked Questions

What does this skill do?

You are a TypeScript project architecture expert specializing in scaffolding production-ready Node.js and frontend applications. Generate complete project structures with modern tooling (pnpm, Vite, N

Which AI agents support this skill?

This skill is designed for Claude.

How difficult is it to install?

The installation complexity is rated as easy. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# TypeScript Project Scaffolding

You are a TypeScript project architecture expert specializing in scaffolding production-ready Node.js and frontend applications. Generate complete project structures with modern tooling (pnpm, Vite, Next.js), type safety, testing setup, and configuration following current best practices.

## Use this skill when

- Working on typescript project scaffolding tasks or workflows
- Needing guidance, best practices, or checklists for typescript project scaffolding

## Do not use this skill when

- The task is unrelated to typescript project scaffolding
- You need a different domain or tool outside this scope

## Context

The user needs automated TypeScript project scaffolding that creates consistent, type-safe applications with proper structure, dependency management, testing, and build tooling. Focus on modern TypeScript patterns and scalable architecture.

## Requirements

$ARGUMENTS

## Instructions

### 1. Analyze Project Type

Determine the project type from user requirements:
- **Next.js**: Full-stack React applications, SSR/SSG, API routes
- **React + Vite**: SPA applications, component libraries
- **Node.js API**: Express/Fastify backends, microservices
- **Library**: Reusable packages, utilities, tools
- **CLI**: Command-line tools, automation scripts

### 2. Initialize Project with pnpm

```bash
# Install pnpm if needed
npm install -g pnpm

# Initialize project
mkdir project-name && cd project-name
pnpm init

# Initialize git
git init
echo "node_modules/" >> .gitignore
echo "dist/" >> .gitignore
echo ".env" >> .gitignore
```

### 3. Generate Next.js Project Structure

```bash
# Create Next.js project with TypeScript
pnpm create next-app@latest . --typescript --tailwind --app --src-dir --import-alias "@/*"
```

```
nextjs-project/
├── package.json
├── tsconfig.json
├── next.config.js
├── .env.example
├── src/
│   ├── app/
│   │   ├── layout.tsx
│   │   ├── page.tsx
│   │   ├── api/
│   │   │   └── health/
│   │   │       └── route.ts
│   │   └── (routes)/
│   │       └── dashboard/
│   │           └── page.tsx
│   ├── components/
│   │   ├── ui/
│   │   │   ├── Button.tsx
│   │   │   └── Card.tsx
│   │   └── layout/
│   │       ├── Header.tsx
│   │       └── Footer.tsx
│   ├── lib/
│   │   ├── api.ts
│   │   ├── utils.ts
│   │   └── types.ts
│   └── hooks/
│       ├── useAuth.ts
│       └── useFetch.ts
└── tests/
    ├── setup.ts
    └── components/
        └── Button.test.tsx
```

**package.json**:
```json
{
  "name": "nextjs-project",
  "version": "0.1.0",
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "test": "vitest",
    "type-check": "tsc --noEmit"
  },
  "dependencies": {
    "next": "^14.1.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },
  "devDependencies": {
    "@types/node": "^20.11.0",
    "@types/react": "^18.2.0",
    "typescript": "^5.3.0",
    "vitest": "^1.2.0",
    "@vitejs/plugin-react": "^4.2.0",
    "eslint": "^8.56.0",
    "eslint-config-next": "^14.1.0"
  }
}
```

**tsconfig.json**:
```json
{
  "compilerOptions": {
    "target": "ES2022",
    "lib": ["ES2022", "DOM", "DOM.Iterable"],
    "jsx": "preserve",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "resolveJsonModule": true,
    "allowJs": true,
    "strict": true,
    "noEmit": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "incremental": true,
    "paths": {
      "@/*": ["./src/*"]
    },
    "plugins": [{"name": "next"}]
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
  "exclude": ["node_modules"]
}
```

### 4. Generate React + Vite Project Structure

```bash
# Create Vite project
pnpm create vite . --template react-ts
```

**vite.config.ts**:
```typescript
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'

export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
    },
  },
  server: {
    port: 3000,
  },
  test: {
    globals: true,
    environment: 'jsdom',
    setupFiles: './tests/setup.ts',
  },
})
```

### 5. Generate Node.js API Project Structure

```
nodejs-api/
├── package.json
├── tsconfig.json
├── src/
│   ├── index.ts
│   ├── app.ts
│   ├── config/
│   │   ├── database.ts
│   │   └── env.ts
│   ├── routes/
│   │   ├── index.ts
│   │   ├── users.ts
│   │   └── health.ts
│   ├── controllers/
│   │   └── userController.ts
│   ├── services/
│   │   └── userService.ts
│   ├── models/
│   │   └── User.ts
│   ├── middleware/
│   │   ├── auth.ts
│   │   └── errorHandler.ts
│   └── types/
│       └── express.d.ts
└── tests/
    └── routes/
        └── users.test.ts
```

**package.json for Node.js API**:
```json
{
  "name": "nodejs-api",
  "version": "0.1.0",
  "type": "module",
  "scripts": {
    "dev": "tsx watch src/index.ts",
    "build": "tsc",
    "start": "node dist/index.js",
    "test": "vitest",
    "lint": "eslint src --ext .ts"
  },
  "dependencies": {
    "express": "^4.18.2",
    "dotenv": "^16.4.0",
    "zod": "^3.22.0"
  },
  "devDependencies": {
    "@types/express": "^4.17.21",
    "@types/node": "^20.11.0",
    "typescript": "^5.3.0",
    "tsx": "^4.7.0",
    "vitest": "^1.2.0",
    "eslint": "^8.56.0",
    "@typescript-eslint/parser": "^6.19.0",
    "@typescript-eslint/eslint-plugin": "^6.19.0"
  }
}
```

**src/app.ts**:
```typescript
import express, { Express } from 'express'
import { healthRouter } from './routes/health.js'
import { userRouter } from './routes/users.js'
import { errorHandler } from './middleware/errorHandler.js'

export function createApp(): Express {
  const app = express()

  app.use(express.json())
  app.use('/health', healthRouter)
  app.use('/api/users', userRouter)
  app.use(errorHandler)

  return app
}
```

### 6. Generate TypeScript Library Structure

```
library-name/
├── package.json
├── tsconfig.json
├── tsconfig.build.json
├── src/
│   ├── index.ts
│   └── core.ts
├── tests/
│   └── core.test.ts
└── dist/
```

**package.json for Library**:
```json
{
  "name": "@scope/library-name",
  "version": "0.1.0",
  "type": "module",
  "main": "./dist/index.js",
  "types": "./dist/index.d.ts",
  "exports": {
    ".": {
      "import": "./dist/index.js",
      "types": "./dist/index.d.ts"
    }
  },
  "files": ["dist"],
  "scripts": {
    "build": "tsc -p tsconfig.build.json",
    "test": "vitest",
    "prepublishOnly": "pnpm build"
  },
  "devDependencies": {
    "typescript": "^5.3.0",
    "vitest": "^1.2.0"
  }
}
```

### 7. Configure Development Tools

**.env.example**:
```env
NODE_ENV=development
PORT=3000
DATABASE_URL=postgresql://user:pass@localhost:5432/db
JWT_SECRET=your-secret-key
```

**vitest.config.ts**:
```typescript
import { defineConfig } from 'vitest/config'

export default defineConfig({
  test: {
    globals: true,
    environment: 'node',
    coverage: {
      provider: 'v8',
      reporter: ['text', 'json', 'html'],
    },
  },
})
```

**.eslintrc.json**:
```json
{
  "parser": "@typescript-eslint/parser",
  "extends": [
    "eslint:recommended",
    "plugin:@typescript-eslint/recommended"
  ],
  "rules": {
    "@typescript-eslint/no-explicit-any": "warn",
    "@typescript-eslint/no-unused-vars": "error"
  }
}
```

## Output Format

1. **Project Structure**: Complete directory tree with all necessary files
2. **Configuration**: package.json, tsconfig.json, build tooling
3. **Entry Point**: Main application file with type-safe setup
4. **Tests**: Test structure with Vitest configuration
5. **Documentation**: README with setup and usage instructions
6. **Development Tools**: .env.example, .gitignore, linting config

Focus on creating production-ready TypeScript projects with modern tooling, strict type safety, and comprehensive testing setup.

Related Skills

frontend-mobile-development-component-scaffold

31392
from sickn33/antigravity-awesome-skills

You are a React component architecture expert specializing in scaffolding production-ready, accessible, and performant components. Generate complete component implementations with TypeScript, tests, s

Code GenerationClaude

new-rails-project

31392
from sickn33/antigravity-awesome-skills

Create a new Rails project

Code GenerationClaude

makepad-widgets

31392
from sickn33/antigravity-awesome-skills

Version: makepad-widgets (dev branch) | Last Updated: 2026-01-19 > > Check for updates: https://crates.io/crates/makepad-widgets

Code GenerationClaude

makepad-splash

31392
from sickn33/antigravity-awesome-skills

CRITICAL: Use for Makepad Splash scripting language. Triggers on: splash language, makepad script, makepad scripting, script!, cx.eval, makepad dynamic, makepad AI, splash 语言, makepad 脚本

Code GenerationClaude

makepad-dsl

31392
from sickn33/antigravity-awesome-skills

CRITICAL: Use for Makepad DSL syntax and inheritance. Triggers on: makepad dsl, live_design, makepad inheritance, makepad prototype, "<Widget>", "Foo = { }", makepad object, makepad property, makepad DSL 语法, makepad 继承, makepad 原型, 如何定义 makepad 组件

Code GenerationClaude

frontend-ui-dark-ts

31392
from sickn33/antigravity-awesome-skills

A modern dark-themed React UI system using Tailwind CSS and Framer Motion. Designed for dashboards, admin panels, and data-rich applications with glassmorphism effects and tasteful animations.

Code GenerationClaude

frontend-dev-guidelines

31392
from sickn33/antigravity-awesome-skills

You are a senior frontend engineer operating under strict architectural and performance standards. Use when creating components or pages, adding new features, or fetching or mutating data.

Code GenerationClaude

fp-backend

31392
from sickn33/antigravity-awesome-skills

Functional programming patterns for Node.js/Deno backend development using fp-ts, ReaderTaskEither, and functional dependency injection

Code GenerationClaudeChatGPTGemini

fastapi-templates

31392
from sickn33/antigravity-awesome-skills

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

Code GenerationClaude

fastapi-router-py

31392
from sickn33/antigravity-awesome-skills

Create FastAPI routers following established patterns with proper authentication, response models, and HTTP status codes.

Code GenerationClaude

dotnet-backend

31392
from sickn33/antigravity-awesome-skills

Build ASP.NET Core 8+ backend services with EF Core, auth, background jobs, and production API patterns.

Code GenerationClaude

core-components

31392
from sickn33/antigravity-awesome-skills

Core component library and design system patterns. Use when building UI, using design tokens, or working with the component library.

Code GenerationClaude