create-kor 0.2.0 → 0.3.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 +59 -0
- package/index.js +16 -3
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# create-kor
|
|
2
|
+
|
|
3
|
+
Scaffold a new **kor** full-stack monorepo in seconds.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm create kor <project-name>
|
|
9
|
+
# or
|
|
10
|
+
npx create-kor <project-name>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This will:
|
|
14
|
+
|
|
15
|
+
1. Clone the [kor](https://github.com/mastoj/kor) monorepo template into a new `<project-name>` directory
|
|
16
|
+
2. Set the root `package.json` name to your project name
|
|
17
|
+
3. Create `apps/web/.env.local` with a default API URL
|
|
18
|
+
4. Initialise a fresh git repository with an initial commit
|
|
19
|
+
|
|
20
|
+
## Getting started
|
|
21
|
+
|
|
22
|
+
If you have [Make](https://www.gnu.org/software/make/) installed, a single command handles everything:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
cd <project-name>
|
|
26
|
+
make kor
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Otherwise, run the steps manually:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
cd <project-name>
|
|
33
|
+
pnpm install
|
|
34
|
+
pnpm db:push
|
|
35
|
+
pnpm dev
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- **Home** — [http://localhost:3000](http://localhost:3000)
|
|
39
|
+
- **tRPC demo** — [http://localhost:3000/trpc-demo](http://localhost:3000/trpc-demo)
|
|
40
|
+
- **Design system** — [http://localhost:3000/design](http://localhost:3000/design)
|
|
41
|
+
- **API health** — [http://localhost:3001/health](http://localhost:3001/health)
|
|
42
|
+
|
|
43
|
+
## What's inside
|
|
44
|
+
|
|
45
|
+
The scaffolded project is a pnpm monorepo with:
|
|
46
|
+
|
|
47
|
+
| Path | Description |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `apps/web` | Next.js frontend (React Server Components, tRPC client) |
|
|
50
|
+
| `apps/api` | Hono API server with tRPC router |
|
|
51
|
+
| `packages/ui` | Shared UI components (Base UI) |
|
|
52
|
+
| `packages/db` | Drizzle ORM schema & client (SQLite / PostgreSQL) |
|
|
53
|
+
| `packages/domain` | Business logic / domain services |
|
|
54
|
+
| `packages/shared` | Shared types and utilities |
|
|
55
|
+
|
|
56
|
+
## Requirements
|
|
57
|
+
|
|
58
|
+
- Node.js >= 20
|
|
59
|
+
- pnpm
|
package/index.js
CHANGED
|
@@ -51,7 +51,20 @@ execSync("git init && git add . && git commit -m 'Initial commit'", {
|
|
|
51
51
|
stdio: "inherit",
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
-
console.log("
|
|
54
|
+
console.log("");
|
|
55
|
+
console.log(" ~~ ~ ______________");
|
|
56
|
+
console.log(" \\ K O R \\___");
|
|
57
|
+
console.log(" ~~ ~ | o o |==>");
|
|
58
|
+
console.log(" \\____________/");
|
|
59
|
+
console.log(" (_) (_)");
|
|
60
|
+
console.log("");
|
|
61
|
+
console.log("Done! Next steps:\n");
|
|
55
62
|
console.log(` cd ${projectName}`);
|
|
56
|
-
console.log("
|
|
57
|
-
console.log("
|
|
63
|
+
console.log("");
|
|
64
|
+
console.log(" If you have Make installed:");
|
|
65
|
+
console.log(" make kor");
|
|
66
|
+
console.log("");
|
|
67
|
+
console.log(" Otherwise:");
|
|
68
|
+
console.log(" pnpm install");
|
|
69
|
+
console.log(" pnpm db:push");
|
|
70
|
+
console.log(" pnpm dev");
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-kor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Create a new kor project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"create-kor": "./index.js"
|
|
8
8
|
},
|
|
9
|
-
"files": ["index.js"],
|
|
9
|
+
"files": ["index.js", "README.md"],
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"tiged": "^2.12.7"
|
|
12
12
|
},
|