A minimal TypeScript Node.js scaffold with modern ES modules, strict type checking, and a fast development workflow.
- TypeScript 5.9 with strict mode enabled
- ES2022 target with Node.js ES modules (
nodenext) - Fast development with hot reload via
tsx - Source maps and type declarations for production
- Zero runtime dependencies
- Node.js 18.0.0 or higher
# Install dependencies
npm install
# Start development with hot reload
npm run dev
# Build for production
npm run build
# Run production build
npm start| Script | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Compile TypeScript to JavaScript |
npm start |
Run the compiled application |
npm run clean |
Remove the dist directory |
├── src/
│ └── index.ts # Application entry point
├── dist/ # Compiled output (generated)
├── package.json
├── tsconfig.json
└── .env.example # Environment variables template
This scaffold uses a strict TypeScript configuration:
- Strict mode enabled with additional checks
- noUncheckedIndexedAccess - Prevents unsafe array/object indexing
- exactOptionalPropertyTypes - Strict optional property handling
- verbatimModuleSyntax - Preserves import/export syntax
- React JSX support - Ready for JSX if needed
Copy .env.example to .env and configure your environment variables:
cp .env.example .envThis scaffold is intentionally minimal. Common additions:
- Linting: Add ESLint with
@typescript-eslint - Formatting: Add Prettier
- Testing: Add Vitest or Jest
- Git hooks: Add Husky with lint-staged
MIT