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.
Files changed (86) hide show
  1. package/README.md +59 -49
  2. package/dist/index.js +135 -305
  3. package/package.json +19 -11
  4. package/template/base/_gitignore +2 -0
  5. package/template/base/package.json +18 -0
  6. package/template/base/packages/client/_gitignore +23 -0
  7. package/template/base/packages/client/components.json +21 -0
  8. package/template/base/packages/client/index.html +12 -0
  9. package/template/base/packages/client/package.json +49 -0
  10. package/template/base/packages/client/src/components/header.tsx +31 -0
  11. package/template/base/packages/client/src/components/loader.tsx +9 -0
  12. package/template/base/packages/client/src/components/mode-toggle.tsx +37 -0
  13. package/template/base/packages/client/src/components/theme-provider.tsx +73 -0
  14. package/template/base/packages/client/src/components/ui/button.tsx +57 -0
  15. package/template/base/packages/client/src/components/ui/card.tsx +92 -0
  16. package/template/base/packages/client/src/components/ui/checkbox.tsx +30 -0
  17. package/template/base/packages/client/src/components/ui/dropdown-menu.tsx +199 -0
  18. package/template/base/packages/client/src/components/ui/input.tsx +22 -0
  19. package/template/base/packages/client/src/components/ui/label.tsx +24 -0
  20. package/template/base/packages/client/src/components/ui/skeleton.tsx +15 -0
  21. package/template/base/packages/client/src/components/ui/sonner.tsx +29 -0
  22. package/template/base/packages/client/src/index.css +119 -0
  23. package/template/base/packages/client/src/lib/utils.ts +6 -0
  24. package/template/base/packages/client/src/main.tsx +72 -0
  25. package/template/base/packages/client/src/routes/__root.tsx +58 -0
  26. package/template/base/packages/client/src/routes/index.tsx +89 -0
  27. package/template/base/packages/client/src/utils/trpc.ts +4 -0
  28. package/template/base/packages/client/tsconfig.json +18 -0
  29. package/template/base/packages/client/vite.config.ts +14 -0
  30. package/template/base/packages/server/_gitignore +36 -0
  31. package/template/base/packages/server/package.json +27 -0
  32. package/template/base/packages/server/src/index.ts +41 -0
  33. package/template/base/packages/server/src/lib/context.ts +13 -0
  34. package/template/base/packages/server/src/lib/trpc.ts +8 -0
  35. package/template/base/packages/server/src/routers/index.ts +11 -0
  36. package/template/base/packages/server/tsconfig.json +18 -0
  37. package/template/base/turbo.json +27 -0
  38. package/template/examples/todo/packages/client/src/routes/todos.tsx +128 -0
  39. package/template/examples/todo/packages/server/src/routers/with-drizzle-todo.ts +44 -0
  40. package/template/examples/todo/packages/server/src/routers/with-prisma-todo.ts +55 -0
  41. package/template/with-auth/packages/client/src/components/auth-forms.tsx +13 -0
  42. package/template/with-auth/packages/client/src/components/header.tsx +34 -0
  43. package/template/with-auth/packages/client/src/components/sign-in-form.tsx +139 -0
  44. package/template/with-auth/packages/client/src/components/sign-up-form.tsx +164 -0
  45. package/template/with-auth/packages/client/src/components/user-menu.tsx +62 -0
  46. package/template/with-auth/packages/client/src/lib/auth-client.ts +5 -0
  47. package/template/with-auth/packages/client/src/main.tsx +78 -0
  48. package/template/with-auth/packages/client/src/routes/dashboard.tsx +36 -0
  49. package/template/with-auth/packages/client/src/routes/login.tsx +11 -0
  50. package/template/with-auth/packages/server/src/index.ts +46 -0
  51. package/template/with-auth/packages/server/src/lib/trpc.ts +24 -0
  52. package/template/with-auth/packages/server/src/routers/index.ts +19 -0
  53. package/template/with-biome/biome.json +42 -0
  54. package/template/with-drizzle-postgres/packages/server/drizzle.config.ts +10 -0
  55. package/template/with-drizzle-postgres/packages/server/src/db/index.ts +5 -0
  56. package/template/with-drizzle-postgres/packages/server/src/db/schema/auth.ts +47 -0
  57. package/template/with-drizzle-postgres/packages/server/src/db/schema/todo.ts +7 -0
  58. package/template/with-drizzle-postgres/packages/server/src/routers/todo.ts +44 -0
  59. package/template/with-drizzle-postgres/packages/server/src/with-auth-lib/auth.ts +15 -0
  60. package/template/with-drizzle-postgres/packages/server/src/with-auth-lib/context.ts +18 -0
  61. package/template/with-drizzle-postgres/packages/server/src/with-auth-lib/trpc.ts +24 -0
  62. package/template/with-drizzle-sqlite/packages/server/drizzle.config.ts +11 -0
  63. package/template/with-drizzle-sqlite/packages/server/src/db/index.ts +9 -0
  64. package/template/with-drizzle-sqlite/packages/server/src/db/schema/auth.ts +61 -0
  65. package/template/with-drizzle-sqlite/packages/server/src/db/schema/todo.ts +7 -0
  66. package/template/with-drizzle-sqlite/packages/server/src/with-auth-lib/auth.ts +15 -0
  67. package/template/with-drizzle-sqlite/packages/server/src/with-auth-lib/context.ts +18 -0
  68. package/template/with-drizzle-sqlite/packages/server/src/with-auth-lib/trpc.ts +24 -0
  69. package/template/with-husky/.husky/pre-commit +1 -0
  70. package/template/with-prisma-postgres/packages/server/prisma/index.ts +5 -0
  71. package/template/with-prisma-postgres/packages/server/prisma/schema/auth.prisma +59 -0
  72. package/template/with-prisma-postgres/packages/server/prisma/schema/schema.prisma +9 -0
  73. package/template/with-prisma-postgres/packages/server/prisma/schema/todo.prisma +7 -0
  74. package/template/with-prisma-postgres/packages/server/src/with-auth-lib/auth.ts +17 -0
  75. package/template/with-prisma-postgres/packages/server/src/with-auth-lib/context.ts +18 -0
  76. package/template/with-prisma-postgres/packages/server/src/with-auth-lib/trpc.ts +24 -0
  77. package/template/with-prisma-sqlite/packages/server/prisma/index.ts +5 -0
  78. package/template/with-prisma-sqlite/packages/server/prisma/schema/auth.prisma +59 -0
  79. package/template/with-prisma-sqlite/packages/server/prisma/schema/schema.prisma +8 -0
  80. package/template/with-prisma-sqlite/packages/server/prisma/schema/todo.prisma +7 -0
  81. package/template/with-prisma-sqlite/packages/server/src/with-auth-lib/auth.ts +17 -0
  82. package/template/with-prisma-sqlite/packages/server/src/with-auth-lib/context.ts +18 -0
  83. package/template/with-prisma-sqlite/packages/server/src/with-auth-lib/trpc.ts +24 -0
  84. package/template/with-pwa/packages/client/public/logo.png +0 -0
  85. package/template/with-pwa/packages/client/pwa-assets.config.ts +12 -0
  86. 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
- A CLI tool to scaffold Better-T Stack projects with best practices and modern tooling.
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
- ```bash
18
- # Using npm
19
- npx create-better-t my-app
7
+ Run without installing globally:
20
8
 
21
- # Using bun
22
- bunx create-better-t my-app
9
+ ```bash
10
+ npx create-better-t-stack@latest
11
+ # OR
12
+ bunx create-better-t-stack
23
13
  ```
24
14
 
25
- Just follow the interactive prompts!
15
+ Follow the prompts to configure your project.
16
+
17
+ ## Features
26
18
 
27
- ## Options
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
- --typescript Use TypeScript (default)
34
- --javascript Use JavaScript
35
- --git Initialize git repository (default)
36
- --no-git Skip git initialization
37
- -h, --help Display help
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
- ## Project Structure
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
- # Clone the repository
54
- git clone https://github.com/your-username/better-t-stack-cli.git
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
- # Build
63
- bun run build
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
- ## Credits
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)