update readme

This commit is contained in:
Aman Varshney
2025-05-06 01:11:37 +05:30
parent adcabcfa7c
commit 317fd479de
5 changed files with 163 additions and 81 deletions

View File

@@ -2,11 +2,7 @@
A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations
## Sponsors
<p align="center">
<img src="https://cdn.jsdelivr.net/gh/amanvarshney01/sponsors@master/sponsorkit/sponsors.svg" alt="Sponsors" width="300">
</p>
![demo](https://cdn.jsdelivr.net/gh/amanvarshney01/create-better-t-stack@master/demo.gif)
## Quick Start
@@ -27,35 +23,21 @@ Follow the prompts to configure your project or use the `--yes` flag for default
## Features
- **TypeScript**: End-to-end type safety.
- **Monorepo Structure**: Choose between Turborepo for optimized builds or standard pnpm/npm/bun workspaces.
- **Frontend Options**:
- React with Vite: TanStack Router, React Router, or TanStack Start.
- Next.js (Full-stack or frontend-only).
- Nuxt (Vue framework).
- SvelteKit.
- React Native with Expo for mobile apps.
- None.
- **UI**: Tailwind CSS with shadcn/ui components pre-configured.
- **Backend Frameworks**: Choose between Hono, Express, Elysia, or use Next.js API routes.
- **API Layer**: End-to-end type safety with tRPC or oRPC.
- **Runtime Options**: Choose between Bun or Node.js for your server.
- **Database Options**: SQLite, PostgreSQL, MySQL, MongoDB, or no database.
- **ORM Selection**: Choose between Drizzle ORM (TypeScript-first), Prisma (feature-rich), or no ORM.
- **Database Setup**: Optional automated setup for Turso (SQLite), Neon (Postgres), Prisma Postgres (Supabase), or MongoDB Atlas.
- **Authentication**: Optional auth setup using Better-Auth (email/password, OAuth coming soon).
- **Addons**:
- **PWA**: Add Progressive Web App support.
- **Tauri**: Build native desktop applications.
- **Starlight**: Add an Astro-based documentation site.
- **Biome**: Integrated linting and formatting.
- **Husky**: Git hooks for code quality checks (lint-staged).
- **Turborepo**: Optimized monorepo build system.
- **Examples**: Include pre-built examples like a Todo app or an AI Chat interface (using Vercel AI SDK).
- **Developer Experience**:
- Automatic Git initialization.
- Choice of package manager (npm, pnpm, bun).
- Optional automatic dependency installation.
| Category | Options |
|----------|---------|
| **TypeScript** | End-to-end type safety across all parts of your application |
| **Frontend** | • React with TanStack Router<br>• React with React Router<br>• React with TanStack Start (SSR)<br>• Next.js<br>• SvelteKit<br>• Nuxt (Vue)<br>• SolidJS<br>• React Native with Expo<br>• None |
| **Backend** | • Hono<br>• Express<br>• Elysia<br>• Next.js API routes<br>• Convex |
| **API Layer** | • tRPC (type-safe APIs)<br>• oRPC (OpenAPI-compatible type-safe APIs) |
| **Runtime** | • Bun<br>• Node.js |
| **Database** | • SQLite<br>• PostgreSQL<br>• MySQL<br>• MongoDB<br>• None |
| **ORM** | • Drizzle (TypeScript-first)<br>• Prisma (feature-rich)<br>• Mongoose (for MongoDB)<br> None |
| **Database Setup** | • Turso (SQLite)<br>• Neon (PostgreSQL)<br>• Prisma Postgres (via Prisma Accelerate)<br>• MongoDB Atlas<br>• None (manual setup) |
| **Authentication** | Better-Auth (email/password, with more options coming soon) |
| **Styling** | Tailwind CSS with shadcn/ui components |
| **Addons** | • PWA support<br>• Tauri (desktop applications)<br>• Starlight (documentation site)<br>• Biome (linting and formatting)<br>• Husky (Git hooks)<br>• Turborepo (optimized builds) |
| **Examples** | • Todo app<br>• AI Chat interface (using Vercel AI SDK) |
| **Developer Experience** | • Automatic Git initialization<br>• Package manager choice (npm, pnpm, bun)<br>• Automatic dependency installation |
## Usage
@@ -66,10 +48,10 @@ Options:
-V, --version Output the version number
-y, --yes Use default configuration
--database <type> Database type (none, sqlite, postgres, mysql, mongodb)
--orm <type> ORM type (none, drizzle, prisma)
--orm <type> ORM type (none, drizzle, prisma, mongoose)
--auth Include authentication
--no-auth Exclude authentication
--frontend <types...> Frontend types (tanstack-router, react-router, tanstack-start, next, nuxt, svelte, native, none)
--frontend <types...> Frontend types (tanstack-router, react-router, tanstack-start, next, nuxt, svelte, solid, native, none)
--addons <types...> Additional addons (pwa, tauri, starlight, biome, husky, turborepo, none)
--examples <types...> Examples to include (todo, ai, none)
--git Initialize git repository
@@ -78,9 +60,9 @@ Options:
--install Install dependencies
--no-install Skip installing dependencies
--db-setup <setup> Database setup (turso, neon, prisma-postgres, mongodb-atlas, none)
--backend <framework> Backend framework (hono, express, elysia)
--runtime <runtime> Runtime (bun, node)
--api <type> API type (trpc, orpc)
--backend <framework> Backend framework (hono, express, elysia, next, convex)
--runtime <runtime> Runtime (bun, node, none)
--api <type> API type (trpc, orpc, none)
-h, --help Display help
```
@@ -98,13 +80,13 @@ Create a project with specific options:
npx create-better-t-stack my-app --database postgres --orm drizzle --auth --addons pwa biome
```
Create a project with Elysia and Node.js runtime:
Create a project with Elysia backend and Node.js runtime:
```bash
npx create-better-t-stack my-app --backend elysia --runtime node
```
Create a project with specific frontend options:
Create a project with multiple frontend options:
```bash
npx create-better-t-stack my-app --frontend tanstack-router native
@@ -119,7 +101,13 @@ npx create-better-t-stack my-app --examples todo ai
Create a project with Turso database setup:
```bash
npx create-better-t-stack my-app --db-setup turso
npx create-better-t-stack my-app --database sqlite --orm drizzle --db-setup turso
```
Create a project with Convex backend:
```bash
npx create-better-t-stack my-app --backend convex --frontend tanstack-router
```
Create a project with documentation site:
@@ -127,3 +115,34 @@ Create a project with documentation site:
```bash
npx create-better-t-stack my-app --addons starlight
```
## Compatibility Notes
- **Convex backend**: Automatically disables authentication, database, ORM, and API options
- **SvelteKit, Nuxt, and SolidJS** frontends are only compatible with oRPC API layer
- **PWA support** requires React with TanStack Router, React Router, or SolidJS
- **Tauri desktop app** requires React (TanStack Router/React Router), Nuxt, SvelteKit, or SolidJS
- **AI example** is not compatible with Elysia backend or SolidJS frontend
## Project Structure
The created project follows a clean monorepo structure:
```
my-better-t-app/
├── apps/
│ ├── web/ # Frontend application
│ ├── server/ # Backend API
│ ├── native/ # (optional) Mobile application
│ └── docs/ # (optional) Documentation site
├── packages/ # Shared packages
└── README.md # Auto-generated project documentation
```
After project creation, you'll receive detailed instructions for next steps and additional setup requirements.
## Sponsors
<p align="center">
<img src="https://cdn.jsdelivr.net/gh/amanvarshney01/sponsors@master/sponsorkit/sponsors.svg" alt="Sponsors" width="300">
</p>