create-ampless 0.2.0-alpha.2 → 0.2.0-alpha.21

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 (48) hide show
  1. package/README.ja.md +77 -0
  2. package/README.md +40 -1
  3. package/dist/index.js +2099 -47
  4. package/dist/templates/_shared/AGENTS.ja.md +104 -0
  5. package/dist/templates/_shared/AGENTS.md +104 -0
  6. package/dist/templates/_shared/README.ja.md +181 -0
  7. package/dist/templates/_shared/README.md +181 -0
  8. package/dist/templates/_shared/RUNBOOK.ja.md +150 -0
  9. package/dist/templates/_shared/RUNBOOK.md +19 -1
  10. package/dist/templates/_shared/amplify/auth/post-confirmation/resource.ts +6 -0
  11. package/dist/templates/_shared/amplify/backend.custom.ts +41 -0
  12. package/dist/templates/_shared/amplify/backend.ts +12 -2
  13. package/dist/templates/_shared/amplify/data/resource.custom.ts +33 -0
  14. package/dist/templates/_shared/amplify/data/resource.ts +23 -15
  15. package/dist/templates/_shared/amplify/events/processor-untrusted/resource.ts +4 -0
  16. package/dist/templates/_shared/amplify/functions/mcp-handler/handler.ts +1 -0
  17. package/dist/templates/_shared/amplify/functions/mcp-handler/resource.ts +11 -0
  18. package/dist/templates/_shared/amplify/functions/user-admin/handler.ts +4 -0
  19. package/dist/templates/_shared/amplify/functions/user-admin/resource.ts +12 -0
  20. package/dist/templates/_shared/amplify.yml +18 -0
  21. package/dist/templates/_shared/app/(admin)/admin/mcp-tokens/page.tsx +5 -0
  22. package/dist/templates/_shared/app/(admin)/admin/users/page.tsx +5 -0
  23. package/dist/templates/_shared/app/globals.css +55 -39
  24. package/dist/templates/_shared/app/layout.tsx +22 -1
  25. package/dist/templates/_shared/app/site/[siteId]/[...path]/route.ts +17 -0
  26. package/dist/templates/_shared/lib/admin.ts +9 -7
  27. package/dist/templates/_shared/lib/amplify.ts +17 -6
  28. package/dist/templates/_shared/package.json +11 -9
  29. package/dist/templates/_shared/proxy.ts +19 -2
  30. package/dist/templates/blog/README.ja.md +22 -0
  31. package/dist/templates/blog/README.md +17 -47
  32. package/dist/templates/blog/tokens.css +26 -40
  33. package/dist/templates/corporate/README.ja.md +18 -0
  34. package/dist/templates/corporate/README.md +12 -14
  35. package/dist/templates/corporate/tokens.css +17 -39
  36. package/dist/templates/dads/README.ja.md +31 -0
  37. package/dist/templates/dads/README.md +13 -17
  38. package/dist/templates/dads/tokens.css +22 -42
  39. package/dist/templates/docs/README.ja.md +24 -0
  40. package/dist/templates/docs/README.md +10 -13
  41. package/dist/templates/docs/tokens.css +17 -39
  42. package/dist/templates/landing/README.ja.md +20 -0
  43. package/dist/templates/landing/README.md +14 -19
  44. package/dist/templates/landing/tokens.css +17 -39
  45. package/dist/templates/minimal/README.ja.md +14 -0
  46. package/dist/templates/minimal/README.md +9 -47
  47. package/dist/templates/minimal/tokens.css +17 -39
  48. package/package.json +2 -1
@@ -2,50 +2,28 @@
2
2
  * tighter radius, monospace-leaning code styling. */
3
3
 
