create-croissant 0.1.13 → 0.1.14
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/package.json +1 -1
- package/template/SKILL.md +56 -0
package/package.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: croissant-stack
|
|
3
|
+
description: Expert guidance for working with the Croissant Stack (TanStack Start, Better Auth, oRPC, Drizzle)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Croissant Stack
|
|
7
|
+
|
|
8
|
+
This skill provides specialized knowledge and instructions for working within the Croissant Stack repository—a modern, type-safe full-stack monorepo.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
Use this skill when performing any task within this repository, including:
|
|
13
|
+
- Developing features in the TanStack Start application (`apps/web`).
|
|
14
|
+
- Managing the database schema or migrations (`packages/db`).
|
|
15
|
+
- Extending the oRPC API (`packages/orpc`).
|
|
16
|
+
- Configuring authentication with Better Auth (`packages/auth`).
|
|
17
|
+
- Creating or modifying shared UI components (`packages/ui`).
|
|
18
|
+
- Using or maintaining the `create-croissant` CLI.
|
|
19
|
+
|
|
20
|
+
## Instructions
|
|
21
|
+
|
|
22
|
+
### 1. Project Architecture
|
|
23
|
+
Understand the monorepo structure powered by **Turborepo**:
|
|
24
|
+
- **`apps/web`**: The main TanStack Start application.
|
|
25
|
+
- **`packages/auth`**: Authentication logic using Better Auth.
|
|
26
|
+
- **`packages/db`**: Database schema and Drizzle client.
|
|
27
|
+
- **`packages/orpc`**: Modular, type-safe API layer.
|
|
28
|
+
- **`packages/ui`**: Shared UI components using shadcn/ui.
|
|
29
|
+
|
|
30
|
+
### 2. Local Development
|
|
31
|
+
- **Install dependencies**: Use `npm install`.
|
|
32
|
+
- **Database setup**: Run `npm run db:up` to start the PostgreSQL container.
|
|
33
|
+
- **Environment variables**: Ensure `.env` exists at the root (copy from `.env.example`).
|
|
34
|
+
- **Push schema**: Run `npm run db:push --filter @workspace/db` after schema changes.
|
|
35
|
+
- **Start dev server**: Run `npm run dev` from the root. The app runs at `http://localhost:3000`.
|
|
36
|
+
|
|
37
|
+
### 3. Working with oRPC
|
|
38
|
+
- API procedures are located in `packages/orpc/src/lib/`.
|
|
39
|
+
- The main router is in `packages/orpc/src/lib/router.ts`.
|
|
40
|
+
- When adding new procedures, follow the modular pattern (e.g., create a new file in `lib/` and import it into the main router).
|
|
41
|
+
|
|
42
|
+
### 4. Database & Schema
|
|
43
|
+
- Define schemas in `packages/db/src/schema.ts` or modular files in `packages/db/src/`.
|
|
44
|
+
- Use Drizzle Kit commands via Turbo: `npm run db:push --filter @workspace/db` or `npm run db:studio --filter @workspace/db`.
|
|
45
|
+
|
|
46
|
+
### 5. UI Components
|
|
47
|
+
- Shared components live in `packages/ui/src/components`.
|
|
48
|
+
- Use the shadcn CLI to add new components: `npx shadcn@latest add [component-name] -c apps/web`. This is configured to place components into the shared package.
|
|
49
|
+
|
|
50
|
+
### 6. Turborepo Commands
|
|
51
|
+
- Use `--filter` to target specific packages: `npm run [command] --filter [package-name]`.
|
|
52
|
+
- Example: `npm run build --filter web` or `npm run lint --filter @workspace/db`.
|
|
53
|
+
|
|
54
|
+
### 7. Creating New Projects
|
|
55
|
+
- The `packages/create-croissant` directory contains the source for the CLI tool.
|
|
56
|
+
- The `template/` directory inside it should be kept in sync with the main repository structure.
|