create-smoodly-app 0.0.51 → 0.0.53

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 (169) hide show
  1. package/README.md +22 -33
  2. package/dist/index.js +86 -347
  3. package/package.json +4 -5
  4. package/templates/astro-blank/AGENTS.md +2 -8
  5. package/templates/astro-blank/README.md +13 -23
  6. package/templates/astro-blank/_gitignore +1 -0
  7. package/templates/astro-blank/package.json +2 -3
  8. package/templates/astro-blank/scripts/seed.ts +9 -3
  9. package/templates/astro-blank/src/smoodly/collections.ts +2 -2
  10. package/templates/astro-blank-intl/AGENTS.md +2 -8
  11. package/templates/astro-blank-intl/README.md +13 -23
  12. package/templates/astro-blank-intl/_gitignore +1 -0
  13. package/templates/astro-blank-intl/package.json +2 -3
  14. package/templates/astro-blank-intl/scripts/seed.ts +9 -3
  15. package/templates/astro-blank-intl/src/smoodly/collections.ts +2 -2
  16. package/templates/astro-lorem/AGENTS.md +2 -8
  17. package/templates/astro-lorem/README.md +12 -16
  18. package/templates/astro-lorem/_gitignore +1 -0
  19. package/templates/astro-lorem/package.json +2 -3
  20. package/templates/astro-lorem/scripts/seed.ts +9 -3
  21. package/templates/astro-lorem/src/components/sections/PageHero.schema.ts +3 -1
  22. package/templates/astro-lorem/src/sections/pageHero.astro +1 -1
  23. package/templates/astro-lorem-intl/AGENTS.md +2 -8
  24. package/templates/astro-lorem-intl/README.md +12 -16
  25. package/templates/astro-lorem-intl/_gitignore +1 -0
  26. package/templates/astro-lorem-intl/package.json +2 -3
  27. package/templates/astro-lorem-intl/scripts/seed.ts +9 -3
  28. package/templates/astro-lorem-intl/src/components/sections/PageHero.schema.ts +3 -1
  29. package/templates/astro-lorem-intl/src/sections/pageHero.astro +1 -1
  30. package/templates/blank/AGENTS.md +7 -13
  31. package/templates/blank/README.md +12 -22
  32. package/templates/blank/_gitignore +1 -0
  33. package/templates/blank/app/(smoodly)/admin/[[...segments]]/route.ts +6 -5
  34. package/templates/blank/next.config.ts +1 -4
  35. package/templates/blank/package.json +4 -4
  36. package/templates/blank/scripts/seed.ts +9 -3
  37. package/templates/blank/smoodly/collections.ts +2 -2
  38. package/templates/blank/smoodly/server.ts +24 -46
  39. package/templates/blank-intl/AGENTS.md +7 -13
  40. package/templates/blank-intl/README.md +12 -22
  41. package/templates/blank-intl/_gitignore +1 -0
  42. package/templates/blank-intl/app/(smoodly)/admin/[[...segments]]/route.ts +6 -5
  43. package/templates/blank-intl/next.config.ts +1 -4
  44. package/templates/blank-intl/package.json +4 -4
  45. package/templates/blank-intl/scripts/seed.ts +9 -3
  46. package/templates/blank-intl/smoodly/collections.ts +2 -2
  47. package/templates/blank-intl/smoodly/server.ts +24 -46
  48. package/templates/blank-intl.tsconfig.json +0 -3
  49. package/templates/blank.tsconfig.json +0 -3
  50. package/templates/lorem/AGENTS.md +7 -13
  51. package/templates/lorem/README.md +13 -17
  52. package/templates/lorem/_gitignore +1 -0
  53. package/templates/lorem/app/(smoodly)/admin/[[...segments]]/route.ts +6 -5
  54. package/templates/lorem/components/sections/PageHero.schema.ts +3 -1
  55. package/templates/lorem/components/sections/PageHero.tsx +1 -1
  56. package/templates/lorem/next.config.ts +1 -4
  57. package/templates/lorem/package.json +4 -4
  58. package/templates/lorem/scripts/seed.ts +9 -3
  59. package/templates/lorem/smoodly/config.ts +1 -1
  60. package/templates/lorem/smoodly/server.ts +24 -46
  61. package/templates/lorem-intl/AGENTS.md +7 -13
  62. package/templates/lorem-intl/README.md +13 -17
  63. package/templates/lorem-intl/_gitignore +1 -0
  64. package/templates/lorem-intl/app/(smoodly)/admin/[[...segments]]/route.ts +6 -5
  65. package/templates/lorem-intl/components/sections/PageHero.schema.ts +3 -1
  66. package/templates/lorem-intl/components/sections/PageHero.tsx +1 -1
  67. package/templates/lorem-intl/next.config.ts +1 -4
  68. package/templates/lorem-intl/package.json +4 -4
  69. package/templates/lorem-intl/scripts/seed.ts +9 -3
  70. package/templates/lorem-intl/smoodly/config.ts +1 -1
  71. package/templates/lorem-intl/smoodly/server.ts +24 -46
  72. package/templates/lorem-intl.tsconfig.json +0 -3
  73. package/templates/lorem.tsconfig.json +0 -3
  74. package/templates/astro-blank/supabase/migrations/20260926120000_smoodly_v1.sql +0 -535
  75. package/templates/astro-blank/supabase/migrations/20260926130000_smoodly_v2.sql +0 -26
  76. package/templates/astro-blank/supabase/migrations/20260926140000_smoodly_v3.sql +0 -38
  77. package/templates/astro-blank/supabase/migrations/20260926150000_smoodly_v4.sql +0 -41
  78. package/templates/astro-blank/supabase/migrations/20260929120000_smoodly_v5.sql +0 -56
  79. package/templates/astro-blank/supabase/migrations/20260929135523_smoodly_v6.sql +0 -200
  80. package/templates/astro-blank/supabase/migrations/20260930040956_smoodly_v7.sql +0 -84
  81. package/templates/astro-blank/supabase/migrations/20261007120000_smoodly_v8.sql +0 -154
  82. package/templates/astro-blank/supabase/migrations/20261007200000_smoodly_v9.sql +0 -30
  83. package/templates/astro-blank/supabase/migrations/20261008120000_smoodly_v10.sql +0 -47
  84. package/templates/astro-blank/supabase/migrations/20261009120000_smoodly_v11.sql +0 -49
  85. package/templates/astro-blank/supabase/migrations/20261009120100_smoodly_views.sql +0 -20
  86. package/templates/astro-blank-intl/supabase/migrations/20260926120000_smoodly_v1.sql +0 -535
  87. package/templates/astro-blank-intl/supabase/migrations/20260926130000_smoodly_v2.sql +0 -26
  88. package/templates/astro-blank-intl/supabase/migrations/20260926140000_smoodly_v3.sql +0 -38
  89. package/templates/astro-blank-intl/supabase/migrations/20260926150000_smoodly_v4.sql +0 -41
  90. package/templates/astro-blank-intl/supabase/migrations/20260929120000_smoodly_v5.sql +0 -56
  91. package/templates/astro-blank-intl/supabase/migrations/20260929135523_smoodly_v6.sql +0 -200
  92. package/templates/astro-blank-intl/supabase/migrations/20260930040956_smoodly_v7.sql +0 -84
  93. package/templates/astro-blank-intl/supabase/migrations/20261007120000_smoodly_v8.sql +0 -154
  94. package/templates/astro-blank-intl/supabase/migrations/20261007200000_smoodly_v9.sql +0 -30
  95. package/templates/astro-blank-intl/supabase/migrations/20261008120000_smoodly_v10.sql +0 -47
  96. package/templates/astro-blank-intl/supabase/migrations/20261009120000_smoodly_v11.sql +0 -49
  97. package/templates/astro-blank-intl/supabase/migrations/20261009120100_smoodly_views.sql +0 -20
  98. package/templates/astro-lorem/supabase/migrations/20260926120000_smoodly_v1.sql +0 -535
  99. package/templates/astro-lorem/supabase/migrations/20260926130000_smoodly_v2.sql +0 -26
  100. package/templates/astro-lorem/supabase/migrations/20260926140000_smoodly_v3.sql +0 -38
  101. package/templates/astro-lorem/supabase/migrations/20260926150000_smoodly_v4.sql +0 -41
  102. package/templates/astro-lorem/supabase/migrations/20260929120000_smoodly_v5.sql +0 -56
  103. package/templates/astro-lorem/supabase/migrations/20260929135523_smoodly_v6.sql +0 -200
  104. package/templates/astro-lorem/supabase/migrations/20260930040956_smoodly_v7.sql +0 -84
  105. package/templates/astro-lorem/supabase/migrations/20261007120000_smoodly_v8.sql +0 -154
  106. package/templates/astro-lorem/supabase/migrations/20261007200000_smoodly_v9.sql +0 -30
  107. package/templates/astro-lorem/supabase/migrations/20261008120000_smoodly_v10.sql +0 -47
  108. package/templates/astro-lorem/supabase/migrations/20261009120000_smoodly_v11.sql +0 -49
  109. package/templates/astro-lorem/supabase/migrations/20261009120100_smoodly_views.sql +0 -58
  110. package/templates/astro-lorem-intl/supabase/migrations/20260926120000_smoodly_v1.sql +0 -535
  111. package/templates/astro-lorem-intl/supabase/migrations/20260926130000_smoodly_v2.sql +0 -26
  112. package/templates/astro-lorem-intl/supabase/migrations/20260926140000_smoodly_v3.sql +0 -38
  113. package/templates/astro-lorem-intl/supabase/migrations/20260926150000_smoodly_v4.sql +0 -41
  114. package/templates/astro-lorem-intl/supabase/migrations/20260929120000_smoodly_v5.sql +0 -56
  115. package/templates/astro-lorem-intl/supabase/migrations/20260929135523_smoodly_v6.sql +0 -200
  116. package/templates/astro-lorem-intl/supabase/migrations/20260930040956_smoodly_v7.sql +0 -84
  117. package/templates/astro-lorem-intl/supabase/migrations/20261007120000_smoodly_v8.sql +0 -154
  118. package/templates/astro-lorem-intl/supabase/migrations/20261007200000_smoodly_v9.sql +0 -30
  119. package/templates/astro-lorem-intl/supabase/migrations/20261008120000_smoodly_v10.sql +0 -47
  120. package/templates/astro-lorem-intl/supabase/migrations/20261009120000_smoodly_v11.sql +0 -49
  121. package/templates/astro-lorem-intl/supabase/migrations/20261009120100_smoodly_views.sql +0 -58
  122. package/templates/blank/supabase/migrations/20260926120000_smoodly_v1.sql +0 -535
  123. package/templates/blank/supabase/migrations/20260926130000_smoodly_v2.sql +0 -26
  124. package/templates/blank/supabase/migrations/20260926140000_smoodly_v3.sql +0 -38
  125. package/templates/blank/supabase/migrations/20260926150000_smoodly_v4.sql +0 -41
  126. package/templates/blank/supabase/migrations/20260929120000_smoodly_v5.sql +0 -56
  127. package/templates/blank/supabase/migrations/20260929135523_smoodly_v6.sql +0 -200
  128. package/templates/blank/supabase/migrations/20260930040956_smoodly_v7.sql +0 -84
  129. package/templates/blank/supabase/migrations/20261007120000_smoodly_v8.sql +0 -154
  130. package/templates/blank/supabase/migrations/20261007200000_smoodly_v9.sql +0 -30
  131. package/templates/blank/supabase/migrations/20261008120000_smoodly_v10.sql +0 -47
  132. package/templates/blank/supabase/migrations/20261009120000_smoodly_v11.sql +0 -49
  133. package/templates/blank/supabase/migrations/20261009120100_smoodly_views.sql +0 -20
  134. package/templates/blank-intl/supabase/migrations/20260926120000_smoodly_v1.sql +0 -535
  135. package/templates/blank-intl/supabase/migrations/20260926130000_smoodly_v2.sql +0 -26
  136. package/templates/blank-intl/supabase/migrations/20260926140000_smoodly_v3.sql +0 -38
  137. package/templates/blank-intl/supabase/migrations/20260926150000_smoodly_v4.sql +0 -41
  138. package/templates/blank-intl/supabase/migrations/20260929120000_smoodly_v5.sql +0 -56
  139. package/templates/blank-intl/supabase/migrations/20260929135523_smoodly_v6.sql +0 -200
  140. package/templates/blank-intl/supabase/migrations/20260930040956_smoodly_v7.sql +0 -84
  141. package/templates/blank-intl/supabase/migrations/20261007120000_smoodly_v8.sql +0 -154
  142. package/templates/blank-intl/supabase/migrations/20261007200000_smoodly_v9.sql +0 -30
  143. package/templates/blank-intl/supabase/migrations/20261008120000_smoodly_v10.sql +0 -47
  144. package/templates/blank-intl/supabase/migrations/20261009120000_smoodly_v11.sql +0 -49
  145. package/templates/blank-intl/supabase/migrations/20261009120100_smoodly_views.sql +0 -20
  146. package/templates/lorem/supabase/migrations/20260926120000_smoodly_v1.sql +0 -535
  147. package/templates/lorem/supabase/migrations/20260926130000_smoodly_v2.sql +0 -26
  148. package/templates/lorem/supabase/migrations/20260926140000_smoodly_v3.sql +0 -38
  149. package/templates/lorem/supabase/migrations/20260926150000_smoodly_v4.sql +0 -41
  150. package/templates/lorem/supabase/migrations/20260929120000_smoodly_v5.sql +0 -56
  151. package/templates/lorem/supabase/migrations/20260929135523_smoodly_v6.sql +0 -200
  152. package/templates/lorem/supabase/migrations/20260930040956_smoodly_v7.sql +0 -84
  153. package/templates/lorem/supabase/migrations/20261007120000_smoodly_v8.sql +0 -154
  154. package/templates/lorem/supabase/migrations/20261007200000_smoodly_v9.sql +0 -30
  155. package/templates/lorem/supabase/migrations/20261008120000_smoodly_v10.sql +0 -47
  156. package/templates/lorem/supabase/migrations/20261009120000_smoodly_v11.sql +0 -49
  157. package/templates/lorem/supabase/migrations/20261009120100_smoodly_views.sql +0 -58
  158. package/templates/lorem-intl/supabase/migrations/20260926120000_smoodly_v1.sql +0 -535
  159. package/templates/lorem-intl/supabase/migrations/20260926130000_smoodly_v2.sql +0 -26
  160. package/templates/lorem-intl/supabase/migrations/20260926140000_smoodly_v3.sql +0 -38
  161. package/templates/lorem-intl/supabase/migrations/20260926150000_smoodly_v4.sql +0 -41
  162. package/templates/lorem-intl/supabase/migrations/20260929120000_smoodly_v5.sql +0 -56
  163. package/templates/lorem-intl/supabase/migrations/20260929135523_smoodly_v6.sql +0 -200
  164. package/templates/lorem-intl/supabase/migrations/20260930040956_smoodly_v7.sql +0 -84
  165. package/templates/lorem-intl/supabase/migrations/20261007120000_smoodly_v8.sql +0 -154
  166. package/templates/lorem-intl/supabase/migrations/20261007200000_smoodly_v9.sql +0 -30
  167. package/templates/lorem-intl/supabase/migrations/20261008120000_smoodly_v10.sql +0 -47
  168. package/templates/lorem-intl/supabase/migrations/20261009120000_smoodly_v11.sql +0 -49
  169. package/templates/lorem-intl/supabase/migrations/20261009120100_smoodly_views.sql +0 -58
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  npx create-smoodly-app my-site
4
4
 