4
4
  [data-theme='docs'] {
5
- --background: oklch(1 0 0);
6
- --foreground: oklch(0.18 0.02 280);
7
- --card: oklch(0.99 0 0);
8
- --card-foreground: oklch(0.18 0.02 280);
9
- --primary: oklch(0.5 0.18 280);
10
- --primary-foreground: oklch(0.99 0 0);
11
- --secondary: oklch(0.96 0.01 280);
12
- --secondary-foreground: oklch(0.25 0.05 280);
13
- --muted: oklch(0.97 0.005 280);
14
- --muted-foreground: oklch(0.5 0.02 280);
15
- --accent: oklch(0.95 0.04 280);
16
- --accent-foreground: oklch(0.3 0.1 280);
17
- --destructive: oklch(0.55 0.22 25);
18
- --destructive-foreground: oklch(0.99 0 0);
19
- --border: oklch(0.9 0.005 280);
20
- --input: oklch(0.9 0.005 280);
21
- --ring: oklch(0.5 0.18 280);
5
+ --background: light-dark(oklch(1 0 0), oklch(0.16 0.02 280));
6
+ --foreground: light-dark(oklch(0.18 0.02 280), oklch(0.96 0.005 280));
7
+ --card: light-dark(oklch(0.99 0 0), oklch(0.2 0.02 280));
8
+ --card-foreground: light-dark(oklch(0.18 0.02 280), oklch(0.96 0.005 280));
9
+ --primary: light-dark(oklch(0.5 0.18 280), oklch(0.72 0.16 280));
10
+ --primary-foreground: light-dark(oklch(0.99 0 0), oklch(0.16 0.02 280));
11
+ --secondary: light-dark(oklch(0.96 0.01 280), oklch(0.28 0.03 280));
12
+ --secondary-foreground: light-dark(oklch(0.25 0.05 280), oklch(0.96 0.005 280));
13
+ --muted: light-dark(oklch(0.97 0.005 280), oklch(0.24 0.02 280));
14
+ --muted-foreground: light-dark(oklch(0.5 0.02 280), oklch(0.7 0.02 280));
15
+ --accent: light-dark(oklch(0.95 0.04 280), oklch(0.32 0.06 280));
16
+ --accent-foreground: light-dark(oklch(0.3 0.1 280), oklch(0.96 0.005 280));
17
+ --destructive: light-dark(oklch(0.55 0.22 25), oklch(0.55 0.22 25));
18
+ --destructive-foreground: light-dark(oklch(0.99 0 0), oklch(0.99 0 0));
19
+ --border: light-dark(oklch(0.9 0.005 280), oklch(0.32 0.02 280));
20
+ --input: light-dark(oklch(0.9 0.005 280), oklch(0.32 0.02 280));
21
+ --ring: light-dark(oklch(0.5 0.18 280), oklch(0.72 0.16 280));
22
22
  --radius: 0.25rem;
23
23
  --ampless-body-font: system-ui, -apple-system, sans-serif;
24
24
  --ampless-code-font: ui-monospace, SFMono-Regular, Menlo, monospace;
25
25
  }
26
26
 
27
- @media (prefers-color-scheme: dark) {
28
- [data-theme='docs'] {
29
- --background: oklch(0.16 0.02 280);
30
- --foreground: oklch(0.96 0.005 280);
31
- --card: oklch(0.2 0.02 280);
32
- --card-foreground: oklch(0.96 0.005 280);
33
- --primary: oklch(0.72 0.16 280);
34
- --primary-foreground: oklch(0.16 0.02 280);
35
- --secondary: oklch(0.28 0.03 280);
36
- --secondary-foreground: oklch(0.96 0.005 280);
37
- --muted: oklch(0.24 0.02 280);
38
- --muted-foreground: oklch(0.7 0.02 280);
39
- --accent: oklch(0.32 0.06 280);
40
- --accent-foreground: oklch(0.96 0.005 280);
41
- --destructive: oklch(0.55 0.22 25);
42
- --destructive-foreground: oklch(0.99 0 0);
43
- --border: oklch(0.32 0.02 280);
44
- --input: oklch(0.32 0.02 280);
45
- --ring: oklch(0.72 0.16 280);
46
- }
47
- }
48
-
49
27
  /* Code font scope: prose code blocks under the docs theme use the
50
28
  * configurable --ampless-code-font variable. The body font remains the
51
29
  * theme-configured --ampless-body-font (or system fallback). */
