Scaffold Production-Ready TypeScript Projects
Scaffolds production-ready TypeScript projects - Next.js, React+Vite, Node.js API, or library - with pnpm, Vitest, and strict tsconfig.
Why it matters
Automate the creation of robust, type-safe TypeScript applications. This asset generates complete project structures for Next.js, React+Vite, Node.js APIs, and libraries, complete with modern tooling, testing, and best-practice configurations.
Outcomes
What it gets done
Generate project structure for Next.js, React+Vite, Node.js API, or TypeScript libraries.
Configure pnpm, Vite, Next.js, and Express for optimal development.
Set up type safety with TypeScript and modern configuration.
Integrate testing frameworks like Vitest and ESLint for code quality.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-javascript-typescript-typescript-scaffold | bash Overview
TypeScript Project Scaffolding
Scaffolds complete TypeScript project structures - Next.js, React+Vite, Node.js API, or library - with package.json, strict tsconfig, framework config, and pnpm/Vitest/ESLint tooling. Use when starting a new TypeScript project that needs a consistent, type-safe structure, not for adding scaffolding to an existing project.
What it does
A scaffolding skill that generates complete, production-ready TypeScript project structures for four project types: Next.js (full-stack React with SSR/SSG and API routes, scaffolded via pnpm create next-app), React + Vite (SPA or component libraries via pnpm create vite), a Node.js API (Express with a routes, controllers, services, and models layered structure), and a publishable TypeScript library (with dual main, types, and exports package.json fields for proper module resolution). For each project type it produces the full directory tree, a working package.json with pinned dependency versions and scripts (dev, build, test, lint, type-check), a strict tsconfig.json (ES2022 target, strict mode, path aliases), and framework-specific config such as a vite.config.ts with a Vitest test block or an Express app.ts entry point wiring routes and error-handling middleware. It also generates shared development tooling regardless of project type: a .env.example, a vitest.config.ts with V8 coverage reporting, and an .eslintrc.json using @typescript-eslint/recommended with no-explicit-any set to warn and no-unused-vars set to error.
When to use - and when NOT to
Use when starting a new TypeScript project and needing a consistent, type-safe structure rather than assembling config files by hand - choosing between Next.js, React+Vite, a Node.js API, or a library based on the stated project type. Not for adding scaffolding to an existing, already-structured project, since it generates a fresh tree, and not for non-TypeScript or non-pnpm workflows without adaptation - the generated configs assume pnpm as the package manager and Vitest as the test runner throughout.
Inputs and outputs
Input is the target project type (Next.js, React+Vite, Node.js API, or library) plus any project-specific requirements. Output is a complete directory tree, package.json, tsconfig.json, framework config, an entry point with type-safe setup, a Vitest test structure, a README, and development tooling files such as .env.example, .gitignore, and ESLint config.
### 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
Integrations
Built around pnpm for package management, Vitest for testing with V8 coverage, ESLint with @typescript-eslint, and framework-specific tooling per project type: Next.js's own CLI and Tailwind, Vite's @vitejs/plugin-react, Express with zod for the Node.js API, and a tsconfig.build.json for libraries.
Who it's for
Developers and teams starting a new TypeScript project who want a consistent, opinionated, production-ready starting structure - correct tsconfig strictness, test setup, and lint rules from commit one - rather than copying scaffolding from a previous project.
FAQ
Common questions
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.