ljlm0402/typescript-express-starter
ljlm0402/typescript-express-starter has 2,872 GitHub stars and 437 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-07 00:48 UTC. Last push 2026-11-01.
๐ Quick and Easy TypeScript Express Starter
What you can do
- ๐ฏ Interactive Setup โ Smart CLI with guided project configuration
- ๐ Quick or Custom Mode โ Start fast with presets or choose tools category by category
- ๐๏ธ PostgreSQL Integration โ Drizzle ORM template with database scripts
- ๐ ๏ธ Development Tools โ Choose from ESLint, Biome, Oxlint, SWC, tsup, Jest, Vitest, Docker
Measured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
TypeScript Express Starter
๐ Express RESTful API Boilerplate Using TypeScript
๐ Introduction
TypeScript Express Starter is an interactive CLI tool that generates TypeScript Express projects with your preferred stack configuration.
Start with a basic Express template, Drizzle + PostgreSQL, or decorator-based request validation with express-cargo. Select development tools to generate the dependencies, scripts, and configuration files for your workflow.
- Interactive Setup: Choose database, ORM, linter, testing framework, and more
- Docker Support: Development and production Dockerfiles when Docker is selected
- Developer Experience: Hot reload plus configuration for your selected testing and linting tools
- Template Choices: Basic Express, Drizzle + PostgreSQL, and express-cargo
๐ CLI Features
๐ฏ Interactive Setup โ Smart CLI with guided project configuration
๐ Quick or Custom Mode โ Start fast with presets or choose tools category by category
๐๏ธ PostgreSQL Integration โ Drizzle ORM template with database scripts
๐ ๏ธ Development Tools โ Choose from ESLint, Biome, Oxlint, SWC, tsup, Jest, Vitest, Docker
๐ฑ Template Selection โ Three active templates with authentication and user management examples
โก Auto Configuration โ Dependencies, scripts, and configs automatically setup
๐ง Dependency Setup โ Collect selected tool dependencies and install them in one step
๐ฆ Package Manager Agnostic โ Works with npm, pnpm, or yarn
๐ Environment Setup โ Generate
.envfrom.env.examplewith random authentication secrets๐จ Customizable โ Add your own templates and development tools
โก๏ธ Quick Start
Requirements: Node.js 22.12.0 or later and npm 9.11.0 or later. Install pnpm or Yarn separately if you select it in the CLI. Docker with Compose is required to use the Docker configuration.
You can also run the CLI without a global installation:
npx typescript-express-starter
# 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)
โ โ Express + express-cargo (Declarative validation & binding with decorators ยท 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 (eslint, tsup, vitest, docker) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ Configuration summary โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Setup mode : quick โ
โ Package manager: npm โ
โ Template : Express TypeScript โ
โ Project name : your-project-name โ
โ Devtools : ESLint + Prettier, tsup, Vitest, Docker โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ Proceed with project generation?
โ โ Yes / โ No
โ
โ 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
Environment and startup
The CLI creates .env from .env.example and generates random values for SECRET_KEY and JWT_SECRET when those keys are present. Existing .env files are preserved. Secrets must be at least 32 characters and must not contain known placeholder values. Review the generated settings before deployment.
For Drizzle, configure DATABASE_URL, prepare PostgreSQL, and run npm run db:migrate before using the API. The default and express-cargo templates do not require a database. Use pnpm dev or yarn dev if you selected that package manager.
Authentication and user routes are mounted under /api/v1/auth and /api/v1/users; the root URL is not a landing page.
๐ 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/ # Domain entities
โ โโโ exceptions/ # Custom exception classes
โ โโโ interfaces/ # TypeScript interfaces and type definitions
โ โโโ middlewares/ # Middlewares (logging, auth, error handling)
โ โโโ repositories/ # Data access (in-memory or database)
โ โโโ routes/ # API route definitions
โ โโโ services/ # Business logic
โ โโโ utils/ # Utility/helper functions
โ โโโ app.ts # Express app initialization
โ โโโ server.ts # Server entry point
โโโ .env # Generated local environment settings
โโโ .env.example # Environment variable reference
โโโ .gitignore # Excludes secrets and generated files
โโโ .project-meta.json # Selected template, tools, and package manager
โโโ nodemon.json # Nodemon configuration
โโโ package.json # Project dependencies and scripts
โโโ tsconfig.json # TypeScript configuration
Compiler, test, and Docker files are added according to the selected tools. Environment-specific .env.{NODE_ENV}.local files are optional and are not generated. CLI updates apply to newly generated projects; existing projects are maintained separately.
๐ 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 |
Dockerfiles & 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: Recommended profiles use template-specific tool choices. The CLI copies the matching compiler and test configuration and reports missing required assets.
๐งฉ Available Templates
The following templates are available in the CLI and included in the npm package:
โ Active Templates
| Template | Description | Storage |
|---|---|---|
default |
Express + TypeScript with Zod request validation | In-memory |
drizzle-postgresql |
Drizzle ORM with PostgreSQL | PostgreSQL |
express-cargo |
Decorator-based DTO validation and request binding | In-memory |
The in-memory templates reset user data when the process restarts. See the express-cargo guide for DTO and binding examples.
๐ง Enhanced Development Tools Support
The active templates provide configuration for the following tools:
Linters
- โ Biome - Modern unified tool (linter + formatter)
- โ ESLint + Prettier - Traditional reliable combination
- โ Oxlint - Rust-based high-performance linter
Compilers
- โ tsup - esbuild-based bundler
- โ SWC - Rust-based native performance compiler
Test Runners
- โ Jest - Mature test framework with full E2E support
- โ Vitest - Modern Vite-based test runner
๐ฏ Generation tests cover 36 combinations across the active templates, linters, compilers, test runners, and Docker. Runtime compatibility checks are available separately with
npm run test:matrix.
๐ง Coming Soon
The entries below are not selectable in the CLI. Prisma and Mongoose implementations exist in the repository but are excluded from the npm package while verification is pending.
ORM/Database Integration
| Template | Description | Priority |
|---|---|---|
prisma-postgresql |
Type-safe database client with auto-generated types | ๐ฅ Next |
mongoose-mongodb |
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 | โ Guided 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 | โ Updated templates for new projects |
vs. Other Generators
| Feature | TypeScript Express Starter | Other Generators |
|---|---|---|
| Database Choice | โ PostgreSQL; more integrations planned | Limited options |
| Tool Selection | โ Mix & match dev tools | Fixed stack |
| TypeScript First | โ Built for TypeScript | Often JS-first |
| Production Ready | โ Optional Docker configuration | Basic setup |
โญ๏ธ Stargazers
๐ด Forkers
๐ค Contributors
๐ณ License
Made with โค๏ธ by AGUMON ๐ฆ
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,627 starspublic-apis/public-apis
A collective list of free APIs
496,884 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
439,619 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. ๐ฆ
394,106 stars