๐ Quick and Easy TypeScript Express Starter
TypeScript Express Starter
๐ Express RESTful API Boilerplate Using TypeScript
๐ Introduction
TypeScript Express Starter is an interactive CLI tool that generates production-ready TypeScript Express projects with your preferred stack configuration.
Instead of starting from scratch, this CLI provides a comprehensive project generator with multiple database integrations, development tools, and deployment configurations. Choose from 10+ templates and customize your development workflow in minutes.
- Interactive Setup: Choose database, ORM, linter, testing framework, and more
- Production Ready: Docker, PM2, NGINX configurations included
- Developer Experience: Hot reload, testing, linting, and formatting pre-configured
- Multiple Stacks: Support for 10+ database/ORM combinations
๐ CLI Features
- ๐ฏ Interactive Setup โ Smart CLI with guided project configuration
- ๐ Quick or Custom Mode โ Start fast with presets or choose tools category by category
- ๐๏ธ Multiple Database Options โ Prisma, Sequelize, TypeORM, Mongoose, Knex, and more
- ๐ ๏ธ Development Tools โ Choose from ESLint, Biome, Jest, Vitest, Docker, PM2
- ๐ฑ Template Selection โ 10+ pre-configured project templates
- โก Auto Configuration โ Dependencies, scripts, and configs automatically setup
- ๐ง Smart Dependencies โ Tool compatibility and requirement resolution
- ๐ฆ Package Manager Agnostic โ Works with npm, pnpm, or yarn
- ๐ Zero Config Start โ Generated projects work immediately
- ๐จ Customizable โ Add your own templates and development tools
โก๏ธ Quick Start
# Install globally
npm install -g typescript-express-starter
Run the interactive CLI
typescript-express-starter
โ ๐ TypeScript Express Starter โ โ Choose setup mode: โ โ ๐ Quick start (recommended preset) (Automatically selects a sensible toolset) โ โ ๐ Custom (step-by-step) (Pick tools category by category) โ โ Which package manager do you want to use? โ โ npm โ โ pnpm โ โ yarn โ โ Choose a template: โ โ Express TypeScript (Basic Express + TypeScript starter ยท beginner ยท stable) โ โ Drizzle PostgreSQL (Modern SQL toolkit with type safety + full devtools ยท intermediate ยท stable) โ โ Enter your project name: โ your-project-name โ โ Choose quick profile: โ โ Minimal (Template only (no additional devtools)) โ โ Recommended (Balanced default toolchain) โ โ Full (One tool from each category) โ โ Preset โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ โ โ Quick profile selected: recommended (biome, tsup, vitest, docker) โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ โ Configuration summary โโโโโโโโโโโโโโโโโโโโโโโโโฎ โ โ โ Setup mode : quick โ โ Package manager: pnpm โ โ Template : Express TypeScript โ โ Project name : your-project-name โ โ Devtools : Biome, tsup, Vitest, Docker โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ โ Proceed with project generation? โ โ Yes / โ No โ โ ๐ฆ Base dependencies installed! โ โ ๐ Project setup complete!
Navigate to your project
cd your-project-name
Start development server
npm run dev
Generated Project Features:
- ๐ Express server:
http://localhost:3000/ - ๐ Hot reload with nodemon
๐ Generated Project Structure
When you create a new project, the CLI generates this structure:
your-project/
โโโ src/
โ โโโ config/ # Configuration files, environment settings
โ โโโ controllers/ # Request handling & response logic
โ โโโ dtos/ # Data Transfer Objects for request/response
โ โโโ entities/ # Database entities (if using ORM)
โ โโโ exceptions/ # Custom exception classes
โ โโโ interfaces/ # TypeScript interfaces and type definitions
โ โโโ middlewares/ # Middlewares (logging, auth, error handling)
โ โโโ repositories/ # Database access logic
โ โโโ routes/ # API route definitions
โ โโโ services/ # Business logic
โ โโโ utils/ # Utility/helper functions
โ โโโ app.ts # Express app initialization
โ โโโ server.ts # Server entry point
โโโ .env # Environment variables file
โโโ .env.development.local # Development environment variables
โโโ .env.production.local # Production environment variables
โโโ .env.test.local # Test environment variables
โโโ nodemon.json # Nodemon configuration
โโโ package.json # Project dependencies and scripts
โโโ tsconfig.json # TypeScript configuration
๐ Development Tools Available
Choose from these categories during project setup:
| Category | Available Tools | Description | | ------------- | --------------------------- | ----------------------------------------------- | | Linter | biome, eslint, oxlint | Code formatting & linting (Biome is all-in-one) | | Bundler | swc, tsup | Fast TypeScript compilation and bundling | | Testing | jest, vitest | Unit & integration testing frameworks | | Container | docker | Docker & docker-compose configuration |
To be added later (currently in progress):
| Category | Available Tools | Description | | ------------- | --------------- | ------------------------------------ | | Process | pm2 | Production process management | | CI/CD | github | GitHub Actions workflows | | Git Hooks | husky | Pre-commit hooks for quality control | | API Docs | swagger | OpenAPI/Swagger documentation |
Smart Selection: The CLI automatically resolves tool dependencies and compatibility.
๐งฉ Available Templates
Current template status with comprehensive compatibility tested:
โ Production Ready & Fully Tested
| Template | Description | Status | Compatibility | | -------------------- | --------------------------------------------------- | --------- | ------------- | | default | Express + TypeScript starter | โ
Active | ๐ฏ Baseline | | drizzle-postgresql | Drizzle ORM + PostgreSQL (Type-safe, Zero overhead) | โ
Active | ๐ 100% (8/8) |
๐ง Enhanced Development Tools Support
drizzle-postgresql template is fully compatible with:
Linters
- โ Biome - Modern unified tool (linter + formatter)
- โ ESLint + Prettier - Traditional reliable combination
- โ Oxlint - Rust-based high-performance linter (18ms!)
Compilers
- โ tsup - esbuild-based bundler (193ms build!)
- โ SWC - Rust-based native performance compiler
Test Runners
- โ Jest - Mature test framework with full E2E support
- โ Vitest - Modern Vite-based test runner
๐ฏ All 8 combinations tested and verified - Choose your preferred development experience!
๐ง Coming Soon
ORM/Database Integration
| Template | Description | Priority | | --------------- | --------------------------------------------------- | ---------- | | prisma | Type-safe database client with auto-generated types | ๐ฅ Next | | mongoose | Elegant MongoDB ODM for Node.js | ๐ฅ Next | | typeorm | Decorator-based Active Record ORM | ๐ง Planned | | sequelize | Mature Promise-based SQL ORM | ๐ง Planned | | mikro-orm | Data Mapper ORM pattern for TypeScript | ๐ง Planned | | typegoose | TypeScript-friendly Mongoose alternative | ๐ง Planned | | node-postgres | High-performance PostgreSQL native driver | ๐ง Planned | | knex | Flexible SQL query builder & migrations | ๐ง Planned |
Architecture/Controller Style
| Template | Description | Priority | | --------- | ------------------------------------- | ------------ | | graphql | GraphQL API schema with Apollo Server | ๐ง Knowledge |
๐ค Why Use This CLI?
vs. Manual Setup
| Aspect | Manual Setup | TypeScript Express Starter CLI | | ------------------ | ------------------------------- | ------------------------------------- | | Time | ๐ด Hours of configuration | โ 2-3 minutes interactive setup | | Configuration | ๐ด Manual dependency management | โ Auto-resolved, compatible versions | | Best Practices | ๐ด Research required | โ Pre-configured industry standards | | Consistency | ๐ด Varies by developer | โ Standardized project structure | | Updates | ๐ด Manual maintenance | โ CLI updates bring new features |
vs. Other Generators
| Feature | TypeScript Express Starter | Other Generators | | -------------------- | -------------------------- | ---------------- | | Database Choice | โ 10+ options planned | Limited options | | Tool Selection | โ Mix & match dev tools | Fixed stack | | TypeScript First | โ Built for TypeScript | Often JS-first | | Production Ready | โ Docker, PM2 included | Basic setup |
โญ๏ธ Stargazers
๐ด Forkers
๐ค Contributors
๐ณ License
Made with โค๏ธ by AGUMON ๐ฆ