create-reactor 0.1.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 +123 -0
- package/create-app.mjs +712 -0
- package/lib/build.mjs +434 -0
- package/lib/pm.mjs +85 -0
- package/lib/presets.mjs +122 -0
- package/lib/templates/ai-docs.mjs +80 -0
- package/lib/templates/app.mjs +961 -0
- package/lib/templates/backend.mjs +715 -0
- package/lib/templates/base.mjs +671 -0
- package/lib/templates/biome.mjs +107 -0
- package/lib/templates/extras.mjs +360 -0
- package/lib/templates/features.mjs +463 -0
- package/lib/templates/quality.mjs +159 -0
- package/lib/templates/readme.mjs +351 -0
- package/lib/templates/security.mjs +70 -0
- package/lib/templates/server.mjs +141 -0
- package/lib/templates/state.mjs +192 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ansh Roshan
|
|
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,123 @@
|
|
|
1
|
+
# create-reactor
|
|
2
|
+
|
|
3
|
+
Your personal React project generator. Answer a few questions — or pick a preset — and get a fully wired-up modern stack. No more repeating boilerplate.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm create reactor@latest my-app
|
|
7
|
+
# or: bun create reactor my-app · pnpm create reactor my-app · yarn create reactor my-app
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Presets (one answer instead of twelve)
|
|
11
|
+
|
|
12
|
+
| Preset | What you get |
|
|
13
|
+
| ------ | ------------ |
|
|
14
|
+
| **Minimal** | Vite + TS + Tailwind v4 + shadcn/ui + TanStack Router |
|
|
15
|
+
| **SaaS** | Convex + Clerk + Stripe + Resend + PostHog + Sentry + Fallow + charts + tests + E2E + CI + deploy configs |
|
|
16
|
+
| **Full-stack API** | Hono + tRPC + Drizzle + Neon + Clerk + Biome + Fallow + tests + CI |
|
|
17
|
+
| **AI app** | Convex + Clerk + AI SDK (Claude) streaming chat |
|
|
18
|
+
| **Everything** | Every feature and every extra — the kitchen sink |
|
|
19
|
+
| **Custom** | Choose every option yourself |
|
|
20
|
+
|
|
21
|
+
## Everything it can set up
|
|
22
|
+
|
|
23
|
+
| Layer | Options |
|
|
24
|
+
| ----- | ------- |
|
|
25
|
+
| Build | **Vite** (Rolldown/OXC-powered) + **React 19** + **TypeScript** (always) |
|
|
26
|
+
| Styling | **Tailwind CSS v4** + **shadcn/ui** (always, pick which components) |
|
|
27
|
+
| Routing | **TanStack Router** (file-based) · React Router · none |
|
|
28
|
+
| Backend | **Convex** · Supabase · **Hono + tRPC** (typed API server) · none |
|
|
29
|
+
| ORM | **Drizzle** · Prisma · none |
|
|
30
|
+
| Database | **Neon** (serverless Postgres) · Local Postgres (Docker) · **Turso** (SQLite) · Supabase · any Postgres |
|
|
31
|
+
| Auth | **Clerk** · **Better Auth** · Convex Auth · Supabase Auth · none |
|
|
32
|
+
| State | **Zustand** · Jotai · Redux Toolkit · none |
|
|
33
|
+
| Linting | **ESLint + Prettier** · **Biome** (Rust, one tool) |
|
|
34
|
+
| AI | **AI SDK** with Anthropic / OpenAI / Google |
|
|
35
|
+
| Data & UI libs | TanStack Query · TanStack Table · React Hook Form + Zod · Recharts · Motion · GSAP · Tiptap · Leaflet · date-fns · nuqs · Upstash Redis |
|
|
36
|
+
| SaaS features | Stripe · Resend + React Email · PostHog · react-i18next · PWA · deploy configs (Docker/Vercel/Netlify) |
|
|
37
|
+
| Quality | Vitest + Testing Library · **Playwright E2E** · MSW · Storybook · Husky + lint-staged · GitHub Actions CI · Sentry · **Fallow** (dead code/duplication/complexity audit) · Knip |
|
|
38
|
+
| Security | **Supply-chain protection**: 7-day package cooldown (bun/pnpm/npm) — on by default |
|
|
39
|
+
| AI-native | Every project ships **AGENTS.md + CLAUDE.md** so AI coding assistants understand it instantly |
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
### Interactive (recommended)
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
npm create reactor@latest
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### One-liners
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
# Pick a preset
|
|
53
|
+
npm create reactor@latest my-app -- --preset saas
|
|
54
|
+
npm create reactor@latest my-app -- --preset everything --yes
|
|
55
|
+
|
|
56
|
+
# Preset + overrides
|
|
57
|
+
npm create reactor@latest my-app -- --preset saas --ai anthropic --linter biome
|
|
58
|
+
|
|
59
|
+
# Fully custom via flags
|
|
60
|
+
npm create reactor@latest my-app -- --backend hono --orm drizzle --db neon \
|
|
61
|
+
--auth clerk --state jotai --linter biome --extras charts,e2e,deploy --yes
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
> With `npm create`, flags go after a `--` separator. With `bun create reactor my-app --preset saas` you can drop the separator.
|
|
65
|
+
|
|
66
|
+
### All flags
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
--preset <minimal|saas|fullstack|ai|everything|custom>
|
|
70
|
+
--pm <bun|pnpm|npm> package manager
|
|
71
|
+
--backend <convex|supabase|hono|none> backend / API server
|
|
72
|
+
--orm <drizzle|prisma|none> ORM (not for Convex)
|
|
73
|
+
--db <neon|docker|turso|supabase|other> database provider (with an ORM)
|
|
74
|
+
--auth <clerk|better-auth|convex-auth|supabase-auth|none>
|
|
75
|
+
--router <tanstack|react-router|none> routing
|
|
76
|
+
--state <zustand|jotai|redux|none> state management
|
|
77
|
+
--linter <eslint|biome> linter/formatter
|
|
78
|
+
--ai <anthropic|openai|google|none> AI SDK provider
|
|
79
|
+
--components <label,dialog,table,...> extra shadcn/ui components
|
|
80
|
+
--extras <a,b,c | all> query, table, forms, charts, motion, gsap, editor,
|
|
81
|
+
maps, dates, nuqs, redis, stripe, resend, posthog,
|
|
82
|
+
i18n, pwa, deploy, testing, e2e, msw, storybook,
|
|
83
|
+
prettier, husky, ci, sentry, knip
|
|
84
|
+
--no-secure / --no-git / --no-install / --no-verify
|
|
85
|
+
-y, --yes accept defaults, no prompts
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Install globally (optional)
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
npm install -g create-reactor
|
|
92
|
+
# then from anywhere:
|
|
93
|
+
create-reactor my-app --preset saas
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Notes
|
|
97
|
+
|
|
98
|
+
- **Verification built in**: every generation ends with a real `build` (+ tests when selected), so you know the project works before you open it.
|
|
99
|
+
- **Supply-chain protection** is on by default — generated projects refuse to install packages younger than 7 days (the window in which malicious versions are caught). Disable with `--no-secure`.
|
|
100
|
+
- **Convex / Clerk / Stripe / etc. logins** can't be automated — the generated README and terminal output give you the exact steps and every `.env` placeholder is pre-created.
|
|
101
|
+
- The generator always installs `@latest` of everything, so it never goes stale.
|
|
102
|
+
|
|
103
|
+
## Maintaining the generator
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
create-app.mjs # CLI: prompts + orchestration
|
|
107
|
+
lib/presets.mjs # preset definitions
|
|
108
|
+
lib/pm.mjs # package manager detection + command mapping
|
|
109
|
+
lib/build.mjs # config -> files + deps plan
|
|
110
|
+
lib/templates/
|
|
111
|
+
base.mjs # vite/ts/tailwind/shadcn/env/config files
|
|
112
|
+
app.mjs # React source files (main.tsx, routes, components)
|
|
113
|
+
backend.mjs # convex/supabase/drizzle/prisma/ai/better-auth files
|
|
114
|
+
server.mjs # hono + tRPC server files
|
|
115
|
+
state.mjs # zustand/jotai/redux stores + demos
|
|
116
|
+
features.mjs # stripe/resend/posthog/i18n/pwa/deploy/charts/gsap/tiptap/leaflet
|
|
117
|
+
quality.mjs # playwright/msw templates
|
|
118
|
+
biome.mjs # biome config + linter abstraction
|
|
119
|
+
ai-docs.mjs # AGENTS.md + CLAUDE.md generation
|
|
120
|
+
security.mjs # supply-chain protection configs
|
|
121
|
+
extras.mjs # table/motion/vitest/husky/ci/sentry templates
|
|
122
|
+
readme.mjs # generated README + next-steps checklist
|
|
123
|
+
```
|