Skip to content

ljlm0402/typescript-express-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

563 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Project Logo

TypeScript Express Starter

πŸš€ Express RESTful API Boilerplate Using TypeScript

npm Info

npm Version npm Release Version npm Downloads npm Package License

github Stars github Forks github Contributors github Issues




πŸ“ 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

  • πŸ—„οΈ 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 # Follow the prompts to: # 1. Choose package manager (npm/pnpm/yarn) # 2. Select project template (default/prisma/sequelize/etc.) # 3. Enter project name # 4. Pick development tools (linting/testing/docker/etc.) # Navigate to your project cd your-project-name # Start development server npm run dev

Generated Project Features:

  • 🌐 Express server: http://localhost:3000/
  • πŸ“š Auto-generated API docs: http://localhost:3000/api-docs
  • πŸ”„ Hot reload with nodemon
  • πŸ§ͺ Testing setup included

πŸ“‚ 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/models (if ORM selected) β”‚ β”œβ”€β”€ 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 (multiple stages) β”œβ”€β”€ nodemon.json # Development server configuration β”œβ”€β”€ package.json # Dependencies and scripts β”œβ”€β”€ tsconfig.json # TypeScript configuration └── docker-compose.yml # Docker setup (if selected)

πŸ›  Development Tools Available

Choose from these categories during project setup:

Category Available Tools Description
Linter biome, eslint Code formatting & linting (Biome is all-in-one)
Bundler swc, tsup Fast TypeScript compilation and bundling
Testing jest, vitest Unit & integration testing frameworks
Process pm2 Production process management
CI/CD github GitHub Actions workflows
Git Hooks husky Pre-commit hooks for quality control
Container docker Docker & docker-compose configuration
API Docs swagger OpenAPI/Swagger documentation

Smart Selection: The CLI automatically resolves tool dependencies and compatibility.

🧩 Available Templates

Current template status (more coming soon!):

βœ… Currently Available

Template Description Status
default Express + TypeScript starter βœ… Active

🚧 Coming Soon

ORM/Database Integration

Template Description Priority
prisma Type-safe database client with auto-generated types πŸ”₯ High
drizzle TypeScript-first ORM with zero runtime overhead πŸ”₯ High
mikro-orm Data Mapper ORM pattern for TypeScript πŸ”₯ High
mongoose Elegant MongoDB ODM for Node.js πŸ”₯ High
node-postgres High-performance PostgreSQL native driver 🚧 In Dev
knex Flexible SQL query builder & migrations 🚧 In Dev
typeorm Decorator-based Active Record ORM 🚧 In Dev
sequelize Mature Promise-based SQL ORM 🚧 In Dev
typegoose TypeScript-friendly Mongoose alternative 🚧 In Dev

Architecture/Controller Style

Template Description Priority
graphql GraphQL API schema with Apollo Server 🚧 In Dev

Note: Currently focusing on the default template. Additional templates will be activated as they're completed and tested.

πŸ€” 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

πŸ“„ License

MIT(LICENSE) Β© AGUMON (ljlm0402)

⭐️ Stargazers

Stargazers repo roster for @ljlm0402/typescript-express-starter

🍴 Forkers

Forkers repo roster for @ljlm0402/typescript-express-starter

🀝 Contributors

Contributors repo roster for @ljlm0402/typescript-express-starter