create-headless-store 0.1.0 → 0.1.1

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/README.md +97 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # create-headless-store
2
+
3
+ Interactive CLI to scaffold a [Headless Commerce](https://github.com/Supia7/headless-commerce) store — API, Dashboard, Storefront, and infrastructure in one command.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ npx create-headless-store
9
+ ```
10
+
11
+ The CLI walks you through setup interactively:
12
+
13
+ ```
14
+ ╔══════════════════════════════════════╗
15
+ ║ ⚡ Headless Commerce ║
16
+ ║ AI-native commerce in 5 minutes ║
17
+ ╚══════════════════════════════════════╝
18
+
19
+ ? Project directory: my-store
20
+ ? Store name: My Store
21
+ ? Stripe Secret Key (optional, press Enter to skip):
22
+
23
+ ✔ Dependencies verified (Docker, Node.js, pnpm)
24
+ ✔ Project scaffolded
25
+ ✔ Docker containers running
26
+ ✔ PostgreSQL is ready
27
+ ✔ Dependencies installed
28
+ ✔ Packages built
29
+ ✔ Database schema applied
30
+ ✔ Demo data seeded
31
+
32
+ ✓ Setup complete!
33
+
34
+ cd my-store
35
+ pnpm dev
36
+ ```
37
+
38
+ ## What It Does
39
+
40
+ 1. **Checks dependencies** — Docker, Node.js 20+, pnpm (auto-installs pnpm if missing)
41
+ 2. **Scaffolds the project** — monorepo with apps, packages, Docker Compose, env files
42
+ 3. **Starts infrastructure** — PostgreSQL 16, Redis 7, Inngest (via Docker Compose)
43
+ 4. **Installs & builds** — `pnpm install` + `pnpm build`
44
+ 5. **Sets up the database** — pushes Drizzle schema + seeds demo data
45
+
46
+ ## Generated Structure
47
+
48
+ ```
49
+ my-store/
50
+ ├── apps/
51
+ │ ├── api/ # Hono REST API
52
+ │ │ └── .env # DATABASE_URL, REDIS_URL, Stripe keys, JWT secret
53
+ │ ├── dashboard/ # Next.js admin panel
54
+ │ │ └── .env.local # API URL, NextAuth secrets
55
+ │ └── storefront/ # Next.js storefront
56
+ │ └── .env.local # API URL, Stripe publishable key
57
+ ├── docker-compose.yml # PostgreSQL, Redis, Inngest
58
+ ├── package.json # Monorepo root (Turbo)
59
+ ├── pnpm-workspace.yaml
60
+ ├── turbo.json
61
+ └── README.md
62
+ ```
63
+
64
+ ## Options
65
+
66
+ ```bash
67
+ # Specify directory directly
68
+ npx create-headless-store my-store
69
+
70
+ # Skip demo seed data
71
+ npx create-headless-store --no-demo
72
+
73
+ # Custom API port (default: 3010)
74
+ npx create-headless-store --port 4000
75
+ ```
76
+
77
+ ## Services
78
+
79
+ After setup, `pnpm dev` starts:
80
+
81
+ | Service | URL |
82
+ |---------|-----|
83
+ | API | http://localhost:3010 |
84
+ | Dashboard | http://localhost:3011 |
85
+ | Storefront | http://localhost:3012 |
86
+ | API Docs | http://localhost:3010/reference |
87
+ | Inngest | http://localhost:8288 |
88
+
89
+ ## Prerequisites
90
+
91
+ - [Docker](https://docs.docker.com/get-docker/) (with Docker Compose)
92
+ - [Node.js](https://nodejs.org/) 20+
93
+ - [pnpm](https://pnpm.io/) (auto-installed if missing)
94
+
95
+ ## License
96
+
97
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-headless-store",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Create a headless commerce store in minutes",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,7 +8,8 @@
8
8
  },
9
9
  "main": "./dist/index.js",
10
10
  "files": [
11
- "dist"
11
+ "dist",
12
+ "README.md"
12
13
  ],
13
14
  "scripts": {
14
15
  "build": "tsup",