create-better-fullstack 1.0.0-canary.c9b74dcc
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 +110 -0
- package/dist/chunk-DPg_XC7m.mjs +24 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +8 -0
- package/dist/index.d.mts +539 -0
- package/dist/index.mjs +4 -0
- package/dist/src-CwAb8MVO.mjs +5362 -0
- package/dist/virtual.d.mts +4 -0
- package/dist/virtual.mjs +4 -0
- package/package.json +102 -0
package/README.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Better Fullstack CLI
|
|
2
|
+
|
|
3
|
+
A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
Run without installing globally:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Using bun (recommended)
|
|
11
|
+
bun create better-t-stack@latest
|
|
12
|
+
|
|
13
|
+
# Using pnpm
|
|
14
|
+
pnpm create better-t-stack@latest
|
|
15
|
+
|
|
16
|
+
# Using npm
|
|
17
|
+
npx create-better-t-stack@latest
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Follow the prompts to configure your project or use the `--yes` flag for defaults.
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
| Category | Options |
|
|
25
|
+
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
26
|
+
| **TypeScript** | End-to-end type safety across all parts of your application |
|
|
27
|
+
| **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 NativeWind (via Expo)<br>• React Native with Unistyles (via Expo)<br>• None |
|
|
28
|
+
| **Backend** | • Hono<br>• Express<br>• Elysia<br>• Next.js API routes<br>• Convex<br>• Fastify<br>• None |
|
|
29
|
+
| **API Layer** | • tRPC (type-safe APIs)<br>• oRPC (OpenAPI-compatible type-safe APIs)<br>• None |
|
|
30
|
+
| **Runtime** | • Bun<br>• Node.js<br>• Cloudflare Workers<br>• None |
|
|
31
|
+
| **Database** | • SQLite<br>• PostgreSQL<br>• MySQL<br>• MongoDB<br>• None |
|
|
32
|
+
| **ORM** | • Drizzle (TypeScript-first)<br>• Prisma (feature-rich)<br>• Mongoose (for MongoDB)<br>• None |
|
|
33
|
+
| **Database Setup** | • Turso (SQLite)<br>• Cloudflare D1 (SQLite)<br>• Neon (PostgreSQL)<br>• Supabase (PostgreSQL)<br>• Prisma Postgres<br>• MongoDB Atlas<br>• None (manual setup) |
|
|
34
|
+
| **Authentication** | Better-Auth (email/password, with more options coming soon) |
|
|
35
|
+
| **Styling** | Tailwind CSS with shadcn/ui components |
|
|
36
|
+
| **Addons** | • PWA support<br>• Tauri (desktop applications)<br>• Starlight (documentation site)<br>• Biome (linting and formatting)<br>• Lefthook, Husky (Git hooks)<br>• Turborepo (optimized builds) |
|
|
37
|
+
| **Examples** | • Todo app<br>• AI Chat interface (using Vercel AI SDK) |
|
|
38
|
+
| **Developer Experience** | • Automatic Git initialization<br>• Package manager choice (npm, pnpm, bun)<br>• Automatic dependency installation |
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
Usage: create-better-t-stack [project-directory] [options]
|
|
44
|
+
|
|
45
|
+
Options:
|
|
46
|
+
-V, --version Output the version number
|
|
47
|
+
-y, --yes Use default configuration
|
|
48
|
+
--database <type> Database type (none, sqlite, postgres, mysql, mongodb)
|
|
49
|
+
--orm <type> ORM type (none, drizzle, prisma, mongoose)
|
|
50
|
+
--auth Include authentication
|
|
51
|
+
--no-auth Exclude authentication
|
|
52
|
+
--frontend <types...> Frontend types (tanstack-router, react-router, tanstack-start, next, nuxt, svelte, solid, native-bare, native-uniwind, native-unistyles, none)
|
|
53
|
+
--addons <types...> Additional addons (pwa, tauri, starlight, biome, lefthook, husky, turborepo, fumadocs, ultracite, oxlint, none)
|
|
54
|
+
--examples <types...> Examples to include (todo, ai, none)
|
|
55
|
+
--git Initialize git repository
|
|
56
|
+
--no-git Skip git initialization
|
|
57
|
+
--package-manager <pm> Package manager (npm, pnpm, bun)
|
|
58
|
+
--install Install dependencies
|
|
59
|
+
--no-install Skip installing dependencies
|
|
60
|
+
--db-setup <setup> Database setup (turso, d1, neon, supabase, prisma-postgres, mongodb-atlas, docker, none)
|
|
61
|
+
--web-deploy <setup> Web deployment (workers, alchemy, none)
|
|
62
|
+
--server-deploy <setup> Server deployment (workers, alchemy, none)
|
|
63
|
+
--backend <framework> Backend framework (hono, express, elysia, next, convex, fastify, none)
|
|
64
|
+
--runtime <runtime> Runtime (bun, node, workers, none)
|
|
65
|
+
--api <type> API type (trpc, orpc, none)
|
|
66
|
+
-h, --help Display help
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Examples
|
|
70
|
+
|
|
71
|
+
Create a project with default configuration:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx create-better-t-stack --yes
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Create a project with specific options:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx create-better-t-stack --database postgres --orm drizzle --auth --addons pwa biome
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Create a project with Elysia backend and Node.js runtime:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npx create-better-t-stack --backend elysia --runtime node
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Create a project with multiple frontend options (one web + one native):
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx create-better-t-stack --frontend tanstack-router native-bare
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Project Structure
|
|
96
|
+
|
|
97
|
+
The created project follows a clean monorepo structure:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
my-better-t-app/
|
|
101
|
+
├── apps/
|
|
102
|
+
│ ├── web/ # Frontend application
|
|
103
|
+
│ ├── server/ # Backend API
|
|
104
|
+
│ ├── native/ # (optional) Mobile application
|
|
105
|
+
│ └── docs/ # (optional) Documentation site
|
|
106
|
+
├── packages/ # Shared packages
|
|
107
|
+
└── README.md # Auto-generated project documentation
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
After project creation, you'll receive detailed instructions for next steps and additional setup requirements.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
//#region rolldown:runtime
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { __reExport as t };
|
package/dist/cli.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|