create-better-t-stack 0.1.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -49
- package/dist/index.js +135 -305
- package/package.json +19 -11
- package/template/base/_gitignore +2 -0
- package/template/base/package.json +18 -0
- package/template/base/packages/client/_gitignore +23 -0
- package/template/base/packages/client/components.json +21 -0
- package/template/base/packages/client/index.html +12 -0
- package/template/base/packages/client/package.json +49 -0
- package/template/base/packages/client/src/components/header.tsx +31 -0
- package/template/base/packages/client/src/components/loader.tsx +9 -0
- package/template/base/packages/client/src/components/mode-toggle.tsx +37 -0
- package/template/base/packages/client/src/components/theme-provider.tsx +73 -0
- package/template/base/packages/client/src/components/ui/button.tsx +57 -0
- package/template/base/packages/client/src/components/ui/card.tsx +92 -0
- package/template/base/packages/client/src/components/ui/checkbox.tsx +30 -0
- package/template/base/packages/client/src/components/ui/dropdown-menu.tsx +199 -0
- package/template/base/packages/client/src/components/ui/input.tsx +22 -0
- package/template/base/packages/client/src/components/ui/label.tsx +24 -0
- package/template/base/packages/client/src/components/ui/skeleton.tsx +15 -0
- package/template/base/packages/client/src/components/ui/sonner.tsx +29 -0
- package/template/base/packages/client/src/index.css +119 -0
- package/template/base/packages/client/src/lib/utils.ts +6 -0
- package/template/base/packages/client/src/main.tsx +72 -0
- package/template/base/packages/client/src/routes/__root.tsx +58 -0
- package/template/base/packages/client/src/routes/index.tsx +89 -0
- package/template/base/packages/client/src/utils/trpc.ts +4 -0
- package/template/base/packages/client/tsconfig.json +18 -0
- package/template/base/packages/client/vite.config.ts +14 -0
- package/template/base/packages/server/_gitignore +36 -0
- package/template/base/packages/server/package.json +27 -0
- package/template/base/packages/server/src/index.ts +41 -0
- package/template/base/packages/server/src/lib/context.ts +13 -0
- package/template/base/packages/server/src/lib/trpc.ts +8 -0
- package/template/base/packages/server/src/routers/index.ts +11 -0
- package/template/base/packages/server/tsconfig.json +18 -0
- package/template/base/turbo.json +27 -0
- package/template/examples/todo/packages/client/src/routes/todos.tsx +128 -0
- package/template/examples/todo/packages/server/src/routers/with-drizzle-todo.ts +44 -0
- package/template/examples/todo/packages/server/src/routers/with-prisma-todo.ts +55 -0
- package/template/with-auth/packages/client/src/components/auth-forms.tsx +13 -0
- package/template/with-auth/packages/client/src/components/header.tsx +34 -0
- package/template/with-auth/packages/client/src/components/sign-in-form.tsx +139 -0
- package/template/with-auth/packages/client/src/components/sign-up-form.tsx +164 -0
- package/template/with-auth/packages/client/src/components/user-menu.tsx +62 -0
- package/template/with-auth/packages/client/src/lib/auth-client.ts +5 -0
- package/template/with-auth/packages/client/src/main.tsx +78 -0
- package/template/with-auth/packages/client/src/routes/dashboard.tsx +36 -0
- package/template/with-auth/packages/client/src/routes/login.tsx +11 -0
- package/template/with-auth/packages/server/src/index.ts +46 -0
- package/template/with-auth/packages/server/src/lib/trpc.ts +24 -0
- package/template/with-auth/packages/server/src/routers/index.ts +19 -0
- package/template/with-biome/biome.json +42 -0
- package/template/with-drizzle-postgres/packages/server/drizzle.config.ts +10 -0
- package/template/with-drizzle-postgres/packages/server/src/db/index.ts +5 -0
- package/template/with-drizzle-postgres/packages/server/src/db/schema/auth.ts +47 -0
- package/template/with-drizzle-postgres/packages/server/src/db/schema/todo.ts +7 -0
- package/template/with-drizzle-postgres/packages/server/src/routers/todo.ts +44 -0
- package/template/with-drizzle-postgres/packages/server/src/with-auth-lib/auth.ts +15 -0
- package/template/with-drizzle-postgres/packages/server/src/with-auth-lib/context.ts +18 -0
- package/template/with-drizzle-postgres/packages/server/src/with-auth-lib/trpc.ts +24 -0
- package/template/with-drizzle-sqlite/packages/server/drizzle.config.ts +11 -0
- package/template/with-drizzle-sqlite/packages/server/src/db/index.ts +9 -0
- package/template/with-drizzle-sqlite/packages/server/src/db/schema/auth.ts +61 -0
- package/template/with-drizzle-sqlite/packages/server/src/db/schema/todo.ts +7 -0
- package/template/with-drizzle-sqlite/packages/server/src/with-auth-lib/auth.ts +15 -0
- package/template/with-drizzle-sqlite/packages/server/src/with-auth-lib/context.ts +18 -0
- package/template/with-drizzle-sqlite/packages/server/src/with-auth-lib/trpc.ts +24 -0
- package/template/with-husky/.husky/pre-commit +1 -0
- package/template/with-prisma-postgres/packages/server/prisma/index.ts +5 -0
- package/template/with-prisma-postgres/packages/server/prisma/schema/auth.prisma +59 -0
- package/template/with-prisma-postgres/packages/server/prisma/schema/schema.prisma +9 -0
- package/template/with-prisma-postgres/packages/server/prisma/schema/todo.prisma +7 -0
- package/template/with-prisma-postgres/packages/server/src/with-auth-lib/auth.ts +17 -0
- package/template/with-prisma-postgres/packages/server/src/with-auth-lib/context.ts +18 -0
- package/template/with-prisma-postgres/packages/server/src/with-auth-lib/trpc.ts +24 -0
- package/template/with-prisma-sqlite/packages/server/prisma/index.ts +5 -0
- package/template/with-prisma-sqlite/packages/server/prisma/schema/auth.prisma +59 -0
- package/template/with-prisma-sqlite/packages/server/prisma/schema/schema.prisma +8 -0
- package/template/with-prisma-sqlite/packages/server/prisma/schema/todo.prisma +7 -0
- package/template/with-prisma-sqlite/packages/server/src/with-auth-lib/auth.ts +17 -0
- package/template/with-prisma-sqlite/packages/server/src/with-auth-lib/context.ts +18 -0
- package/template/with-prisma-sqlite/packages/server/src/with-auth-lib/trpc.ts +24 -0
- package/template/with-pwa/packages/client/public/logo.png +0 -0
- package/template/with-pwa/packages/client/pwa-assets.config.ts +12 -0
- package/template/with-pwa/packages/client/vite.config.ts +35 -0
package/README.md
CHANGED
|
@@ -1,72 +1,82 @@
|
|
|
1
|
-
# Create Better-T-Stack
|
|
1
|
+
# Create Better-T-Stack CLI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- 🚀 Quick project setup with one command
|
|
8
|
-
- 📦 TypeScript/JavaScript support
|
|
9
|
-
- 🗄️ Database options (libSQL/PostgreSQL)
|
|
10
|
-
- 🔒 Optional authentication setup
|
|
11
|
-
- 🐳 Docker configuration
|
|
12
|
-
- 🔄 GitHub Actions workflows
|
|
13
|
-
- 🎯 SEO optimization
|
|
3
|
+
An interactive CLI tool to quickly scaffold full-stack TypeScript applications with React, Hono, and tRPC. The Better-T-Stack provides a modern, type-safe development experience with the best tools from the TypeScript ecosystem.
|
|
14
4
|
|
|
15
5
|
## Quick Start
|
|
16
6
|
|
|
17
|
-
|
|
18
|
-
# Using npm
|
|
19
|
-
npx create-better-t my-app
|
|
7
|
+
Run without installing globally:
|
|
20
8
|
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
```bash
|
|
10
|
+
npx create-better-t-stack@latest
|
|
11
|
+
# OR
|
|
12
|
+
bunx create-better-t-stack
|
|
23
13
|
```
|
|
24
14
|
|
|
25
|
-
|
|
15
|
+
Follow the prompts to configure your project.
|
|
16
|
+
|
|
17
|
+
## Features
|
|
26
18
|
|
|
27
|
-
|
|
19
|
+
- **Monorepo**: Turborepo for optimized build system and workspace management
|
|
20
|
+
- **Frontend**: React, TanStack Router, TanStack Query, Tailwind CSS with shadcn/ui components
|
|
21
|
+
- **Backend**: Hono, tRPC
|
|
22
|
+
- **Database Options**: SQLite (via Turso), PostgreSQL, or no database
|
|
23
|
+
- **ORM Selection**: Choose between Drizzle ORM or Prisma
|
|
24
|
+
- **Authentication**: Optional auth setup with Better-Auth
|
|
25
|
+
- **Progressive Web App**: Add PWA support with service workers and installable apps
|
|
26
|
+
- **Desktop Apps**: Build native desktop apps with Tauri integration
|
|
27
|
+
- **Code Quality**: Biome for linting and formatting
|
|
28
|
+
- **Git Hooks**: Husky with lint-staged for pre-commit checks
|
|
29
|
+
- **Examples**: Todo app with full CRUD functionality
|
|
30
|
+
- **Developer Experience**: Git initialization, various package manager support (npm, pnpm, bun)
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
28
33
|
|
|
29
34
|
```bash
|
|
30
|
-
Usage: create-better-t [project-directory] [options]
|
|
35
|
+
Usage: create-better-t-stack [project-directory] [options]
|
|
31
36
|
|
|
32
37
|
Options:
|
|
33
|
-
--
|
|
34
|
-
--
|
|
35
|
-
--
|
|
36
|
-
--
|
|
37
|
-
|
|
38
|
+
-V, --version Output the version number
|
|
39
|
+
-y, --yes Use default configuration
|
|
40
|
+
--no-database Skip database setup
|
|
41
|
+
--sqlite Use SQLite database
|
|
42
|
+
--postgres Use PostgreSQL database
|
|
43
|
+
--auth Include authentication
|
|
44
|
+
--no-auth Disable authentication
|
|
45
|
+
--pwa Include Progressive Web App support
|
|
46
|
+
--tauri Include Tauri desktop app support
|
|
47
|
+
--biome Include Biome for linting and formatting
|
|
48
|
+
--husky Include Husky, lint-staged for Git hooks
|
|
49
|
+
--no-addons Skip all additional addons
|
|
50
|
+
--examples <examples> Include specified examples
|
|
51
|
+
--no-examples Skip all examples
|
|
52
|
+
--git Initialize a new git repo (default)
|
|
53
|
+
--no-git Skip git initialization
|
|
54
|
+
--npm Use npm as package manager
|
|
55
|
+
--pnpm Use pnpm as package manager
|
|
56
|
+
--bun Use bun as package manager
|
|
57
|
+
--drizzle Use Drizzle ORM
|
|
58
|
+
--prisma Use Prisma ORM
|
|
59
|
+
--install Install dependencies (default)
|
|
60
|
+
--no-install Skip installing dependencies
|
|
61
|
+
--turso Set up Turso for SQLite database (default with sqlite)
|
|
62
|
+
--no-turso Skip Turso setup for SQLite database
|
|
63
|
+
-h, --help Display help
|
|
38
64
|
```
|
|
39
65
|
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
The generated project follows the Better-T Stack architecture:
|
|
43
|
-
- Built with Bun
|
|
44
|
-
- Type-safe database with DrizzleORM
|
|
45
|
-
- Simple authentication system
|
|
46
|
-
- Modern development practices
|
|
47
|
-
|
|
48
|
-
## Development
|
|
49
|
-
|
|
50
|
-
To contribute to this CLI:
|
|
66
|
+
## Examples
|
|
51
67
|
|
|
68
|
+
Create a project with default configuration:
|
|
52
69
|
```bash
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
# Install dependencies
|
|
57
|
-
bun install
|
|
58
|
-
|
|
59
|
-
# Start development
|
|
60
|
-
bun dev
|
|
70
|
+
npx create-better-t-stack my-app -y
|
|
71
|
+
```
|
|
61
72
|
|
|
62
|
-
|
|
63
|
-
|
|
73
|
+
Create a project with specific options:
|
|
74
|
+
```bash
|
|
75
|
+
npx create-better-t-stack my-app --postgres --prisma --auth --pwa --biome
|
|
64
76
|
```
|
|
65
77
|
|
|
66
78
|
## License
|
|
67
79
|
|
|
68
80
|
MIT
|
|
69
81
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Developed by Nitish Singh & Aman Varshney – Built on top of the Better-T Stack by [Aman Varshney](https://github.com/AmanVarshney01/Better-T-Stack)
|
|
82
|
+
Created by [Aman Varshney](https://github.com/AmanVarshney01) & [Nitish Singh](https://github.com/FgrReloaded)
|