create-kofi-stack 1.0.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/LICENSE +21 -0
- package/README.md +296 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5368 -0
- package/package.json +59 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 theodenanyoh
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<br />
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/theodenanyoh11/create-kofi-stack/main/.github/assets/logo-dark.svg">
|
|
5
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/theodenanyoh11/create-kofi-stack/main/.github/assets/logo-light.svg">
|
|
6
|
+
<img alt="create-kofi-stack" src="https://raw.githubusercontent.com/theodenanyoh11/create-kofi-stack/main/.github/assets/logo-light.svg" width="400">
|
|
7
|
+
</picture>
|
|
8
|
+
<br />
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<h3 align="center">
|
|
12
|
+
Scaffold opinionated full-stack projects with ease
|
|
13
|
+
</h3>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
Next.js 16 + Convex + Better-Auth + shadcn/ui v4 + Tailwind CSS v4
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="https://www.npmjs.com/package/create-kofi-stack"><img src="https://img.shields.io/npm/v/create-kofi-stack.svg?style=flat&colorA=18181b&colorB=28cf8d" alt="npm version" /></a>
|
|
21
|
+
<a href="https://www.npmjs.com/package/create-kofi-stack"><img src="https://img.shields.io/npm/dm/create-kofi-stack.svg?style=flat&colorA=18181b&colorB=28cf8d" alt="npm downloads" /></a>
|
|
22
|
+
<a href="https://github.com/theodenanyoh11/create-kofi-stack/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/create-kofi-stack.svg?style=flat&colorA=18181b&colorB=28cf8d" alt="license" /></a>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
<p align="center">
|
|
26
|
+
<a href="#quick-start">Quick Start</a> •
|
|
27
|
+
<a href="#whats-included">What's Included</a> •
|
|
28
|
+
<a href="#cli-options">CLI Options</a> •
|
|
29
|
+
<a href="#contributing">Contributing</a>
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Philosophy
|
|
35
|
+
|
|
36
|
+
- **Opinionated but Flexible** — Sensible defaults with room to customize
|
|
37
|
+
- **Modern Stack** — Latest versions of Next.js 16, Tailwind v4, and shadcn/ui v4
|
|
38
|
+
- **Real-time First** — Convex for instant data sync out of the box
|
|
39
|
+
- **Production Ready** — Auth, email, testing, and linting pre-configured
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Using pnpm (recommended)
|
|
45
|
+
pnpm create kofi-stack my-app
|
|
46
|
+
|
|
47
|
+
# Using npx
|
|
48
|
+
npx create-kofi-stack my-app
|
|
49
|
+
|
|
50
|
+
# Using bun
|
|
51
|
+
bunx create-kofi-stack my-app
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Or with specific options:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx create-kofi-stack my-app --monorepo --marketing=payload --docs --analytics=posthog
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## What's Included
|
|
61
|
+
|
|
62
|
+
### Always Included (Zero Config)
|
|
63
|
+
|
|
64
|
+
| Category | Technology |
|
|
65
|
+
|----------|------------|
|
|
66
|
+
| **Framework** | [Next.js 16](https://nextjs.org) with App Router & TypeScript |
|
|
67
|
+
| **Database** | [Convex](https://convex.dev) — Real-time database with Better-Auth integration |
|
|
68
|
+
| **Auth** | [Better-Auth](https://better-auth.com) — Email/password + Google OAuth |
|
|
69
|
+
| **Styling** | [Tailwind CSS v4](https://tailwindcss.com) + [shadcn/ui v4](https://ui.shadcn.com) |
|
|
70
|
+
| **Linting** | [Biome](https://biomejs.dev) — Fast linting and formatting |
|
|
71
|
+
| **Git Hooks** | [Husky](https://typicode.github.io/husky) + lint-staged |
|
|
72
|
+
| **Testing** | [Vitest](https://vitest.dev) + [Playwright](https://playwright.dev) |
|
|
73
|
+
| **Email** | [Resend](https://resend.com) + [React Email](https://react.email) |
|
|
74
|
+
|
|
75
|
+
### Optional Features
|
|
76
|
+
|
|
77
|
+
<details>
|
|
78
|
+
<summary><strong>Project Structure</strong></summary>
|
|
79
|
+
|
|
80
|
+
Choose between a simple single app or a full monorepo setup:
|
|
81
|
+
|
|
82
|
+
- **Single App** — Simple, single Next.js application
|
|
83
|
+
- **Monorepo** — Turborepo with apps (`web`, `marketing`, `docs`) and shared packages (`ui`, `backend`, `config`)
|
|
84
|
+
|
|
85
|
+
</details>
|
|
86
|
+
|
|
87
|
+
<details>
|
|
88
|
+
<summary><strong>shadcn/ui v4 Customization</strong></summary>
|
|
89
|
+
|
|
90
|
+
Full support for shadcn/ui v4's new style system:
|
|
91
|
+
|
|
92
|
+
- **Component Library** — Base UI or Radix UI
|
|
93
|
+
- **Style Variants** — Nova, Vega, Maia, Lyra, Mira
|
|
94
|
+
- **Base Colors** — Neutral, Gray, Zinc, Stone, Slate
|
|
95
|
+
- **Theme Colors** — Blue, Green, Orange, Red, Violet, Yellow
|
|
96
|
+
- **Icon Libraries** — Lucide, HugeIcons, Tabler, Phosphor
|
|
97
|
+
|
|
98
|
+
</details>
|
|
99
|
+
|
|
100
|
+
<details>
|
|
101
|
+
<summary><strong>Marketing Site</strong> (Monorepo only)</summary>
|
|
102
|
+
|
|
103
|
+
Add a marketing site to your monorepo:
|
|
104
|
+
|
|
105
|
+
- **Payload CMS** — Headless CMS with Supabase Postgres
|
|
106
|
+
- **Next.js** — Simple static/SSG marketing site
|
|
107
|
+
- **Astro** — Lightweight, content-focused site
|
|
108
|
+
|
|
109
|
+
</details>
|
|
110
|
+
|
|
111
|
+
<details>
|
|
112
|
+
<summary><strong>Documentation</strong></summary>
|
|
113
|
+
|
|
114
|
+
- **Fumadocs** — Beautiful, fast documentation site
|
|
115
|
+
|
|
116
|
+
</details>
|
|
117
|
+
|
|
118
|
+
<details>
|
|
119
|
+
<summary><strong>Authentication Providers</strong></summary>
|
|
120
|
+
|
|
121
|
+
Add additional OAuth providers:
|
|
122
|
+
|
|
123
|
+
- GitHub, Discord, Twitter/X, Apple, Microsoft, LinkedIn
|
|
124
|
+
- Organizations/multi-tenancy support
|
|
125
|
+
|
|
126
|
+
</details>
|
|
127
|
+
|
|
128
|
+
<details>
|
|
129
|
+
<summary><strong>Integrations</strong></summary>
|
|
130
|
+
|
|
131
|
+
| Category | Options |
|
|
132
|
+
|----------|---------|
|
|
133
|
+
| **Analytics** | PostHog, Vercel Analytics |
|
|
134
|
+
| **File Uploads** | Uploadthing, AWS S3, Vercel Blob |
|
|
135
|
+
| **Rate Limiting** | Arcjet, Upstash |
|
|
136
|
+
| **Error Monitoring** | Sentry |
|
|
137
|
+
|
|
138
|
+
</details>
|
|
139
|
+
|
|
140
|
+
## CLI Options
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npx create-kofi-stack [project-name] [options]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
| Option | Description |
|
|
147
|
+
|--------|-------------|
|
|
148
|
+
| `--monorepo` | Use monorepo structure with Turborepo |
|
|
149
|
+
| `--single` | Use single app structure |
|
|
150
|
+
| `--marketing <type>` | Marketing site: `payload`, `nextjs`, `astro`, `none` |
|
|
151
|
+
| `--docs` | Include documentation site (Fumadocs) |
|
|
152
|
+
| `--component-library <lib>` | Component library: `base`, `radix` |
|
|
153
|
+
| `--style <style>` | Style variant: `nova`, `vega`, `maia`, `lyra`, `mira` |
|
|
154
|
+
| `--base-color <color>` | Base color: `neutral`, `gray`, `zinc`, `stone`, `slate` |
|
|
155
|
+
| `--theme-color <color>` | Theme color: `blue`, `green`, `orange`, `red`, `violet`, `yellow` |
|
|
156
|
+
| `--icon-library <lib>` | Icons: `lucide`, `hugeicons`, `tabler`, `phosphor` |
|
|
157
|
+
| `--auth-providers <list>` | Auth providers (comma-separated) |
|
|
158
|
+
| `--organizations` | Enable multi-tenancy |
|
|
159
|
+
| `--analytics <provider>` | Analytics: `posthog`, `vercel`, `none` |
|
|
160
|
+
| `--uploads <provider>` | Uploads: `uploadthing`, `s3`, `vercel-blob`, `none` |
|
|
161
|
+
| `--rate-limiting <provider>` | Rate limiting: `arcjet`, `upstash`, `none` |
|
|
162
|
+
| `--monitoring <provider>` | Monitoring: `sentry`, `none` |
|
|
163
|
+
| `-y, --yes` | Skip confirmation prompt |
|
|
164
|
+
|
|
165
|
+
## Project Structure
|
|
166
|
+
|
|
167
|
+
<details>
|
|
168
|
+
<summary><strong>Single App</strong></summary>
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
my-project/
|
|
172
|
+
├── src/
|
|
173
|
+
│ ├── app/ # Next.js App Router
|
|
174
|
+
│ │ ├── (auth)/ # Auth pages (sign-in, sign-up)
|
|
175
|
+
│ │ ├── (dashboard)/ # Protected dashboard pages
|
|
176
|
+
│ │ └── api/ # API routes
|
|
177
|
+
│ ├── components/ # React components
|
|
178
|
+
│ │ ├── auth/ # Auth components
|
|
179
|
+
│ │ └── ui/ # shadcn/ui components
|
|
180
|
+
│ ├── lib/ # Utilities and configs
|
|
181
|
+
│ ├── hooks/ # Custom React hooks
|
|
182
|
+
│ └── emails/ # React Email templates
|
|
183
|
+
├── convex/ # Convex backend
|
|
184
|
+
├── tests/
|
|
185
|
+
│ ├── unit/ # Vitest unit tests
|
|
186
|
+
│ └── e2e/ # Playwright E2E tests
|
|
187
|
+
├── public/
|
|
188
|
+
├── components.json # shadcn/ui config
|
|
189
|
+
└── package.json
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
</details>
|
|
193
|
+
|
|
194
|
+
<details>
|
|
195
|
+
<summary><strong>Monorepo</strong></summary>
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
my-project/
|
|
199
|
+
├── apps/
|
|
200
|
+
│ ├── web/ # Main Next.js app
|
|
201
|
+
│ ├── marketing/ # Marketing site (optional)
|
|
202
|
+
│ └── docs/ # Documentation site (optional)
|
|
203
|
+
├── packages/
|
|
204
|
+
│ ├── backend/ # Convex backend (shared)
|
|
205
|
+
│ ├── ui/ # Shared UI components
|
|
206
|
+
│ ├── config-biome/ # Shared Biome config
|
|
207
|
+
│ ├── config-typescript/# Shared TypeScript config
|
|
208
|
+
│ └── config-tailwind/ # Shared Tailwind config
|
|
209
|
+
├── turbo.json
|
|
210
|
+
└── pnpm-workspace.yaml
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
</details>
|
|
214
|
+
|
|
215
|
+
## Getting Started
|
|
216
|
+
|
|
217
|
+
After creating your project:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
cd my-project
|
|
221
|
+
|
|
222
|
+
# Set up environment variables
|
|
223
|
+
cp .env.example .env.local
|
|
224
|
+
|
|
225
|
+
# Start Convex dev server (in one terminal)
|
|
226
|
+
pnpm convex dev
|
|
227
|
+
|
|
228
|
+
# Start the app (in another terminal)
|
|
229
|
+
pnpm dev
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Contributing
|
|
233
|
+
|
|
234
|
+
We welcome contributions! Here's how you can help:
|
|
235
|
+
|
|
236
|
+
### Getting Started
|
|
237
|
+
|
|
238
|
+
1. **Fork the repository** and clone it locally
|
|
239
|
+
2. **Install dependencies** with `pnpm install`
|
|
240
|
+
3. **Create a branch** for your feature or fix
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
git checkout -b feature/my-feature
|
|
244
|
+
# or
|
|
245
|
+
git checkout -b fix/my-fix
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Development
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
# Build the CLI
|
|
252
|
+
pnpm build
|
|
253
|
+
|
|
254
|
+
# Watch mode during development
|
|
255
|
+
pnpm dev
|
|
256
|
+
|
|
257
|
+
# Test locally
|
|
258
|
+
node dist/index.js my-test-project --single -y
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Guidelines
|
|
262
|
+
|
|
263
|
+
- **Code Style** — We use Biome for linting and formatting. Run `pnpm lint` before committing.
|
|
264
|
+
- **Commits** — Write clear, concise commit messages describing your changes.
|
|
265
|
+
- **Tests** — If you're adding a new feature, consider adding tests.
|
|
266
|
+
- **Documentation** — Update the README if you're changing CLI options or behavior.
|
|
267
|
+
|
|
268
|
+
### Pull Requests
|
|
269
|
+
|
|
270
|
+
1. Make sure your code builds without errors (`pnpm build`)
|
|
271
|
+
2. Update documentation if needed
|
|
272
|
+
3. Open a PR with a clear description of your changes
|
|
273
|
+
4. Link any related issues
|
|
274
|
+
|
|
275
|
+
### Reporting Issues
|
|
276
|
+
|
|
277
|
+
Found a bug or have a feature request? [Open an issue](https://github.com/theodenanyoh11/create-kofi-stack/issues/new) with:
|
|
278
|
+
|
|
279
|
+
- A clear title and description
|
|
280
|
+
- Steps to reproduce (for bugs)
|
|
281
|
+
- Expected vs actual behavior
|
|
282
|
+
- Your environment (OS, Node version, etc.)
|
|
283
|
+
|
|
284
|
+
## Documentation
|
|
285
|
+
|
|
286
|
+
- [Convex Docs](https://docs.convex.dev)
|
|
287
|
+
- [Better-Auth Docs](https://www.better-auth.com)
|
|
288
|
+
- [shadcn/ui Docs](https://ui.shadcn.com)
|
|
289
|
+
- [Payload CMS Docs](https://payloadcms.com/docs)
|
|
290
|
+
- [Fumadocs](https://fumadocs.vercel.app)
|
|
291
|
+
- [Next.js Docs](https://nextjs.org/docs)
|
|
292
|
+
- [Tailwind CSS Docs](https://tailwindcss.com/docs)
|
|
293
|
+
|
|
294
|
+
## License
|
|
295
|
+
|
|
296
|
+
MIT © [theodenanyoh](https://github.com/theodenanyoh11)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|