@@ -0,0 +1,20 @@
1
+ > English: [README.md](./README.md)
2
+ >
3
+ # Landing テーマ
4
+
5
+ 1 ページ完結型のヒーロー中心レイアウト。任意で「最新記事」グリッドも併設可能。ヘッダー / フッターナビ設定とウォームコーラル系アクセントパレットを備えます。
6
+
7
+ ## カスタマイズ
8
+
9
+ `/admin/sites/<siteId>/theme` で設定:
10
+
11
+ - **ヒーロー見出し** — 空欄ならサイト名を使用
12
+ - **ヒーローサブ見出し** — 空欄ならサイト説明を使用
13
+ - **CTA ボタンのテキスト**
14
+ - **CTA リンク先**
15
+ - **プライマリカラー**
16
+ - **角丸**
17
+ - **フィーチャー記事のスラッグ** — 公開済み投稿を 1 件ホームに固定
18
+ - **ロゴ画像 URL**
19
+ - **ヘッダーナビ** — ラベル + URL のペア
20
+ - **フッターリンク** — ラベル + URL のペア
@@ -1,25 +1,20 @@
1
- # {{siteName}}
1
+ > 日本語版: [README.ja.md](./README.ja.md)
2
+ >
3
+ # Landing theme
2
4
 
3
- A site powered by [ampless](https://github.com/heavymoons/ampless), using the **Landing** theme — hero-led single-page layout with optional "Latest" post grid, configurable header / footer nav, and a warm-coral accent palette.
5
+ Single-page hero focus with optional "Latest" post grid. Hero-led layout with configurable header / footer nav and a warm-coral accent palette.
4
6
 
5
7
  ## Customizing
6
8
 
7
9
  In `/admin/sites/<siteId>/theme`:
8
10
 
9
- - Hero headline / subheadline / CTA button text + URL
10
- - Header navigation (label + URL pairs)
11
- - Footer links
12
- - Primary color
13
- - Corner radius
14
-
15
- Empty hero fields fall back to the site name / description from `/admin/sites/<siteId>`.
16
-
17
- ## Getting started
18
-
19
- ```bash
20
- npm install
21
- npx ampx sandbox # provision the AWS backend
22
- npm run dev # start Next.js
23
- ```
24
-
25
- See the project README for full setup.
11
+ - **Hero headline** empty falls back to the site name
12
+ - **Hero subheadline** empty falls back to the site description
13
+ - **CTA button text**
14
+ - **CTA URL**
15
+ - **Primary color**
16
+ - **Corner radius**
17
+ - **Featured post slug** pin one published post to the home page
18
+ - **Logo image URL**
19
+ - **Header navigation** — label + URL pairs
20
+ - **Footer links** — label + URL pairs
@@ -3,45 +3,23 @@
3
3
  * templates/blog/tokens.css for the scoped-selector pattern. */
4
4
 
5
5
  [data-theme='landing'] {
6
- --background: oklch(0.99 0.01 60);
7
- --foreground: oklch(0.18 0.02 30);
8
- --card: oklch(1 0 0);
9
- --card-foreground: oklch(0.18 0.02 30);
10
- --primary: oklch(0.6 0.18 35);
11
- --primary-foreground: oklch(0.99 0.005 60);
12
- --secondary: oklch(0.96 0.015 50);
13
- --secondary-foreground: oklch(0.25 0.04 30);
14
- --muted: oklch(0.96 0.015 50);
15
- --muted-foreground: oklch(0.5 0.02 40);
16
- --accent: oklch(0.95 0.05 35);
17
- --accent-foreground: oklch(0.3 0.1 30);
18
- --destructive: oklch(0.55 0.22 25);
19
- --destructive-foreground: oklch(0.99 0 0);
20
- --border: oklch(0.92 0.01 60);
21
- --input: oklch(0.92 0.01 60);
22
- --ring: oklch(0.6 0.18 35);
6
+ --background: light-dark(oklch(0.99 0.01 60), oklch(0.16 0.02 30));
7
+ --foreground: light-dark(oklch(0.18 0.02 30), oklch(0.96 0.01 60));
8
+ --card: light-dark(oklch(1 0 0), oklch(0.22 0.02 30));
9
+ --card-foreground: light-dark(oklch(0.18 0.02 30), oklch(0.96 0.01 60));
10
+ --primary: light-dark(oklch(0.6 0.18 35), oklch(0.72 0.16 35));
11
+ --primary-foreground: light-dark(oklch(0.99 0.005 60), oklch(0.16 0.02 30));
12
+ --secondary: light-dark(oklch(0.96 0.015 50), oklch(0.28 0.03 30));
13
+ --secondary-foreground: light-dark(oklch(0.25 0.04 30), oklch(0.96 0.01 60));
14
+ --muted: light-dark(oklch(0.96 0.015 50), oklch(0.28 0.03 30));
15
+ --muted-foreground: light-dark(oklch(0.5 0.02 40), oklch(0.7 0.02 40));
16
+ --accent: light-dark(oklch(0.95 0.05 35), oklch(0.32 0.06 30));
17
+ --accent-foreground: light-dark(oklch(0.3 0.1 30), oklch(0.96 0.01 60));
18
+ --destructive: light-dark(oklch(0.55 0.22 25), oklch(0.55 0.22 25));
19
+ --destructive-foreground: light-dark(oklch(0.99 0 0), oklch(0.99 0 0));
20
+ --border: light-dark(oklch(0.92 0.01 60), oklch(0.32 0.03 30));
21
+ --input: light-dark(oklch(0.92 0.01 60), oklch(0.32 0.03 30));
22
+ --ring: light-dark(oklch(0.6 0.18 35), oklch(0.72 0.16 35));
23
23
  --radius: 0.75rem;
24
24
  --ampless-body-font: system-ui, -apple-system, sans-serif;
25
25
  }
26
-
27
- @media (prefers-color-scheme: dark) {
28
- [data-theme='landing'] {
29
- --background: oklch(0.16 0.02 30);
30
- --foreground: oklch(0.96 0.01 60);
31
- --card: oklch(0.22 0.02 30);
32
- --card-foreground: oklch(0.96 0.01 60);
33
- --primary: oklch(0.72 0.16 35);
34
- --primary-foreground: oklch(0.16 0.02 30);
35
- --secondary: oklch(0.28 0.03 30);
36
- --secondary-foreground: oklch(0.96 0.01 60);
37
- --muted: oklch(0.28 0.03 30);
38
- --muted-foreground: oklch(0.7 0.02 40);
39
- --accent: oklch(0.32 0.06 30);
40
- --accent-foreground: oklch(0.96 0.01 60);
41
- --destructive: oklch(0.55 0.22 25);
42
- --destructive-foreground: oklch(0.99 0 0);
43
- --border: oklch(0.32 0.03 30);
44
- --input: oklch(0.32 0.03 30);
45
- --ring: oklch(0.72 0.16 35);
46
- }
47
- }
@@ -0,0 +1,14 @@
1
+ > English: [README.md](./README.md)
2
+ >
3
+ # Minimal テーマ
4
+
5
+ shadcn/ui のカラートークンをベースにした、暖色系ニュートラル地にソフトブルーをアクセントとした構成。カスタマイズ項目を絞ったシンプルなブログレイアウトで、デザインを主張させたくない場合に向きます。
6
+
7
+ ## カスタマイズ
8
+
9
+ `/admin/sites/<siteId>/theme` で設定:
10
+
11
+ - **プライマリカラー**
12
+ - **角丸**
13
+
14
+ 以上です。フォントや複数のアクセントカラー、フッター / ナビゲーションの制御など、より細かい調整が必要な場合は `blog` テーマを利用してください。
@@ -1,52 +1,14 @@
1
- # {{siteName}}
1
+ > 日本語版: [README.ja.md](./README.ja.md)
2
+ >
3
+ # Minimal theme
2
4
 
3
- A blog site powered by [ampless](https://github.com/heavymoons/ampless), using the **Minimal** theme — a soft blue accent on a warm-neutral background, derived from shadcn/ui's color tokens.
5
+ Soft blue accent on a warm-neutral background, derived from shadcn/ui's color tokens. Stripped-down blog layout with very few customization knobs — pick this when you want the design to disappear.
4
6
 
5
- ## Getting Started
7
+ ## Customizing
6
8
 
7
- This project uses Amplify Gen 2 for the backend (Cognito, DynamoDB, S3) and Next.js for the frontend.
9
+ In `/admin/sites/<siteId>/theme`:
8
10
 
9
- ```bash
10
- # 1. Install dependencies
11
- npm install
11
+ - **Primary color**
12
+ - **Corner radius**
12
13
 
13
- # 2. Start a personal AWS sandbox (terminal 1)
14
- # Requires AWS credentials configured (`aws configure`).
15
- # First run takes ~5–10 min to provision resources.
16
- # Generates amplify_outputs.json when ready.
17
- npx ampx sandbox
18
-
19
- # 3. Start the Next.js dev server (terminal 2)
20
- npm run dev
21
- ```
22
-
23
- Then open [http://localhost:3000](http://localhost:3000).
24
-
25
- ## First admin user
26
-
27
- Open [http://localhost:3000/login](http://localhost:3000/login) and click **Create admin account**. The first user to register is automatically added to the `ampless-admin` Cognito group.
28
-
29
- After that, manage content from `/admin`:
30
-
31
- - `/admin` — dashboard
32
- - `/admin/posts` — list / create / edit posts (tiptap editor)
33
- - `/admin/media` — upload images to S3
34
-
35
- ## Production deploy
36
-
37
- ```bash
38
- git init && git add . && git commit -m "init"
39
- git remote add origin <your-repo>
40
- git push
41
- # Then connect the repo to AWS Amplify Hosting in the AWS console.
42
- ```
43
-
44
- ## Customize
45
-
46
- - `cms.config.ts` — site name, media delivery mode, plugins
47
- - `app/` — Next.js App Router pages (`(public)/` for the blog, `(admin)/` for the CMS)
48
- - `amplify/` — Amplify Gen 2 backend definitions (auth / data / storage)
49
-
50
- ## Plugins
51
-
52
- Enabled: {{plugins}}
14
+ That's it. For richer customization (fonts, multiple accent colors, footer / nav controls), use the `blog` theme.
@@ -2,45 +2,23 @@
2
2
  * pattern as templates/blog/tokens.css; see that file for context. */
3
3
 
4
4
  [data-theme='minimal'] {
5
- --background: oklch(0.99 0.005 90);
6
- --foreground: oklch(0.18 0.02 250);
7
- --card: oklch(1 0 0);
8
- --card-foreground: oklch(0.18 0.02 250);
9
- --primary: oklch(0.55 0.18 250);
10
- --primary-foreground: oklch(0.985 0 0);
11
- --secondary: oklch(0.95 0.01 250);
12
- --secondary-foreground: oklch(0.25 0.05 250);
13
- --muted: oklch(0.95 0.01 250);
14
- --muted-foreground: oklch(0.5 0.02 250);
15
- --accent: oklch(0.95 0.03 250);
16
- --accent-foreground: oklch(0.3 0.08 250);
17
- --destructive: oklch(0.577 0.245 27.325);
18
- --destructive-foreground: oklch(0.985 0 0);
19
- --border: oklch(0.9 0.01 250);
20
- --input: oklch(0.9 0.01 250);
21
- --ring: oklch(0.55 0.18 250);
5
+ --background: light-dark(oklch(0.99 0.005 90), oklch(0.18 0.02 250));
6
+ --foreground: light-dark(oklch(0.18 0.02 250), oklch(0.95 0.01 250));
7
+ --card: light-dark(oklch(1 0 0), oklch(0.22 0.02 250));
8
+ --card-foreground: light-dark(oklch(0.18 0.02 250), oklch(0.95 0.01 250));
9
+ --primary: light-dark(oklch(0.55 0.18 250), oklch(0.75 0.18 250));
10
+ --primary-foreground: light-dark(oklch(0.985 0 0), oklch(0.18 0.02 250));
11
+ --secondary: light-dark(oklch(0.95 0.01 250), oklch(0.28 0.03 250));
12
+ --secondary-foreground: light-dark(oklch(0.25 0.05 250), oklch(0.95 0.01 250));
13
+ --muted: light-dark(oklch(0.95 0.01 250), oklch(0.28 0.03 250));
14
+ --muted-foreground: light-dark(oklch(0.5 0.02 250), oklch(0.7 0.02 250));
15
+ --accent: light-dark(oklch(0.95 0.03 250), oklch(0.32 0.05 250));
16
+ --accent-foreground: light-dark(oklch(0.3 0.08 250), oklch(0.95 0.01 250));
17
+ --destructive: light-dark(oklch(0.577 0.245 27.325), oklch(0.5 0.2 27));
18
+ --destructive-foreground: light-dark(oklch(0.985 0 0), oklch(0.985 0 0));
19
+ --border: light-dark(oklch(0.9 0.01 250), oklch(0.32 0.03 250));
20
+ --input: light-dark(oklch(0.9 0.01 250), oklch(0.32 0.03 250));
21
+ --ring: light-dark(oklch(0.55 0.18 250), oklch(0.55 0.18 250));
22
22
  --radius: 0.375rem;
23
23
  --ampless-body-font: system-ui, -apple-system, sans-serif;
24
24
  }
25
-
26
- @media (prefers-color-scheme: dark) {
27
- [data-theme='minimal'] {
28
- --background: oklch(0.18 0.02 250);
29
- --foreground: oklch(0.95 0.01 250);
30
- --card: oklch(0.22 0.02 250);
31
- --card-foreground: oklch(0.95 0.01 250);
32
- --primary: oklch(0.75 0.18 250);
33
- --primary-foreground: oklch(0.18 0.02 250);
34
- --secondary: oklch(0.28 0.03 250);
35
- --secondary-foreground: oklch(0.95 0.01 250);
36
- --muted: oklch(0.28 0.03 250);
37
- --muted-foreground: oklch(0.7 0.02 250);
38
- --accent: oklch(0.32 0.05 250);
39
- --accent-foreground: oklch(0.95 0.01 250);
40
- --destructive: oklch(0.5 0.2 27);
41
- --destructive-foreground: oklch(0.985 0 0);
42
- --border: oklch(0.32 0.03 250);
43
- --input: oklch(0.32 0.03 250);
44
- --ring: oklch(0.55 0.18 250);
45
- }
46
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ampless",
3
- "version": "0.2.0-alpha.2",
3
+ "version": "0.2.0-alpha.21",
4
4
  "description": "Create a new ampless project",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23,6 +23,7 @@
23
23
  "bugs": "https://github.com/heavymoons/ampless/issues",
24
24
  "dependencies": {
25
25
  "@clack/prompts": "^1.4.0",
26
+ "execa": "^9.6.1",
26
27
  "picocolors": "^1.1.1"
27
28
  },
28
29
  "keywords": [