5
- A fresh Astro or Next.js site with the Smoodly admin mounted at `/admin`, a
6
- Supabase project holding the schema, `.env` (Astro) or `.env.local` (Next)
7
- written, and a first editor who can sign in.
5
+ A fresh Astro or Next.js site with the Smoodly admin mounted at `/admin`,
6
+ `.env` (Astro) or `.env.local` (Next) written with a space's three values,
7
+ the site's schema pushed to the space and the starter content seeded.
8
8
 
9
9
  ## What it asks
10
10
 
@@ -18,34 +18,23 @@ written, and a first editor who can sign in.
18
18
  gets the next-intl layout: the site under `app/[locale]/`, `i18n/`,
19
19
  `proxy.ts`, translated URLs per locale; Astro gets its own i18n config
20
20
  (`astro.config.ts` and `src/smoodly/config.ts`). Flag: `--locales en,fi`.
21
- 4. Where content lives: a **local Supabase stack** (`supabase init` +
22
- `supabase start` inside the app, with the services Smoodly never uses
23
- excluded — the image proxy, edge functions, analytics, the pooler —
24
- so the stack stays small beside any other you run; needs
25
- the Supabase CLI and Docker; when
26
- another project holds the default `543xx` ports the new one moves to the
27
- next free block, `553xx` and so on, and says so) or a
28
- **hosted project** (URL, publishable key, secret key; then an offer to
29
- `supabase link --project-ref <ref>` + `supabase db push`, the ref taken
30
- from the URL so the CLI never opens its project picker). The URL may be
31
- pasted without `https://`; anything that is not an http(s) URL is refused
32
- before any step runs. A custom domain has no ref, so the link is not
33
- offered and the two commands are printed instead. Either way the
34
- project is Smoodly's own: its tables are created unprefixed in `public`,
35
- so an app that keeps its own tables in Supabase gives them a project of
36
- their own, or takes Smoodly Cloud for content (DESIGN.md §1).
37
- 5. The first editor: pick an existing Auth user or create one (email +
38
- password). The `members` row is written with role `admin`, the email
39
- beside the id.
40
- If `@` does not appear when you type it (macOS, `@` on Option+2 with the
41
- terminal's "Option as Meta" setting on), paste the address or pass
42
- `--editor-email`.
21
+ 4. **Starter**: Lorem Co. (a tour of every feature, the default) or blank.
22
+ Flag: `--starter lorem|blank`.
23
+ 5. **The space's values**: create a project at smoodly.io, open its preview
24
+ space and paste the space id (`sp_…`), the secret key (`sk_…`, asked
25
+ hidden) and the publishable key (`pk_…`). A key of the wrong kind is
26
+ refused at its prompt. Flags: `--space`, `--secret-key`,
27
+ `--publishable-key`; a value cannot be defaulted, so `--yes` still asks,
28
+ and a run with no terminal and no flags names the three flags.
43
29
 
44
- Every prompt has a flag, so CI can run it: `--framework astro|next`, `--supabase local|hosted`, `--locales`,
45
- `--url`, `--publishable-key`, `--secret-key`, `--editor-email` (password from
46
- `SMOODLY_EDITOR_PASSWORD`), `--skip-link`, `--yes`. `--help` lists them.
47
- `--cloud` takes a Smoodly Cloud space's three values as a hosted project and
48
- skips `supabase init`, link, `db push` and the first editor: the shared
49
- project is migrated by Smoodly Cloud and the space's owner is its admin.
50
- A hidden `--smoodly-dep <spec>` overrides the `smoodly` dependency written into
51
- `package.json`; CI points it at the packed tarball.
30
+ Then it installs, writes the env file, runs `npx smoodly push` (the schema
31
+ to the space), `npm run seed` (the starter content through the API) and
32
+ commits. A failed push or seed keeps the folder and prints the command that
33
+ finishes it; a failed install removes the folder.
34
+
35
+ Every prompt has a flag, so CI can run it: `--framework`, `--locales`,
36
+ `--starter`, `--space`, `--secret-key`, `--publishable-key`, `--yes`.
37
+ `--help` lists them. Hidden flags for the repo's loop and CI:
38
+ `--api-url <url>` writes `SMOODLY_API_URL` (another service than
39
+ Smoodly's), and `--smoodly-dep <spec>` overrides the `smoodly`
40
+ dependency written into `package.json`; CI points it at the packed tarball.