@pyreon/create-zero 0.14.0 → 0.16.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 +85 -22
- package/bin/create-pyreon-app.js +2 -0
- package/lib/index.js +1254 -191
- package/package.json +5 -2
- package/templates/{default → app}/src/routes/_layout.tsx +5 -2
- package/templates/{default → app}/src/routes/posts/[id].tsx +14 -0
- package/templates/blog/.mcp.json +8 -0
- package/templates/blog/CLAUDE.md +59 -0
- package/templates/blog/index.html +18 -0
- package/templates/blog/public/favicon.svg +4 -0
- package/templates/blog/src/content/posts/static-vs-ssr.tsx +54 -0
- package/templates/blog/src/content/posts/welcome.tsx +70 -0
- package/templates/blog/src/content/posts/why-signals.tsx +57 -0
- package/templates/blog/src/entry-client.ts +5 -0
- package/templates/blog/src/global.css +292 -0
- package/templates/blog/src/lib/posts.ts +45 -0
- package/templates/blog/src/routes/_layout.tsx +40 -0
- package/templates/blog/src/routes/about.tsx +28 -0
- package/templates/blog/src/routes/api/rss.ts +55 -0
- package/templates/blog/src/routes/blog/[slug].tsx +73 -0
- package/templates/blog/src/routes/blog/index.tsx +43 -0
- package/templates/blog/src/routes/index.tsx +52 -0
- package/templates/blog/tsconfig.json +16 -0
- package/templates/dashboard/.mcp.json +8 -0
- package/templates/dashboard/CLAUDE.md +50 -0
- package/templates/dashboard/index.html +16 -0
- package/templates/dashboard/public/favicon.svg +4 -0
- package/templates/dashboard/src/entry-client.ts +5 -0
- package/templates/dashboard/src/global.css +451 -0
- package/templates/dashboard/src/lib/auth.ts +106 -0
- package/templates/dashboard/src/lib/db.ts +118 -0
- package/templates/dashboard/src/routes/_layout.tsx +28 -0
- package/templates/dashboard/src/routes/api/signout.ts +15 -0
- package/templates/dashboard/src/routes/app/_layout.tsx +76 -0
- package/templates/dashboard/src/routes/app/dashboard.tsx +92 -0
- package/templates/dashboard/src/routes/app/invoices/[id].tsx +214 -0
- package/templates/dashboard/src/routes/app/invoices/index.tsx +61 -0
- package/templates/dashboard/src/routes/app/settings/account.tsx +31 -0
- package/templates/dashboard/src/routes/app/settings/billing.tsx +28 -0
- package/templates/dashboard/src/routes/app/settings/index.tsx +29 -0
- package/templates/dashboard/src/routes/app/users.tsx +50 -0
- package/templates/dashboard/src/routes/index.tsx +40 -0
- package/templates/dashboard/src/routes/login.tsx +79 -0
- package/templates/dashboard/src/routes/signup.tsx +78 -0
- package/templates/dashboard/tsconfig.json +16 -0
- package/lib/index.js.map +0 -1
- /package/templates/{default → app}/.mcp.json +0 -0
- /package/templates/{default → app}/CLAUDE.md +0 -0
- /package/templates/{default → app}/index.html +0 -0
- /package/templates/{default → app}/public/favicon.svg +0 -0
- /package/templates/{default → app}/src/entry-client.ts +0 -0
- /package/templates/{default → app}/src/features/posts.ts +0 -0
- /package/templates/{default → app}/src/global.css +0 -0
- /package/templates/{default → app}/src/routes/(admin)/dashboard.tsx +0 -0
- /package/templates/{default → app}/src/routes/_error.tsx +0 -0
- /package/templates/{default → app}/src/routes/_loading.tsx +0 -0
- /package/templates/{default → app}/src/routes/about.tsx +0 -0
- /package/templates/{default → app}/src/routes/api/health.ts +0 -0
- /package/templates/{default → app}/src/routes/api/posts.ts +0 -0
- /package/templates/{default → app}/src/routes/counter.tsx +0 -0
- /package/templates/{default → app}/src/routes/index.tsx +0 -0
- /package/templates/{default → app}/src/routes/posts/index.tsx +0 -0
- /package/templates/{default → app}/src/routes/posts/new.tsx +0 -0
- /package/templates/{default → app}/src/stores/app.ts +0 -0
- /package/templates/{default → app}/tsconfig.json +0 -0
package/README.md
CHANGED
|
@@ -1,41 +1,104 @@
|
|
|
1
|
-
# @pyreon/create-zero
|
|
1
|
+
# @pyreon/create-zero · `create-pyreon-app`
|
|
2
2
|
|
|
3
|
-
Interactive
|
|
3
|
+
Interactive scaffolder for [Pyreon Zero](https://github.com/pyreon/pyreon) projects.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This package ships **two bin aliases** — both invoke the same scaffolder:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
+
# Canonical (recommended in docs)
|
|
9
|
+
bunx create-pyreon-app my-app
|
|
10
|
+
|
|
11
|
+
# Back-compat (older docs / `bun create` flow)
|
|
8
12
|
bun create @pyreon/zero my-app
|
|
9
13
|
```
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Pick whichever you prefer; the interactive prompts and the resulting project are identical.
|
|
16
|
+
|
|
17
|
+
## Templates
|
|
18
|
+
|
|
19
|
+
Three curated starting points:
|
|
20
|
+
|
|
21
|
+
| Template | Default mode | What you get |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| **`app`** | SSR streaming | Counter, posts, layout, admin route group — the full-featured starter. |
|
|
24
|
+
| **`blog`** | Static (SSG) | Markdown-style TSX posts in `src/content/posts/`, RSS feed at `/rss.xml`, SEO-ready. |
|
|
25
|
+
| **`dashboard`** | SSR streaming | SaaS-shape: marketing landing → auth-gated `/app/*` routes (overview, users, invoices, settings) → invoice export demo using `@pyreon/document-primitives` (the same component tree renders in browser AND exports to PDF/email). |
|
|
26
|
+
|
|
27
|
+
Force a template non-interactively:
|
|
12
28
|
|
|
13
29
|
```bash
|
|
14
|
-
|
|
30
|
+
bunx create-pyreon-app my-app --template blog
|
|
15
31
|
```
|
|
16
32
|
|
|
17
|
-
##
|
|
33
|
+
## Deployment adapters
|
|
34
|
+
|
|
35
|
+
Pick a target during the prompt or pass `--adapter`. Each adapter writes the platform-specific deploy artefact alongside the project:
|
|
36
|
+
|
|
37
|
+
| Adapter | Files written |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `vercel` | `vercel.json` |
|
|
40
|
+
| `cloudflare` | `wrangler.toml`, `_routes.json` |
|
|
41
|
+
| `netlify` | `netlify.toml` |
|
|
42
|
+
| `node` | `Dockerfile`, `.dockerignore` |
|
|
43
|
+
| `bun` | `Dockerfile` (bun-based), `.dockerignore` |
|
|
44
|
+
| `static` | (none — `dist/` is the artefact) |
|
|
45
|
+
|
|
46
|
+
The `vite.config.ts` automatically imports the matching `*Adapter()` factory from `@pyreon/zero/server`.
|
|
47
|
+
|
|
48
|
+
## Backend integrations
|
|
49
|
+
|
|
50
|
+
Two scaffolders that write **plain files into your project** — no Pyreon-side wrapper packages, no version coupling. You own the integration code and update it independently of Pyreon releases.
|
|
18
51
|
|
|
19
|
-
|
|
52
|
+
| Integration | Files written | Replaces |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| `supabase` | `src/lib/supabase.ts`, `src/lib/auth.ts`, `src/lib/db.ts` (in dashboard) | The dashboard template's in-memory auth + db stubs |
|
|
55
|
+
| `email` | `src/lib/email.ts`, `src/emails/welcome.tsx`, `src/routes/api/email/welcome.ts` | — |
|
|
20
56
|
|
|
21
|
-
|
|
22
|
-
2. **Features** — pick from store, query, forms, feature CRUD, i18n, tables, virtual lists, CSS-in-JS, UI elements, animations, hooks
|
|
23
|
-
3. **AI toolchain** — MCP server config, CLAUDE.md, doctor scripts
|
|
57
|
+
The `dashboard` template preselects both. For `app` / `blog`, integrations are off by default but selectable.
|
|
24
58
|
|
|
25
|
-
|
|
59
|
+
The email integration is the **headline Pyreon angle**: the same `<DocDocument>` / `<DocSection>` / `<DocText>` component tree renders in the browser AND exports to email HTML via `@pyreon/document-primitives` — one author for many output formats.
|
|
26
60
|
|
|
27
|
-
|
|
61
|
+
## AI tooling
|
|
62
|
+
|
|
63
|
+
Multi-select for the AI rule files you want generated:
|
|
64
|
+
|
|
65
|
+
| Option | File | Default |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| `mcp` | `.mcp.json` | ✓ |
|
|
68
|
+
| `claude` | `CLAUDE.md` | ✓ |
|
|
69
|
+
| `cursor` | `.cursor/rules/pyreon.md` | — |
|
|
70
|
+
| `copilot` | `.github/copilot-instructions.md` | — |
|
|
71
|
+
| `agents` | `AGENTS.md` | — |
|
|
72
|
+
|
|
73
|
+
All five share a canonical "Pyreon principles" body so guidance stays consistent across tools.
|
|
74
|
+
|
|
75
|
+
## Compat mode
|
|
76
|
+
|
|
77
|
+
Migrating from another framework? Pick `react` / `vue` / `solid` / `preact` and the scaffolder configures `@pyreon/vite-plugin` with the matching shim layer (`useState`, `useEffect`, `<Suspense>`, etc.).
|
|
78
|
+
|
|
79
|
+
## CLI flags (one-shot, non-interactive)
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
bunx create-pyreon-app my-app --template dashboard \
|
|
83
|
+
--adapter vercel \
|
|
84
|
+
--integrations supabase,email \
|
|
85
|
+
--ai mcp,claude,cursor \
|
|
86
|
+
--yes
|
|
87
|
+
```
|
|
28
88
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
89
|
+
| Flag | Values |
|
|
90
|
+
| --- | --- |
|
|
91
|
+
| `--template` | `app` / `blog` / `dashboard` |
|
|
92
|
+
| `--adapter` | `vercel` / `cloudflare` / `netlify` / `node` / `bun` / `static` |
|
|
93
|
+
| `--mode` | `ssr-stream` / `ssr-string` / `ssg` / `spa` |
|
|
94
|
+
| `--features` | csv (`store,query,forms,…`) |
|
|
95
|
+
| `--integrations` | csv (`supabase,email`) |
|
|
96
|
+
| `--ai` | csv (`mcp,claude,cursor,copilot,agents`) |
|
|
97
|
+
| `--compat` | `none` / `react` / `vue` / `solid` / `preact` |
|
|
98
|
+
| `--lint` / `--no-lint` | toggle `@pyreon/lint` |
|
|
99
|
+
| `--yes` | accept defaults, skip prompts |
|
|
100
|
+
| `--help`, `-h` | show usage |
|
|
38
101
|
|
|
39
102
|
## License
|
|
40
103
|
|
|
41
|
-
|
|
104
|
+
MIT
|