create-better-t-stack 2.29.3 → 2.30.0
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 +10 -13
- package/dist/index.js +391 -423
- package/package.json +1 -1
- package/templates/addons/vibe-rules/.bts/rules.md.hbs +132 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.30.0",
|
|
4
4
|
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Better-T-Stack Project Rules
|
|
2
|
+
|
|
3
|
+
This is a {{projectName}} project created with Better-T-Stack CLI.
|
|
4
|
+
|
|
5
|
+
## Project Structure
|
|
6
|
+
|
|
7
|
+
This is a monorepo with the following structure:
|
|
8
|
+
|
|
9
|
+
{{#if (or (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "tanstack-start")
|
|
10
|
+
(includes frontend "next") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid"))}}
|
|
11
|
+
- **`apps/web/`** - Frontend application{{#if (includes frontend "tanstack-router")}} (React with TanStack Router){{else
|
|
12
|
+
if (includes frontend "react-router")}} (React with React Router){{else if (includes frontend "next")}} (Next.js){{else
|
|
13
|
+
if (includes frontend "nuxt")}} (Nuxt.js){{else if (includes frontend "svelte")}} (SvelteKit){{else if (includes
|
|
14
|
+
frontend "solid")}} (SolidStart){{/if}}
|
|
15
|
+
{{/if}}
|
|
16
|
+
|
|
17
|
+
{{#if (ne backend "convex")}}
|
|
18
|
+
{{#if (ne backend "none")}}
|
|
19
|
+
- **`apps/server/`** - Backend server{{#if (eq backend "hono")}} (Hono){{else if (eq backend "express")}}
|
|
20
|
+
(Express){{else if (eq backend "fastify")}} (Fastify){{else if (eq backend "elysia")}} (Elysia){{else if (eq backend
|
|
21
|
+
"next")}} (Next.js API){{/if}}
|
|
22
|
+
{{/if}}
|
|
23
|
+
{{else}}
|
|
24
|
+
- **`packages/backend/`** - Convex backend functions
|
|
25
|
+
{{/if}}
|
|
26
|
+
|
|
27
|
+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
28
|
+
- **`apps/native/`** - React Native mobile app{{#if (includes frontend "native-nativewind")}} (with NativeWind){{else if
|
|
29
|
+
(includes frontend "native-unistyles")}} (with Unistyles){{/if}}
|
|
30
|
+
{{/if}}
|
|
31
|
+
|
|
32
|
+
## Available Scripts
|
|
33
|
+
|
|
34
|
+
- `{{packageManager}} run dev` - Start all apps in development mode
|
|
35
|
+
{{#if (or (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "tanstack-start")
|
|
36
|
+
(includes frontend "next") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid"))}}
|
|
37
|
+
- `{{packageManager}} run dev:web` - Start only the web app
|
|
38
|
+
{{/if}}
|
|
39
|
+
{{#if (ne backend "none")}}
|
|
40
|
+
{{#if (ne backend "convex")}}
|
|
41
|
+
- `{{packageManager}} run dev:server` - Start only the server
|
|
42
|
+
{{/if}}
|
|
43
|
+
{{/if}}
|
|
44
|
+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
45
|
+
- `{{packageManager}} run dev:native` - Start only the native app
|
|
46
|
+
{{/if}}
|
|
47
|
+
|
|
48
|
+
{{#if (and (ne database "none") (ne orm "none") (ne backend "convex"))}}
|
|
49
|
+
## Database Commands
|
|
50
|
+
|
|
51
|
+
All database operations should be run from the server workspace:
|
|
52
|
+
|
|
53
|
+
- `{{packageManager}} run db:push` - Push schema changes to database
|
|
54
|
+
- `{{packageManager}} run db:studio` - Open database studio
|
|
55
|
+
- `{{packageManager}} run db:generate` - Generate {{#if (eq orm "drizzle")}}Drizzle{{else if (eq orm
|
|
56
|
+
"prisma")}}Prisma{{else}}{{orm}}{{/if}} files
|
|
57
|
+
- `{{packageManager}} run db:migrate` - Run database migrations
|
|
58
|
+
|
|
59
|
+
{{#if (eq orm "drizzle")}}
|
|
60
|
+
Database schema files are located in `apps/server/src/db/schema/`
|
|
61
|
+
{{else if (eq orm "prisma")}}
|
|
62
|
+
Database schema is located in `apps/server/prisma/schema.prisma`
|
|
63
|
+
{{else if (eq orm "mongoose")}}
|
|
64
|
+
Database models are located in `apps/server/src/db/models/`
|
|
65
|
+
{{/if}}
|
|
66
|
+
{{/if}}
|
|
67
|
+
|
|
68
|
+
{{#if (ne api "none")}}
|
|
69
|
+
## API Structure
|
|
70
|
+
|
|
71
|
+
{{#if (eq api "trpc")}}
|
|
72
|
+
- tRPC routers are in `apps/server/src/routers/`
|
|
73
|
+
- Client-side tRPC utils are in `apps/web/src/utils/trpc.ts`
|
|
74
|
+
{{else if (eq api "orpc")}}
|
|
75
|
+
- oRPC endpoints are in `apps/server/src/api/`
|
|
76
|
+
- Client-side API utils are in `apps/web/src/utils/api.ts`
|
|
77
|
+
{{/if}}
|
|
78
|
+
{{/if}}
|
|
79
|
+
|
|
80
|
+
{{#if auth}}
|
|
81
|
+
## Authentication
|
|
82
|
+
|
|
83
|
+
Authentication is enabled in this project:
|
|
84
|
+
{{#if (ne backend "convex")}}
|
|
85
|
+
- Server auth logic is in `apps/server/src/lib/auth.ts`
|
|
86
|
+
{{#if (or (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "tanstack-start")
|
|
87
|
+
(includes frontend "next") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid"))}}
|
|
88
|
+
- Web app auth client is in `apps/web/src/lib/auth-client.ts`
|
|
89
|
+
{{/if}}
|
|
90
|
+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
91
|
+
- Native app auth client is in `apps/native/src/lib/auth-client.ts`
|
|
92
|
+
{{/if}}
|
|
93
|
+
{{else}}
|
|
94
|
+
{{/if}}
|
|
95
|
+
{{/if}}
|
|
96
|
+
|
|
97
|
+
## Adding More Features
|
|
98
|
+
|
|
99
|
+
You can add additional addons or deployment options to your project using:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
{{#if (eq packageManager "bun")}}bunx{{else if (eq packageManager "pnpm")}}pnpx{{else}}npx{{/if}} create-better-t-stack
|
|
103
|
+
add
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Available addons you can add:
|
|
107
|
+
- **Documentation**: Starlight, Fumadocs
|
|
108
|
+
- **Linting**: Biome, Oxlint, Ultracite
|
|
109
|
+
- **Other**: vibe-rules, Turborepo, PWA, Tauri, Husky
|
|
110
|
+
|
|
111
|
+
You can also add web deployment configurations like Cloudflare Workers support.
|
|
112
|
+
|
|
113
|
+
## Project Configuration
|
|
114
|
+
|
|
115
|
+
This project includes a `bts.jsonc` configuration file that stores your Better-T-Stack settings:
|
|
116
|
+
|
|
117
|
+
- Contains your selected stack configuration (database, ORM, backend, frontend, etc.)
|
|
118
|
+
- Used by the CLI to understand your project structure
|
|
119
|
+
- Safe to delete if not needed
|
|
120
|
+
- Updated automatically when using the `add` command
|
|
121
|
+
|
|
122
|
+
## Key Points
|
|
123
|
+
|
|
124
|
+
- This is a {{#if (includes addons "turborepo")}}Turborepo {{/if}}monorepo using {{packageManager}} workspaces
|
|
125
|
+
- Each app has its own `package.json` and dependencies
|
|
126
|
+
- Run commands from the root to execute across all workspaces
|
|
127
|
+
- Run workspace-specific commands with `{{packageManager}} run command-name`
|
|
128
|
+
{{#if (includes addons "turborepo")}}
|
|
129
|
+
- Turborepo handles build caching and parallel execution
|
|
130
|
+
{{/if}}
|
|
131
|
+
- Use `{{#if (eq packageManager "bun")}}bunx{{else if (eq packageManager "pnpm")}}pnpx{{else}}npx{{/if}}
|
|
132
|
+
create-better-t-stack add` to add more features later
|