create-croissant 0.1.41 → 0.1.42

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 (2) hide show
  1. package/package.json +1 -1
  2. package/template/README.md +47 -27
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-croissant",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "description": "Scaffold a new project using the Croissant Stack",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,33 +12,36 @@ npx create-croissant@latest
12
12
 
13
13
  ---
14
14
 
15
- ## 🚀 Features
15
+ ## 🌟 Features
16
16
 
17
- - **Frontend**: [TanStack Start](https://tanstack.com/start) for a seamless, type-safe React experience.
17
+ - **Web (Platform)**: [TanStack Start](https://tanstack.com/start) for a seamless, type-safe React experience.
18
+ - **Mobile**: [Expo](https://expo.dev/) (React Native) for cross-platform mobile development.
19
+ - **Desktop**: [Electron](https://www.electronjs.org/) with [electron-vite](https://electron-vite.org/) for native desktop applications.
18
20
  - **Authentication**: [Better Auth](https://www.better-auth.com/) with Drizzle adapter and PostgreSQL.
19
21
  - **API**: [oRPC](https://orpc.sh/) with a modular, namespaced router for end-to-end type-safety.
20
22
  - **Database**: [Drizzle ORM](https://orm.drizzle.team/) with PostgreSQL and Docker Compose setup.
21
23
  - **Styling**: [shadcn/ui](https://ui.shadcn.com/) components with Tailwind CSS.
22
- - **Monorepo**: Powered by [Turborepo](https://turbo.build/) for lightning-fast builds and smart task orchestration.
23
- - **Developer Experience**: Path aliases (`@/`), strict TypeScript, and automated linting/formatting.
24
-
25
- ## 🚀 Monorepo Management with Turborepo
26
-
27
- This project uses **Turborepo** to manage the monorepo efficiently. Turbo understands the dependency graph between our packages and optimizes our workflow in several ways:
28
-
29
- - **Smart Caching**: Tasks like `build` and `lint` are cached. If the code hasn't changed, Turbo will replay the logs and output instantly.
30
- - **Parallel Execution**: Run tasks across multiple packages simultaneously without stepping on each other's toes.
31
- - **Task Pipelines**: Defines the relationship between tasks (e.g., "don't build the app until its dependencies are built").
32
-
33
- You can see the configuration in `turbo.json`.
24
+ - **Monorepo Management**: Powered by [Turborepo](https://turbo.build/) for lightning-fast builds and smart task orchestration.
25
+ - **Developer Experience**:
26
+ - Path aliases (`@/`) for clean imports.
27
+ - Strict TypeScript across the entire stack.
28
+ - Ultra-fast linting and formatting with [Oxc](https://oxc.rs/) (`oxlint` and `oxfmt`).
29
+ - Automated CI checks on push via [Husky](https://typicode.github.io/husky/).
34
30
 
35
31
  ## 📁 Project Structure
36
32
 
37
- - `apps/platform`: The main TanStack Start application. Uses `@/` path alias for clean imports.
38
- - `packages/auth`: Authentication logic and Better Auth configuration.
39
- - `packages/db`: Database schema, migrations, and Drizzle client.
40
- - `packages/orpc`: Type-safe API router. Organized into modular files (e.g., `lib/planets.ts`).
41
- - `packages/ui`: Shared UI components and styles.
33
+ ### Apps
34
+ - `apps/platform`: The main TanStack Start web application.
35
+ - `apps/mobile`: Expo-powered mobile application.
36
+ - `apps/desktop`: Electron-powered desktop application.
37
+
38
+ ### Packages
39
+ - `packages/auth` (`@workspace/auth`): Authentication logic and Better Auth configuration.
40
+ - `packages/db` (`@workspace/db`): Database schema, migrations, and Drizzle client.
41
+ - `packages/orpc` (`@workspace/orpc`): Type-safe API router and definitions.
42
+ - `packages/ui` (`@workspace/ui`): Shared UI components and global styles.
43
+ - `packages/config-typescript` (`@workspace/config-typescript`): Shared TypeScript configurations.
44
+ - `packages/create-croissant`: The CLI tool for scaffolding new projects.
42
45
 
43
46
  ## 🛠️ Getting Started
44
47
 
@@ -89,40 +92,44 @@ npm run db:push --filter @workspace/db
89
92
  npm run dev
90
93
  ```
91
94
 
92
- The application will be available at `http://localhost:3000`.
95
+ The web application will be available at `http://localhost:3000`.
93
96
 
94
97
  ## 📦 Scripts
95
98
 
96
99
  All scripts are orchestrated by Turborepo. You can run them from the root directory:
97
100
 
101
+ ### Core Scripts
98
102
  - `npm run dev`: Start all applications in development mode.
99
103
  - `npm run build`: Build all applications for production.
100
104
  - `npm run quality`: Run all quality checks (linting and formatting) using Oxc.
101
105
  - `npm run quality:fix`: Automatically fix linting and formatting issues using Oxc.
102
106
  - `npm run typecheck`: Run TypeScript type checking across the workspace.
107
+ - `npm run ci`: Run linting, type-checking, and build (used in CI/CD).
103
108
 
104
109
  ### 🗄️ Database Scripts
105
-
106
110
  These handle Docker and Drizzle operations:
107
-
108
111
  - `npm run db:up`: Start the PostgreSQL Docker container.
109
112
  - `npm run db:down`: Stop and remove the database container.
110
113
  - `npm run db:logs`: Tail logs from the database container.
111
114
  - `npm run db:push --filter @workspace/db`: Push Drizzle schema to the database.
112
115
  - `npm run db:studio --filter @workspace/db`: Open Drizzle Studio to explore your data.
113
116
 
114
- ### 🎯 Filtering Tasks
117
+ ## 🎯 Turborepo Power
115
118
 
119
+ ### Filtering Tasks
116
120
  Turbo allows you to run tasks for specific packages using the `--filter` flag:
117
121
 
118
122
  ```bash
119
- # Only lint the web app
120
- npm run lint -- --filter web
123
+ # Only lint the platform app
124
+ npm run lint -- --filter platform
121
125
 
122
126
  # Build the db package and everything that depends on it
123
127
  npm run build -- --filter @workspace/db...
124
128
  ```
125
129
 
130
+ ### Smart Caching
131
+ Tasks like `build` and `lint` are cached. If the code hasn't changed, Turbo will replay the logs and output instantly.
132
+
126
133
  ## 🔗 oRPC & Type Safety
127
134
 
128
135
  The project uses oRPC for end-to-end type safety. The router is modularized for better maintainability:
@@ -140,16 +147,29 @@ type Inputs = InferRouterInputs<typeof router>;
140
147
  type Outputs = InferRouterOutputs<typeof router>;
141
148
  ```
142
149
 
143
- ## 🧱 Adding Components
150
+ ## 🧱 UI Components
144
151
 
145
152
  To add components to the shared UI package:
146
153
 
147
154
  ```bash
148
- npx shadcn@latest add [component-name] -c apps/web
155
+ npx shadcn@latest add [component-name] -c apps/platform
149
156
  ```
150
157
 
151
158
  This will place the UI components in `packages/ui/src/components`.
152
159
 
160
+ ## 🛡️ Quality & Git Hooks
161
+
162
+ This project uses **Husky** to ensure code quality. When pushing to the `main` branch, it automatically runs the CI pipeline (`npm run ci`) to prevent broken code from being pushed.
163
+
164
+ Formatting and linting are handled by **Oxc**, which is significantly faster than ESLint and Prettier.
165
+
166
+ - **Linting**: `oxlint`
167
+ - **Formatting**: `oxfmt`
168
+
169
+ ---
170
+
171
+ Built with ❤️ for the ultimate developer experience.
172
+
153
173
  ## 🛡️ License
154
174
 
155
175
  MIT