better-ts-stack
v0.1.1
Published
A powerful CLI tool that generates fully configured TypeScript projects with backend, frontend, database integration, Docker support, and more--all through an interactive setup.
Maintainers
Readme
better-ts-stack
Generate production-ready TypeScript apps from an interactive CLI
better-ts-stack scaffolds backend and full-stack TypeScript projects with sensible defaults, batteries-included tooling, and optional database, auth, Docker, and git setup.
Quick Start
# Run instantly with npx
npx better-ts-stack
# Or install globally
npm install -g better-ts-stack
better-ts-stackRun the command, answer the prompts, and the CLI generates a ready-to-work project for you.
What It Can Scaffold
| Project type | Stack | Optional setup | | --- | --- | --- | | Backend API | Express + TypeScript | PostgreSQL, MongoDB, Prisma, Drizzle, Mongoose, JWT auth, Docker, git | | Full-stack app | Next.js 16 + React 19 + TypeScript | PostgreSQL, MongoDB, Prisma, Better Auth, Docker, git |
Notes:
- Express is the current backend implementation.
- NestJS appears in the prompt flow as "Coming Soon".
- Better Auth is only available for full-stack projects when a database is selected.
Interactive Prompt Flow
The CLI is fully interactive. There are no subcommands or flags.
You will be guided through:
- Project name
- Application type:
Backend APIorFull-stack App - Backend framework for backend apps:
Express(NestJSis coming soon) - Database:
none,PostgreSQL, orMongoDB - ORM/ODM when a database is selected
- PostgreSQL:
PrismaorDrizzle - MongoDB:
PrismaorMongoose
- PostgreSQL:
- Package manager:
npm,pnpm, orbun - Docker setup
- Authentication
- Express apps: JWT-based auth
- Next.js apps: Better Auth when a database is enabled
- Git initialization
- Dependency installation
The CLI does not ask for a port. Backend projects default to PORT=3000.
What You Get
Every generated project includes the essentials:
- TypeScript with strict mode enabled
- ESLint and Prettier pre-configured
.env.exampleand.envsetup- Ready-to-run project scripts
- Health check endpoint at
/healthfor backend projects - shadcn-compatible UI foundation for Next.js projects
- Database wiring and schema setup when selected
- Authentication scaffolding when selected
- Docker files when selected
- Optional git repository initialization
Requirements
- Node.js 18 or later
Links
License
MIT
