ts-easy is your minimalist TypeScript starter for Node.js projects. No fluff, just the essentials to get you up and running with TypeScript, Biome, and more. Perfect for initiating any TypeScript project, whether it's a CLI tool, library, or something entirely different.
- TypeScript: Strongly typed JavaScript for the win.
- Biome: Unified linting and formatting - one tool to rule them all.
- tsx: Lightning-fast TypeScript execution with hot-reload for development.
- tsup: Super fast TypeScript bundler for production builds.
- Zod: Type-safe schema validation and environment variable management.
- dotenv: Secure environment variable handling with validation.
- pnpm: Fast, disk space-efficient package manager.
git clone https://github.com/yourusername/ts-easy.git
cd ts-easyMake sure you have pnpm installed. Then, run:
pnpm installCreate a .env file in the root directory:
NODE_ENV=development
PORT=3000
DATABASE_URL=your_database_url_here
LOG_LEVEL=infoKickstart your development with autoreload on save:
pnpm devReady to ship? Build your project with:
pnpm build
pnpm startts-easy/
βββ src/
β βββ main.ts # Entry point for your TypeScript project
β βββ env.ts # Environment variable validation with Zod
βββ build.ts # Build configurations for tsup
βββ biome.json # Biome linter and formatter configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Project metadata and scripts
βββ .env # Environment variables (create this file)
βββ pnpm-lock.yaml # Dependency lockfile- pnpm dev - Run your project in development mode with tsx (hot-reload enabled)
- pnpm build - Bundle your project for production using tsup
- pnpm start - Run the production build
- pnpm typecheck - Run TypeScript type checking without emitting files
- pnpm lint - Check your code with Biome linter
- pnpm lint:fix - Lint and auto-fix issues with Biome
- pnpm format - Format your code with Biome
- All-in-One Tooling: Biome replaces both ESLint and Prettier with a single, blazing-fast tool
- Type-Safe Everything: Zod schemas for runtime validation, including environment variables
- Production-Ready: Built-in environment validation ensures your app fails fast with clear error messages
- Zero Config: Sensible defaults out of the box, customize only when needed
- Modern Stack: Uses the latest tools (tsx, tsup, Biome) for the best developer experience
Environment variables are validated at runtime using Zod schemas in src/env.ts. Required variables:
NODE_ENV- Application environment (development/production/test)PORT- Server port (default: 3000)DATABASE_URL- Database connection string (required)LOG_LEVEL- Logging level (debug/info/warn/error, default: info)API_KEY- Optional API key
The application will fail at startup with clear error messages if required variables are missing or invalid.
This project is licensed under the MIT License.