create-sitekick 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 +204 -0
  2. package/package.json +9 -2
package/README.md ADDED
@@ -0,0 +1,204 @@
1
+ # create-sitekick
2
+
3
+ Scaffold a production-ready Next.js site with your choice of CMS in one command. Built by [Sitekick](https://github.com/sitekickcodes).
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ bun create sitekick my-site
9
+ ```
10
+
11
+ Or with npx:
12
+
13
+ ```bash
14
+ npx create-sitekick my-site
15
+ ```
16
+
17
+ ## What You Get
18
+
19
+ A fully configured Next.js 16 project with:
20
+
21
+ - **App Router** with React Server Components and TypeScript
22
+ - **Tailwind CSS v4** with a complete design system (typography classes, CSS variables, responsive breakpoints)
23
+ - **shadcn/ui** components ready to use
24
+ - **CMS abstraction layer** — your frontend code is identical regardless of which CMS you choose
25
+ - **Vercel-optimized** deployment with Blob storage, Postgres, and edge caching
26
+
27
+ ## CMS Options
28
+
29
+ ### Payload CMS
30
+
31
+ Self-hosted, open-source CMS that runs inside your Next.js app at `/admin`.
32
+
33
+ - Integrated admin panel — no separate service to manage
34
+ - Neon Postgres database
35
+ - Vercel Blob for media storage
36
+ - Rich text editing with Lexical editor
37
+ - AI-generated alt text for images (OpenAI)
38
+ - Draft/publish workflow with version history
39
+ - Import/export content between environments
40
+
41
+ ### Sanity
42
+
43
+ Hosted CMS with Sanity Studio embedded at `/studio`.
44
+
45
+ - Sanity-managed infrastructure — no database to provision
46
+ - Image CDN with on-the-fly transformations
47
+ - GROQ query language for precise data fetching
48
+ - Real-time collaboration
49
+ - Portable Text for rich content
50
+
51
+ ## Interactive Setup
52
+
53
+ The CLI walks you through setting up everything you need:
54
+
55
+ ```
56
+ $ bun create sitekick my-site
57
+
58
+ ┌ create-sitekick
59
+
60
+ ◆ What is your project name?
61
+ │ my-site
62
+
63
+ ◆ Which CMS do you want to use?
64
+ │ ● Payload CMS
65
+ │ ○ Sanity
66
+
67
+ ◇ Cloned template
68
+ ◇ Configured for Payload CMS
69
+ ◇ Dependencies installed
70
+ ◇ Git initialized
71
+
72
+ ◆ GitHub
73
+ │ ● Create a new repo
74
+ │ ○ Use an existing repo
75
+ │ ○ Skip
76
+ ◇ GitHub repo created: my-site
77
+
78
+ ◆ Neon Database
79
+ │ ● Create a new database
80
+ │ ○ Use an existing database
81
+ │ ○ Skip
82
+ ◇ Neon database created: my-site
83
+ ◇ Generated PAYLOAD_SECRET
84
+
85
+ ◆ Vercel
86
+ │ ● Create a new Vercel project
87
+ │ ○ Link to an existing project
88
+ │ ○ Skip
89
+ ◇ Vercel project created: my-site
90
+ ◇ Vercel connected to GitHub — pushes will auto-deploy
91
+
92
+ ◆ OpenAI (optional)
93
+ │ ○ Enter API key now
94
+ │ ● Skip — set up later
95
+
96
+ ◇ Environment files written
97
+ ◇ Pushed 3 env var(s) to Vercel
98
+ ◇ Pushed to GitHub — Vercel will auto-deploy
99
+
100
+ └ Done! Your Sitekick project is ready at ./my-site
101
+ ```
102
+
103
+ ## What Gets Provisioned
104
+
105
+ The CLI handles authentication and resource creation for each service:
106
+
107
+ | Service | What it does |
108
+ |---------|-------------|
109
+ | **GitHub** (`gh`) | Creates a repo, pushes initial commit, connects to Vercel for auto-deploy |
110
+ | **Neon** (`neonctl`) | Provisions a Postgres database, returns the connection string |
111
+ | **Vercel** (`vercel`) | Creates a project, links to GitHub, pushes env vars |
112
+ | **Sanity** (`sanity`) | Creates a Sanity project and production dataset |
113
+ | **OpenAI** | Stores your API key for AI-powered alt text generation |
114
+
115
+ Each step checks if the CLI tool is installed (and offers to install it), verifies authentication (and prompts login if needed), and asks whether to create a new resource or link an existing one.
116
+
117
+ ## Project Structure
118
+
119
+ ```
120
+ my-site/
121
+ ├── src/
122
+ │ ├── app/
123
+ │ │ └── (frontend)/ # Pages, layouts, error boundaries
124
+ │ ├── components/
125
+ │ │ └── ui/ # shadcn/ui components
126
+ │ ├── lib/
127
+ │ │ ├── cms/ # CMS abstraction layer
128
+ │ │ │ ├── types.ts # Shared content interfaces
129
+ │ │ │ ├── payload.ts # Payload adapter (or sanity.ts)
130
+ │ │ │ └── index.ts # Active adapter re-export
131
+ │ │ └── utils.ts # Shared utilities
132
+ │ └── hooks/ # Custom React hooks
133
+ ├── .env.local # Environment variables (auto-generated)
134
+ ├── .env.example # Template for team members
135
+ └── package.json
136
+ ```
137
+
138
+ ### CMS-specific files (included based on your choice)
139
+
140
+ **Payload:**
141
+ ```
142
+ ├── src/collections/ # Blog, Pages, Media, Users, etc.
143
+ ├── src/globals/ # Site Settings, Analytics, Social Links
144
+ ├── src/components/payload/ # Admin panel customizations
145
+ └── src/payload.config.ts # Payload configuration
146
+ ```
147
+
148
+ **Sanity:**
149
+ ```
150
+ ├── src/sanity/schemas/ # Blog, Page, Site Settings, etc.
151
+ ├── src/sanity/client.ts # Sanity client configuration
152
+ ├── src/sanity/queries.ts # GROQ queries
153
+ └── src/app/studio/ # Embedded Sanity Studio
154
+ ```
155
+
156
+ ## The CMS Abstraction Layer
157
+
158
+ Frontend pages never import from Payload or Sanity directly. They import from `@/lib/cms`:
159
+
160
+ ```tsx
161
+ import { cms } from "@/lib/cms";
162
+ import type { BlogPost } from "@/lib/cms";
163
+
164
+ export default async function BlogPage() {
165
+ const posts = await cms.getBlogPosts();
166
+ return (
167
+ <div>
168
+ {posts.map((post) => (
169
+ <article key={post.id}>
170
+ <h2>{post.title}</h2>
171
+ </article>
172
+ ))}
173
+ </div>
174
+ );
175
+ }
176
+ ```
177
+
178
+ This works identically whether Payload or Sanity is powering the backend.
179
+
180
+ ## Prerequisites
181
+
182
+ - [Bun](https://bun.sh) (package manager)
183
+ - [Node.js](https://nodejs.org) 22.x or later
184
+
185
+ Optional (the CLI will prompt to install these):
186
+ - [GitHub CLI](https://cli.github.com) (`gh`)
187
+ - [Vercel CLI](https://vercel.com/cli) (`vercel`)
188
+ - [Neon CLI](https://neon.tech/docs/reference/neon-cli) (`neonctl`) — for Payload
189
+ - [Sanity CLI](https://www.sanity.io/docs/cli) (`sanity`) — for Sanity
190
+
191
+ ## Updating
192
+
193
+ To publish a new version after making changes to the starter:
194
+
195
+ ```bash
196
+ cd create-sitekick
197
+ bun run build
198
+ # bump version in package.json
199
+ npm publish
200
+ ```
201
+
202
+ ## License
203
+
204
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sitekick",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Scaffold a new Sitekick project with your choice of CMS",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,8 +15,15 @@
15
15
  "picocolors": "^1.1.1"
16
16
  },
17
17
  "files": [
18
- "dist"
18
+ "dist",
19
+ "README.md"
19
20
  ],
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/sitekickcodes/sitekick-starter.git",
24
+ "directory": "create-sitekick"
25
+ },
26
+ "homepage": "https://github.com/sitekickcodes/sitekick-starter#readme",
20
27
  "keywords": [
21
28
  "sitekick",
22
29
  "nextjs",