create-ampless 0.2.0-alpha.17 → 0.2.0-alpha.19
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.ja.md +77 -0
- package/README.md +3 -0
- package/dist/templates/_shared/README.ja.md +182 -0
- package/dist/templates/_shared/README.md +182 -0
- package/dist/templates/_shared/RUNBOOK.ja.md +150 -0
- package/dist/templates/_shared/RUNBOOK.md +19 -1
- package/dist/templates/_shared/package.json +8 -8
- package/dist/templates/blog/README.ja.md +22 -0
- package/dist/templates/blog/README.md +17 -44
- package/dist/templates/corporate/README.ja.md +18 -0
- package/dist/templates/corporate/README.md +12 -13
- package/dist/templates/dads/README.ja.md +31 -0
- package/dist/templates/dads/README.md +13 -16
- package/dist/templates/docs/README.ja.md +24 -0
- package/dist/templates/docs/README.md +10 -12
- package/dist/templates/landing/README.ja.md +20 -0
- package/dist/templates/landing/README.md +14 -18
- package/dist/templates/minimal/README.ja.md +14 -0
- package/dist/templates/minimal/README.md +9 -44
- package/package.json +1 -1
package/README.ja.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
> English: [README.md](./README.md)
|
|
2
|
+
>
|
|
3
|
+
|
|
4
|
+
# create-ampless
|
|
5
|
+
|
|
6
|
+
[ampless](https://github.com/heavymoons/ampless) プロジェクト向け CLI スキャフォールディングツール。
|
|
7
|
+
|
|
8
|
+
> **プレリリース / アルファ版。** v1.0 まではマイナーバージョンでも破壊的変更が入る可能性があります。`@alpha` タグを使用してください(`@latest` タグは v1.0 まで存在しません)。
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx create-ampless@alpha
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
ウィザードが以下を順に案内します:
|
|
15
|
+
|
|
16
|
+
1. プロジェクト名
|
|
17
|
+
2. サイト名(デフォルトの `<title>` および OGP `siteName` として使用)
|
|
18
|
+
3. テーマ — v0.1 では `blog`
|
|
19
|
+
4. プラグイン — `seo`、`rss`、`webhook`
|
|
20
|
+
|
|
21
|
+
出力は AWS Amplify Gen 2 バックエンド定義を含む Next.js 15(App Router)プロジェクトです。`/admin` に管理パネル、`/` にパブリックブログが設置され、選択したプラグインが `cms.config.ts` にあらかじめ設定されます。また運用メモ用の `RUNBOOK.md` も生成されます。
|
|
22
|
+
|
|
23
|
+
## 生成されたプロジェクトでの次のステップ
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cd my-project
|
|
27
|
+
npm install
|
|
28
|
+
npx ampx sandbox # AWS 開発リソースをプロビジョニングし amplify_outputs.json を生成
|
|
29
|
+
npm run dev # http://localhost:3000
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`/login` でサインアップすると、最初に登録したユーザーが自動的に `ampless-admin` Cognito グループに昇格します。
|
|
33
|
+
|
|
34
|
+
## ワンショットデプロイ:`--deploy`
|
|
35
|
+
|
|
36
|
+
ウィザードは `npx` から Amplify Hosting の URL まで一気に進めることもできます:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx create-ampless@alpha my-site --deploy
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
このフラグを追加すると、スキャフォールディング後に以下が実行されます:
|
|
43
|
+
|
|
44
|
+
1. `git init` + 初回コミット
|
|
45
|
+
2. GitHub リポジトリを作成(`gh repo create`)してプッシュ
|
|
46
|
+
3. 新しいリポジトリに紐付けた `aws amplify create-app`
|
|
47
|
+
4. `aws amplify create-branch main`
|
|
48
|
+
5. `aws amplify start-job --job-type RELEASE`
|
|
49
|
+
6. `--domain` を指定した場合はオプションで `aws amplify create-domain-association`
|
|
50
|
+
|
|
51
|
+
コマンドラインに指定が不足している場合はインタラクティブに確認します。CI 向けのフル指定の例:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx create-ampless@alpha my-site --deploy \
|
|
55
|
+
--github-owner my-org \
|
|
56
|
+
--github-private \
|
|
57
|
+
--aws-region us-east-1 \
|
|
58
|
+
--domain example.com --subdomain blog \
|
|
59
|
+
--skip-confirm
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
apex ドメインが同じ AWS アカウントの Route 53 でホストされている場合、ACM の検証が完了すると Amplify が DNS レコードを自動作成します。それ以外の場合、CLI がレジストラで追加すべき正確な CNAME を表示します。
|
|
63
|
+
|
|
64
|
+
### デプロイの要件
|
|
65
|
+
|
|
66
|
+
- [`gh`](https://cli.github.com/) のインストールと認証(`gh auth login`)
|
|
67
|
+
- [`aws`](https://aws.amazon.com/cli/) のインストールと設定(`aws configure`)
|
|
68
|
+
- `repo` スコープを持つ GitHub トークン(`--github-token` → `GITHUB_TOKEN` 環境変数 → `gh auth token` → インタラクティブプロンプトの順で解決)
|
|
69
|
+
|
|
70
|
+
## 動作要件
|
|
71
|
+
|
|
72
|
+
- Node.js >= 20
|
|
73
|
+
- AWS アカウントと `aws configure` の設定済み(サンドボックス / パイプラインデプロイは AWS に直接アクセスします)
|
|
74
|
+
|
|
75
|
+
## ライセンス
|
|
76
|
+
|
|
77
|
+
[MIT](../../LICENSE)
|
package/README.md
CHANGED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
> English: [README.md](./README.md)
|
|
2
|
+
>
|
|
3
|
+
# {{siteName}}
|
|
4
|
+
|
|
5
|
+
このサイトは [ampless](https://github.com/heavymoons/ampless) で構築されています — AWS Amplify Gen 2(Cognito + DynamoDB + S3 + AppSync + Lambda)上で動くサーバーレス CMS、フロントエンドは Next.js 15。
|
|
6
|
+
|
|
7
|
+
この README は、サイト運営者として日常的に知っておくべき内容をまとめたものです。たまにやる運用手順(API キーのローテーション、バックアップ復元など)は [RUNBOOK.ja.md](./RUNBOOK.ja.md) に置いています。テーマごとのカスタマイズ詳細は `themes/<name>/README.ja.md` を参照してください。
|
|
8
|
+
|
|
9
|
+
## 必要なもの
|
|
10
|
+
|
|
11
|
+
- **Node.js 20+** と **npm**
|
|
12
|
+
- **AWS アカウント**と CLI 認証情報(`aws configure`)— sandbox / 本番ともに実 AWS リソースをデプロイします
|
|
13
|
+
- 本番ホスティング(AWS Amplify Hosting)用の **GitHub アカウント**
|
|
14
|
+
|
|
15
|
+
## コマンド
|
|
16
|
+
|
|
17
|
+
| コマンド | 内容 |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `npm install` | 依存関係をインストール |
|
|
20
|
+
| `npm run sandbox` | 個人用 AWS サンドボックス(Cognito / DynamoDB / S3 など)をプロビジョニング、`amplify_outputs.json` を再生成し、`next dev` を `http://localhost:3000` で起動 |
|
|
21
|
+
| `npm run dev` | Next.js だけを起動(サンドボックスのプロビジョニングはスキップ — 一度 `sandbox` を実行済みなら使える) |
|
|
22
|
+
| `npm run build` | Next.js アプリの本番ビルド(Amplify Hosting のデプロイでも自動実行される) |
|
|
23
|
+
| `npm run start` | ビルド済みアプリをローカルで配信 |
|
|
24
|
+
| `npm run lint` | `next lint` で lint |
|
|
25
|
+
| `npm run update-ampless` | ampless テンプレートの最新ファイルを取り込む(設定やテーマは保持。下記「ampless の更新」参照) |
|
|
26
|
+
| `npm run copy-theme` | 公式テーマを後から追加する |
|
|
27
|
+
|
|
28
|
+
## 初回セットアップ
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install
|
|
32
|
+
npm run sandbox
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
初回 sandbox は 5〜10 分かかります(AWS リソースのプロビジョニング)。`next dev` 起動前に毎回 `amplify_outputs.json` が再生成されます。
|
|
36
|
+
|
|
37
|
+
[http://localhost:3000/login](http://localhost:3000/login) を開き、**Create admin account** をクリック。最初に登録したユーザーが自動的に `ampless-admin` Cognito グループに追加されます。
|
|
38
|
+
|
|
39
|
+
## 管理画面
|
|
40
|
+
|
|
41
|
+
サインイン後、管理画面は `/admin`:
|
|
42
|
+
|
|
43
|
+
| パス | 役割 |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| `/admin` | ダッシュボード |
|
|
46
|
+
| `/admin/posts` | 投稿の一覧 / 作成 / 編集(Tiptap、Markdown、生 HTML、または zip アップロードの静的バンドル) |
|
|
47
|
+
| `/admin/media` | 画像 / 動画 / ファイルを S3 にアップロード |
|
|
48
|
+
| `/admin/sites/<siteId>` | サイトレベル設定(名前、URL) |
|
|
49
|
+
| `/admin/sites/<siteId>/theme` | テーマの切り替え + フィールド調整(カラー、フォント、ナビ、ロゴなど) |
|
|
50
|
+
| `/admin/users` | ユーザー一覧と Cognito グループ所属の確認 |
|
|
51
|
+
| `/admin/mcp-tokens` | HTTP MCP エンドポイント用の Bearer トークンを発行 |
|
|
52
|
+
|
|
53
|
+
ユーザーロール(Cognito グループ):
|
|
54
|
+
|
|
55
|
+
- `ampless-admin` — フルアクセス(コンテンツ + 運用 + 破壊的操作)
|
|
56
|
+
- `ampless-editor` — コンテンツの CRUD(破壊的操作はなし)
|
|
57
|
+
- `ampless-reader` — 将来の REST/MCP API クライアント用に予約
|
|
58
|
+
|
|
59
|
+
ロールの付与 / 取り消しは AWS Cognito コンソールで行います — [RUNBOOK.ja.md → ユーザーの昇格 / 降格](./RUNBOOK.ja.md#promote--demote-a-user) を参照。
|
|
60
|
+
|
|
61
|
+
## コンテンツの執筆
|
|
62
|
+
|
|
63
|
+
投稿(Post)が唯一のコンテンツタイプです。各投稿には以下があります:
|
|
64
|
+
|
|
65
|
+
- **Format** — `tiptap`(リッチテキスト)/ `markdown` / `html`(生 HTML、サニタイズなし)/ `static`(HTML/CSS/JS の zip アップロード)
|
|
66
|
+
- **No layout** フラグ(`format: 'html'` のときのみ)— 本文をそのまま出力し、Next.js のレイアウトもテーマのクロームも適用しない。URL は `/<slug>` のままで、ルートが `/raw/<slug>` にリダイレクトする
|
|
67
|
+
- **Slug** — 公開 URL
|
|
68
|
+
- **Status** — `draft`(管理者のみ)または `published`
|
|
69
|
+
|
|
70
|
+
詳細リファレンス: [docs/CONTENT.ja.md(GitHub)](https://github.com/heavymoons/ampless/blob/main/docs/CONTENT.ja.md) ([English](https://github.com/heavymoons/ampless/blob/main/docs/CONTENT.md))
|
|
71
|
+
|
|
72
|
+
## テーマ
|
|
73
|
+
|
|
74
|
+
インストール済みのテーマはすべて `themes/<name>/` にバンドルされています。**アクティブな**テーマはサイトごとのランタイム設定 — テーマの切り替えに**再デプロイは不要**です。
|
|
75
|
+
|
|
76
|
+
アクティブテーマの切り替え: `/admin/sites/<siteId>/theme` → インストール済みリストから選択 → 保存。
|
|
77
|
+
|
|
78
|
+
アクティブテーマのカスタマイズ(カラー、フォント、ヘッダー / フッターナビなど): 同じ画面 — 各テーマが固有のカスタマイズフィールドを公開しています。各テーマで何が変えられるかは `themes/<name>/README.ja.md` を参照。
|
|
79
|
+
|
|
80
|
+
このプロジェクトに別の公式テーマを追加する:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm run copy-theme
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
独自テーマを作る場合: 既存テーマをコピーから始める(`cp -R themes/blog themes/your-theme`)→ `manifest.ts`、`tokens.css`、`pages/*.tsx` を編集 → `themes-registry.ts` に追加。フルガイド: [docs/THEMES.ja.md](https://github.com/heavymoons/ampless/blob/main/docs/THEMES.ja.md) ([English](https://github.com/heavymoons/ampless/blob/main/docs/THEMES.md))
|
|
87
|
+
|
|
88
|
+
## プラグイン
|
|
89
|
+
|
|
90
|
+
プラグインは CMS にイベント駆動の副作用(SEO メタデータ、RSS フィード、外部 URL への webhook、OG 画像生成など)を追加する仕組みです。[`cms.config.ts`](./cms.config.ts) で宣言し、投稿の publish / update / delete 時に Lambda 上で実行されます。
|
|
91
|
+
|
|
92
|
+
`cms.config.ts` に書けば有効になる、同梱の公式プラグイン:
|
|
93
|
+
|
|
94
|
+
| パッケージ | 役割 |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| `@ampless/plugin-seo` | 投稿ごとの OGP / Twitter / canonical メタデータ + `sitemap.xml` |
|
|
97
|
+
| `@ampless/plugin-rss` | `/feed.xml` の RSS 2.0 フィード |
|
|
98
|
+
| `@ampless/plugin-webhook` | 外部 URL へのイベント POST(HMAC 署名付き) |
|
|
99
|
+
| `@ampless/plugin-og-image` | `/og/<slug>` での動的 OG 画像生成 |
|
|
100
|
+
|
|
101
|
+
プラグインを追加するには: install(`npm i @ampless/plugin-...`)→ `cms.config.ts` で import → `plugins` 配列に追加:
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
import seoPlugin from '@ampless/plugin-seo'
|
|
105
|
+
import rssPlugin from '@ampless/plugin-rss'
|
|
106
|
+
|
|
107
|
+
export default defineConfig({
|
|
108
|
+
// ...
|
|
109
|
+
plugins: [
|
|
110
|
+
seoPlugin({ twitterSite: '@example' }),
|
|
111
|
+
rssPlugin({ language: 'ja', limit: 20 }),
|
|
112
|
+
],
|
|
113
|
+
})
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
プラグイン変更には再デプロイが必要です(プラグインコードは Lambda バンドルに含まれます)。
|
|
117
|
+
|
|
118
|
+
## 本番デプロイ
|
|
119
|
+
|
|
120
|
+
同梱の [`amplify.yml`](./amplify.yml) が、connect したブランチへの push のたびに `npx ampx pipeline-deploy`(Amplify バックエンド) + `npm run build`(Next.js)を実行します。
|
|
121
|
+
|
|
122
|
+
1. **GitHub(または Amplify Hosting が対応する git ホスト)にこのプロジェクトを push**:
|
|
123
|
+
```bash
|
|
124
|
+
git init && git add . && git commit -m "init"
|
|
125
|
+
git remote add origin <your-repo>
|
|
126
|
+
git push -u origin main
|
|
127
|
+
```
|
|
128
|
+
2. **AWS Amplify Hosting コンソール** → **Create new app** → **Host web app** → リポジトリを連携 → ブランチを選択 → 自動検出されたビルド設定(`amplify.yml` の内容になっているはず)を確認 → デプロイ
|
|
129
|
+
3. 初回デプロイは 10〜20 分。以降は連携ブランチへの push で自動再デプロイ
|
|
130
|
+
|
|
131
|
+
### 環境変数
|
|
132
|
+
|
|
133
|
+
環境ごとの値は **Amplify Hosting コンソール → Hosting → Environment variables** で設定。よく使うもの:
|
|
134
|
+
|
|
135
|
+
| 変数 | 利用箇所 |
|
|
136
|
+
| --- | --- |
|
|
137
|
+
| `WEBHOOK_SECRET` | `@ampless/plugin-webhook` の HMAC 署名 |
|
|
138
|
+
| `AMPLESS_MCP_SERVICE_EMAIL` | HTTP MCP サービスユーザーのメール — `/api/mcp` を有効化するのに必須 |
|
|
139
|
+
| `AMPLESS_MCP_SERVICE_PASSWORD` | HTTP MCP サービスユーザーのパスワード |
|
|
140
|
+
|
|
141
|
+
env 変数追加 / 変更後は再デプロイをトリガーしてください。
|
|
142
|
+
|
|
143
|
+
### カスタムドメイン
|
|
144
|
+
|
|
145
|
+
Amplify Hosting アプリの **Domain management** からドメインをバインドします — ACM 証明書と DNS レコードは Amplify が自動でプロビジョニングします。詳細手順: [RUNBOOK.ja.md → カスタムドメインを Amplify Hosting に追加](./RUNBOOK.ja.md#adding-a-custom-domain-to-amplify-hosting)
|
|
146
|
+
|
|
147
|
+
### マルチサイト(複数ドメインを 1 デプロイで)
|
|
148
|
+
|
|
149
|
+
ampless は 1 つの Amplify Hosting デプロイで複数のサイトを配信できます。各サイトは独自の `siteId`、ホスト名、サイト名、アクティブテーマを持ちます。有効化するには、`cms.config.ts` の `sites:` ブロック(コメントアウト例あり)を埋めてデプロイ。
|
|
150
|
+
|
|
151
|
+
マルチサイトモードにはキャッシュ周りのトレードオフがあります。詳細: [RUNBOOK.ja.md → マルチサイト / カスタムドメイン](./RUNBOOK.ja.md#multi-site--custom-domains)
|
|
152
|
+
|
|
153
|
+
## AI 連携(MCP)
|
|
154
|
+
|
|
155
|
+
ampless は MCP(Model Context Protocol)サーバーを同梱しているので、Claude Desktop / Cursor / Claude Code など MCP に対応した AI クライアントから投稿の読み書きができます。
|
|
156
|
+
|
|
157
|
+
- **ローカル / sandbox** — グローバルに 1 度入れる: `npx -y @ampless/mcp-server@alpha` に `amplify_outputs.json` のパスを渡す
|
|
158
|
+
- **本番(HTTP)** — `/admin/mcp-tokens` で Bearer トークンを発行し、MCP クライアントを `https://<your-domain>/api/mcp` に向ける。フルセットアップ: [docs/mcp-http-setup.ja.md](https://github.com/heavymoons/ampless/blob/main/docs/mcp-http-setup.ja.md) ([English](https://github.com/heavymoons/ampless/blob/main/docs/mcp-http-setup.md))
|
|
159
|
+
|
|
160
|
+
## ampless の更新
|
|
161
|
+
|
|
162
|
+
ampless は `alpha` dist-tag でリリースしています。新機能を取り込むには:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
npm run update-ampless
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
これは `npx create-ampless@latest upgrade` を実行し、以下を行います:
|
|
169
|
+
|
|
170
|
+
- `package.json` の `@ampless/*` / `ampless` 依存をバージョンアップ
|
|
171
|
+
- 共有テンプレートファイル(admin アプリの土台、amplify バックエンド、lib/、middleware、テーマ)を再同期 — `cms.config.ts`、`theme.*` 管理画面設定、投稿、テーマ manifest 値などのユーザーカスタマイズは保持されます
|
|
172
|
+
- `update-ampless` / `copy-theme` スクリプトのコマンドが変わっていれば更新
|
|
173
|
+
|
|
174
|
+
commit 前に diff を確認できます。
|
|
175
|
+
|
|
176
|
+
## 運用
|
|
177
|
+
|
|
178
|
+
日常以外の運用レシピ — ユーザー昇格、パスワードリセット、バックアップ復元、カスタムドメイン配線、AppSync API キーローテーション、マルチサイト構築 — は [RUNBOOK.ja.md](./RUNBOOK.ja.md) にあります。
|
|
179
|
+
|
|
180
|
+
## ライセンス
|
|
181
|
+
|
|
182
|
+
このプロジェクト自身のコードはあなたのものです。ampless 本体は MIT ライセンスです。詳細は [ampless リポジトリ](https://github.com/heavymoons/ampless) を参照。
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
> 日本語版: [README.ja.md](./README.ja.md)
|
|
2
|
+
>
|
|
3
|
+
# {{siteName}}
|
|
4
|
+
|
|
5
|
+
Your site is built with [ampless](https://github.com/heavymoons/ampless) — a serverless CMS that runs on AWS Amplify Gen 2 (Cognito + DynamoDB + S3 + AppSync + Lambda) with a Next.js 15 frontend.
|
|
6
|
+
|
|
7
|
+
This README covers what you, the site owner, need to know day-to-day. Operational recipes (rotating keys, restoring backups, etc.) live in [RUNBOOK.md](./RUNBOOK.md). Per-theme customization details live in `themes/<name>/README.md`.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
|
|
11
|
+
- **Node.js 20+** and **npm**
|
|
12
|
+
- **AWS account** with CLI credentials (`aws configure`) — the sandbox + production both deploy real AWS resources
|
|
13
|
+
- **GitHub account** for production hosting via AWS Amplify Hosting
|
|
14
|
+
|
|
15
|
+
## Commands
|
|
16
|
+
|
|
17
|
+
| Command | What it does |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `npm install` | Install dependencies |
|
|
20
|
+
| `npm run sandbox` | Provision a personal AWS sandbox (Cognito / DynamoDB / S3 / etc.), regenerate `amplify_outputs.json`, then start `next dev` on `http://localhost:3000` |
|
|
21
|
+
| `npm run dev` | Start Next.js only (skip sandbox provisioning — use after `sandbox` has already run once) |
|
|
22
|
+
| `npm run build` | Production build of the Next.js app (also runs as part of Amplify Hosting deploy) |
|
|
23
|
+
| `npm run start` | Serve the production build locally |
|
|
24
|
+
| `npm run lint` | Lint with `next lint` |
|
|
25
|
+
| `npm run update-ampless` | Pull the latest ampless template files into this project, preserving your config and themes (see "Updating ampless" below) |
|
|
26
|
+
| `npm run copy-theme` | Add another official theme to this project after-the-fact |
|
|
27
|
+
|
|
28
|
+
## First time setup
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install
|
|
32
|
+
npm run sandbox
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
First sandbox run takes 5–10 minutes (AWS resource provisioning). `amplify_outputs.json` is regenerated each time before `next dev` starts.
|
|
36
|
+
|
|
37
|
+
Open [http://localhost:3000/login](http://localhost:3000/login) and click **Create admin account**. The first registered user is automatically added to the `ampless-admin` Cognito group.
|
|
38
|
+
|
|
39
|
+
## Admin UI
|
|
40
|
+
|
|
41
|
+
After signing in, the admin lives at `/admin`:
|
|
42
|
+
|
|
43
|
+
| Path | Purpose |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| `/admin` | Dashboard |
|
|
46
|
+
| `/admin/posts` | List / create / edit posts (Tiptap editor, Markdown, raw HTML, or zip-uploaded static bundles) |
|
|
47
|
+
| `/admin/media` | Upload images / videos / files to S3 |
|
|
48
|
+
| `/admin/sites/<siteId>` | Site-level settings (name, URL) |
|
|
49
|
+
| `/admin/sites/<siteId>/theme` | Activate a theme + customize its fields (colors, fonts, nav, logo, etc.) |
|
|
50
|
+
| `/admin/users` | View users + Cognito group memberships |
|
|
51
|
+
| `/admin/mcp-tokens` | Issue Bearer tokens for the HTTP MCP endpoint |
|
|
52
|
+
|
|
53
|
+
User roles (Cognito groups):
|
|
54
|
+
|
|
55
|
+
- `ampless-admin` — full access (content + ops + destructive)
|
|
56
|
+
- `ampless-editor` — content CRUD (no destructive ops)
|
|
57
|
+
- `ampless-reader` — reserved for future REST/MCP API consumers
|
|
58
|
+
|
|
59
|
+
Promotion/demotion is done in the AWS Cognito console — see [RUNBOOK.md → Promote / demote a user](./RUNBOOK.md#promote--demote-a-user).
|
|
60
|
+
|
|
61
|
+
## Authoring content
|
|
62
|
+
|
|
63
|
+
Posts are the single content type. Each post has:
|
|
64
|
+
|
|
65
|
+
- **Format** — `tiptap` (rich text) / `markdown` / `html` (raw, no sanitization) / `static` (zip-upload of HTML/CSS/JS)
|
|
66
|
+
- **No layout** flag (`format: 'html'` only) — render the body verbatim with no Next.js layout and no theme chrome. URL stays `/<slug>`; the route redirects to `/raw/<slug>`.
|
|
67
|
+
- **Slug** — the public URL
|
|
68
|
+
- **Status** — `draft` (admin only) or `published`
|
|
69
|
+
|
|
70
|
+
Full reference: [docs/CONTENT.md on GitHub](https://github.com/heavymoons/ampless/blob/main/docs/CONTENT.md) ([日本語](https://github.com/heavymoons/ampless/blob/main/docs/CONTENT.ja.md)).
|
|
71
|
+
|
|
72
|
+
## Themes
|
|
73
|
+
|
|
74
|
+
Every installed theme is bundled in this project under `themes/<name>/`. The **active** theme per site is a runtime setting — switching themes does **not** require a redeploy.
|
|
75
|
+
|
|
76
|
+
To switch the active theme: `/admin/sites/<siteId>/theme` → pick from the installed list → save.
|
|
77
|
+
|
|
78
|
+
To customize the active theme (colors, fonts, header / footer nav, etc.): same page — each theme exposes its own customization fields. See `themes/<name>/README.md` for what's customizable per theme.
|
|
79
|
+
|
|
80
|
+
To install another official theme into this project:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm run copy-theme
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
To author your own theme: copy an existing one as a starting point (`cp -R themes/blog themes/your-theme`), edit `manifest.ts`, `tokens.css`, and `pages/*.tsx`, then add it to `themes-registry.ts`. Full guide: [docs/THEMES.md](https://github.com/heavymoons/ampless/blob/main/docs/THEMES.md) ([日本語](https://github.com/heavymoons/ampless/blob/main/docs/THEMES.ja.md)).
|
|
87
|
+
|
|
88
|
+
## Plugins
|
|
89
|
+
|
|
90
|
+
Plugins extend the CMS with event-driven side effects (SEO metadata, RSS feed, webhooks to external URLs, OG image generation, etc.). They're declared in [`cms.config.ts`](./cms.config.ts) and run on Lambda when posts are published / updated / deleted.
|
|
91
|
+
|
|
92
|
+
Bundled and ready to enable in `cms.config.ts`:
|
|
93
|
+
|
|
94
|
+
| Package | Purpose |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| `@ampless/plugin-seo` | Per-post OGP / Twitter / canonical metadata + `sitemap.xml` |
|
|
97
|
+
| `@ampless/plugin-rss` | RSS 2.0 feed at `/feed.xml` |
|
|
98
|
+
| `@ampless/plugin-webhook` | POST events to external URLs (HMAC-signed) |
|
|
99
|
+
| `@ampless/plugin-og-image` | Dynamic Open Graph image generation at `/og/<slug>` |
|
|
100
|
+
|
|
101
|
+
To add a plugin: install (`npm i @ampless/plugin-...`), import in `cms.config.ts`, and add to the `plugins` array:
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
import seoPlugin from '@ampless/plugin-seo'
|
|
105
|
+
import rssPlugin from '@ampless/plugin-rss'
|
|
106
|
+
|
|
107
|
+
export default defineConfig({
|
|
108
|
+
// ...
|
|
109
|
+
plugins: [
|
|
110
|
+
seoPlugin({ twitterSite: '@example' }),
|
|
111
|
+
rssPlugin({ language: 'en', limit: 20 }),
|
|
112
|
+
],
|
|
113
|
+
})
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
A redeploy is required for plugin changes (the plugin code ships in the Lambda bundle).
|
|
117
|
+
|
|
118
|
+
## Deploying to production
|
|
119
|
+
|
|
120
|
+
The shipped [`amplify.yml`](./amplify.yml) runs `npx ampx pipeline-deploy` (Amplify backend) + `npm run build` (Next.js) on every push to the branch you connect.
|
|
121
|
+
|
|
122
|
+
1. **Push this project to GitHub** (or another git host Amplify Hosting supports):
|
|
123
|
+
```bash
|
|
124
|
+
git init && git add . && git commit -m "init"
|
|
125
|
+
git remote add origin <your-repo>
|
|
126
|
+
git push -u origin main
|
|
127
|
+
```
|
|
128
|
+
2. **AWS Amplify Hosting console** → **Create new app** → **Host web app** → connect the repo → pick the branch → review the auto-detected build settings (they should match `amplify.yml`) → deploy.
|
|
129
|
+
3. First deploy takes 10–20 minutes. Subsequent pushes to the connected branch redeploy automatically.
|
|
130
|
+
|
|
131
|
+
### Environment variables
|
|
132
|
+
|
|
133
|
+
Set per-environment values in **Amplify Hosting console → Hosting → Environment variables**. Common ones:
|
|
134
|
+
|
|
135
|
+
| Variable | Used by |
|
|
136
|
+
| --- | --- |
|
|
137
|
+
| `WEBHOOK_SECRET` | `@ampless/plugin-webhook` HMAC signing |
|
|
138
|
+
| `AMPLESS_MCP_SERVICE_EMAIL` | HTTP MCP service-user email — required to enable `/api/mcp` |
|
|
139
|
+
| `AMPLESS_MCP_SERVICE_PASSWORD` | HTTP MCP service-user password |
|
|
140
|
+
|
|
141
|
+
Trigger a redeploy after adding/changing env vars.
|
|
142
|
+
|
|
143
|
+
### Custom domains
|
|
144
|
+
|
|
145
|
+
Bind a domain to your Amplify Hosting app in **Domain management** — Amplify provisions an ACM certificate and DNS records automatically. Full step-by-step: [RUNBOOK.md → Adding a custom domain](./RUNBOOK.md#adding-a-custom-domain-to-amplify-hosting).
|
|
146
|
+
|
|
147
|
+
### Multi-site (multiple domains, one deploy)
|
|
148
|
+
|
|
149
|
+
ampless can serve multiple sites from a single Amplify Hosting deployment. Each site has its own `siteId`, hostname(s), name, and active theme. To enable, fill in the `sites:` block in `cms.config.ts` (it's there as a commented example) and deploy.
|
|
150
|
+
|
|
151
|
+
There's a caching trade-off in multi-site mode; details in [RUNBOOK.md → Multi-site / custom domains](./RUNBOOK.md#multi-site--custom-domains).
|
|
152
|
+
|
|
153
|
+
## AI integration (MCP)
|
|
154
|
+
|
|
155
|
+
ampless ships an MCP (Model Context Protocol) server so Claude Desktop / Cursor / Claude Code / anything that speaks MCP can read and write your posts.
|
|
156
|
+
|
|
157
|
+
- **Local / sandbox** — install once globally: `npx -y @ampless/mcp-server@alpha` with the path to your `amplify_outputs.json`.
|
|
158
|
+
- **Production (HTTP)** — issue a Bearer token at `/admin/mcp-tokens` and point your MCP client at `https://<your-domain>/api/mcp`. Full setup: [docs/mcp-http-setup.md](https://github.com/heavymoons/ampless/blob/main/docs/mcp-http-setup.md) ([日本語](https://github.com/heavymoons/ampless/blob/main/docs/mcp-http-setup.ja.md)).
|
|
159
|
+
|
|
160
|
+
## Updating ampless
|
|
161
|
+
|
|
162
|
+
ampless releases on the `alpha` dist-tag. To pick up new features:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
npm run update-ampless
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
This runs `npx create-ampless@latest upgrade`, which:
|
|
169
|
+
|
|
170
|
+
- Bumps the `@ampless/*` and `ampless` dependencies in `package.json`
|
|
171
|
+
- Re-syncs the shared template files (admin app shell, amplify backend, lib/, middleware, themes) — your customizations to `cms.config.ts`, `theme.*` admin settings, posts, and theme manifest values are preserved.
|
|
172
|
+
- Updates `update-ampless` and `copy-theme` script entries if their commands change
|
|
173
|
+
|
|
174
|
+
You can review the diff before committing.
|
|
175
|
+
|
|
176
|
+
## Operations
|
|
177
|
+
|
|
178
|
+
Day-to-day operational recipes — user promotion, password reset, backup restore, custom domain wiring, AppSync API key rotation, multi-site setup — live in [RUNBOOK.md](./RUNBOOK.md).
|
|
179
|
+
|
|
180
|
+
## License
|
|
181
|
+
|
|
182
|
+
This project's own code is yours. ampless itself is MIT-licensed; see the [ampless repository](https://github.com/heavymoons/ampless) for details.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
> English: [RUNBOOK.md](./RUNBOOK.md)
|
|
2
|
+
>
|
|
3
|
+
|
|
4
|
+
# ランブック
|
|
5
|
+
|
|
6
|
+
ampless で構築したサイトで、ときどき必要になる運用作業の手順集です。毎日やるわけではないけれど、いざ必要になったときに迷わずに進めるためのものです。
|
|
7
|
+
|
|
8
|
+
日常的な使い方(コマンド、管理画面、テーマ、プラグイン、デプロイなど)は [README.ja.md](./README.ja.md) を参照してください。
|
|
9
|
+
|
|
10
|
+
## 目次
|
|
11
|
+
|
|
12
|
+
- [AppSync API キー(自動更新)](#appsync-api-キー自動更新)
|
|
13
|
+
- [よくある運用](#よくある運用)
|
|
14
|
+
- [ユーザーの昇格 / 降格](#promote--demote-a-user)
|
|
15
|
+
- [パスワードリセット(管理者上書き)](#reset-a-users-password-admin-override)
|
|
16
|
+
- [Post テーブルのバックアップから復元](#restore-from-a-post-table-backup)
|
|
17
|
+
- [失敗したプラグインイベントを確認する](#inspect-failed-plugin-events)
|
|
18
|
+
- [マルチサイト / カスタムドメイン](#multi-site--custom-domains)
|
|
19
|
+
- [シングルドメイン運用](#single-domain-operation)
|
|
20
|
+
- [マルチサイト時の注意:SSR キャッシュは強制無効化](#multi-site-mode-caveat-ssr-caching-is-force-disabled)
|
|
21
|
+
- [カスタムドメインを Amplify Hosting に追加する](#adding-a-custom-domain-to-amplify-hosting)
|
|
22
|
+
|
|
23
|
+
## AppSync API キー(自動更新)
|
|
24
|
+
|
|
25
|
+
パブリックブログの読み取り(`listPublishedPosts`、`getPublishedPost`、`listPostsByTag`)は AppSync API キーで保護されています。このキーは `amplify_outputs.json` に含まれているため、**公開サイトを訪問した誰もが確認できる**状態にあります。低信頼度のクレデンシャルとして扱ってください。このキーが持つ権限は上記 3 つのカスタムクエリを呼び出すことのみであり、それらのクエリは `status === 'published'` の行しか返しません。
|
|
26
|
+
|
|
27
|
+
### なぜ API キーなのか(Identity Pool ゲストロールではなく)?
|
|
28
|
+
|
|
29
|
+
Amplify Gen 2 の `a.handler.custom` リゾルバーは `allow.guest()` や `allow.authenticated('identityPool')` をサポートしておらず、apiKey / userPool / lambda / group / owner のみが使用可能です。v0.1 では簡潔さを優先して API キーを選択しました。パブリック読み取りを Lambda 関数データソース(`a.handler.function`)に移行することは v0.2 の候補です。
|
|
30
|
+
|
|
31
|
+
### 自動更新 — ローテーション手順は不要
|
|
32
|
+
|
|
33
|
+
`api-key-renewer` Lambda(`amplify/functions/api-key-renewer/` を参照)は、毎月 1 日の UTC 03:00 に EventBridge スケジュールで起動します。`AppSync.UpdateApiKey` を呼び出して既存キーの `expires` を「現時点 + 364 日」に延長するため、以下が保証されます:
|
|
34
|
+
|
|
35
|
+
- キー ID は変化しない
|
|
36
|
+
- `amplify_outputs.json` は引き続き有効
|
|
37
|
+
- Next.js アプリの再ビルドは不要
|
|
38
|
+
- 常に約 334 日以上の残有効期限が維持される
|
|
39
|
+
|
|
40
|
+
手動で確認または実行したい場合:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# 現在の有効期限を確認
|
|
44
|
+
aws appsync list-api-keys \
|
|
45
|
+
--region <amplify_outputs.json の data.aws_region> \
|
|
46
|
+
--api-id <amplify_outputs.json の data.url から導出した api-id>
|
|
47
|
+
|
|
48
|
+
# 手動実行(サンドボックスを長期間停止した後など)
|
|
49
|
+
aws lambda invoke \
|
|
50
|
+
--function-name $(aws lambda list-functions \
|
|
51
|
+
--query "Functions[?contains(FunctionName,'api-key-renewer')].FunctionName | [0]" \
|
|
52
|
+
--output text) \
|
|
53
|
+
/tmp/out.json && cat /tmp/out.json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### キーの漏洩が疑われる場合
|
|
57
|
+
|
|
58
|
+
有効期限の延長ではなく、キーの値そのものをローテーションする即時対応を行います:
|
|
59
|
+
|
|
60
|
+
1. `amplify/data/resource.ts` のコメントを編集して CFN 更新を強制する
|
|
61
|
+
2. `npx ampx sandbox`(サンドボックス)または `npx ampx pipeline-deploy ...`(本番)を実行 — Amplify がキーの値を再生成する
|
|
62
|
+
3. Next.js アプリを再デプロイして SSR が新しい `data.api_key` を参照するようにする
|
|
63
|
+
|
|
64
|
+
## 一般的な操作
|
|
65
|
+
|
|
66
|
+
### ユーザーのグループ昇格 / 降格
|
|
67
|
+
|
|
68
|
+
AWS Cognito コンソールから操作します:
|
|
69
|
+
|
|
70
|
+
1. User Pool → Users → 対象ユーザーを選択
|
|
71
|
+
2. Group memberships → グループに追加 / グループから削除
|
|
72
|
+
3. ユーザーに一度サインアウトしてサインインし直してもらい、新しいクレームを適用させる
|
|
73
|
+
|
|
74
|
+
グループの種類: `ampless-admin`(フル CRUD + 運用操作)、`ampless-editor`(コンテンツ CRUD)、`ampless-reader`(将来の REST/MCP API 利用者向けに予約済み)。
|
|
75
|
+
|
|
76
|
+
### ユーザーパスワードのリセット(管理者による上書き)
|
|
77
|
+
|
|
78
|
+
ロックアウトされており、メールによる復旧が利用できない場合:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
aws cognito-idp admin-set-user-password \
|
|
82
|
+
--user-pool-id <amplify_outputs.json の auth.user_pool_id> \
|
|
83
|
+
--region <リージョン> \
|
|
84
|
+
--username <メールアドレス> \
|
|
85
|
+
--password '<新しいパスワード>' --permanent
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`/login` ページにはセルフサービスの「パスワードを忘れた場合」フローもあります。
|
|
89
|
+
|
|
90
|
+
### Post テーブルのバックアップからの復元
|
|
91
|
+
|
|
92
|
+
DynamoDB のポイントインタイムリカバリ(PITR)は v0.1 の `defineData` では有効になっていません。AWS コンソール → DynamoDB → Tables → `<投稿テーブル名>` → Backups → Edit PITR から手動で有効化してください。有効化後は `aws dynamodb restore-table-to-point-in-time` で新しいテーブルに復元し、その後アイテムをライブテーブルに移行する作業が必要です。
|
|
93
|
+
|
|
94
|
+
### 失敗したプラグインイベントの確認
|
|
95
|
+
|
|
96
|
+
処理に失敗したプロセッサー呼び出しは、`amplify/backend.ts` で作成された共有イベント DLQ(`EventsDlq`)に送られます。SQS コンソールまたは `aws sqs receive-message --queue-url <dlq-url> --max-number-of-messages 10` でメッセージを確認してください。v0.1 には自動アラームがないため、定期的な手動確認を推奨します。あるいは `ApproximateNumberOfMessagesVisible` に CloudWatch アラームを設定してください。
|
|
97
|
+
|
|
98
|
+
## マルチサイト / カスタムドメイン
|
|
99
|
+
|
|
100
|
+
ampless は 1 つの Amplify Hosting デプロイメントから複数のサイトを配信できます。各サイトは `siteId` で識別され、`cms.config.ts` 内で 1 つ以上のホスト名に紐づけられます:
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
sites: {
|
|
104
|
+
blog: {
|
|
105
|
+
domains: ['blog.example.com', 'www.example.com'],
|
|
106
|
+
name: 'My Blog',
|
|
107
|
+
url: 'https://blog.example.com',
|
|
108
|
+
},
|
|
109
|
+
docs: {
|
|
110
|
+
domains: ['docs.example.com'],
|
|
111
|
+
name: 'Docs',
|
|
112
|
+
url: 'https://docs.example.com',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
ミドルウェア(`middleware.ts`)が受信リクエストの `Host` を `siteId` にマッピングし、パスを `/_sites/{siteId}/...` に内部リライトします。サブドメインと完全に分離されたドメインはアプリケーション層では等価です — AWS 側の設定のみが異なります。
|
|
118
|
+
|
|
119
|
+
### シングルドメイン運用
|
|
120
|
+
|
|
121
|
+
`sites` が未定義または 1 エントリのみの場合、ampless はシングルサイトモード(`siteId='default'`)で動作します。SSR レスポンスはルートごとのキャッシュディレクティブに従います(ルートごとに `Cache-Control: public, s-maxage=...` を指定することで CloudFront キャッシュを利用できます)。
|
|
122
|
+
|
|
123
|
+
### マルチサイトモードの注意事項:SSR キャッシュの強制無効化
|
|
124
|
+
|
|
125
|
+
2 つ以上のサイトが設定されている場合、ミドルウェアはすべてのパブリックレスポンスに `Cache-Control: private, no-store` を付加します。これは Amplify Hosting の CloudFront がキャッシュキーに `Host` を含まないため、キャッシュを有効にすると `https://site1/foo` と `https://site2/foo` がエッジでコンテンツを混在させてしまうためです。このトレードオフとして、すべてのパブリック読み取りが Lambda にヒットします。この制約を解消するには、Amplify Hosting から独自管理の CloudFront + Open Next スタックへの移行が必要です(ロードマップ:v1.0 以降)。
|
|
126
|
+
|
|
127
|
+
### Amplify Hosting へのカスタムドメイン追加
|
|
128
|
+
|
|
129
|
+
バインドしたいドメインごとに以下を実施します:
|
|
130
|
+
|
|
131
|
+
1. **Amplify Hosting コンソール** → アプリ → **Domain management** → **Add domain** を選択。
|
|
132
|
+
2. 頂点ドメイン(`example.com`)と接続したいサブドメインを入力します。Amplify が ACM 証明書と CloudFront SAN エントリを自動でプロビジョニングします。
|
|
133
|
+
3. DNS を更新:
|
|
134
|
+
- **Route 53 / Amplify 管理の DNS プロバイダー**:Amplify が CNAME を作成してくれるので、確認するだけです。
|
|
135
|
+
- **外部 DNS**(Cloudflare、Squarespace など):Amplify が表示する CNAME / DNS 検証レコードをコピーします。ACM のメール検証もフォールバックとして使用できます。
|
|
136
|
+
4. **Domain activation** が完了するまで待ちます(通常 15〜60 分。証明書の検証が最も時間がかかります)。
|
|
137
|
+
5. 新しいドメインを `cms.config.ts` の対応する `sites.{id}.domains[]` に追加して再デプロイします:
|
|
138
|
+
```bash
|
|
139
|
+
git add cms.config.ts && git commit -m "feat: add docs.example.com"
|
|
140
|
+
git push # Amplify Hosting が自動検出します
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
エンドツーエンドで確認:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
curl -I https://docs.example.com/ # 200 とドキュメントサイトの HTML
|
|
147
|
+
curl -sI https://docs.example.com/ | grep -i cache # Cache-Control: private, no-store
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
リクエストが `404 Site not found` を返す場合、そのホストはいずれの `sites.*.domains[]` にも登録されていません — 設定を修正して再デプロイしてください。
|
|
@@ -1,6 +1,24 @@
|
|
|
1
|
+
> 日本語版: [RUNBOOK.ja.md](./RUNBOOK.ja.md)
|
|
2
|
+
>
|
|
3
|
+
|
|
1
4
|
# Runbook
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
Step-by-step recipes for occasional operations on an ampless-powered site — the things you don't do every day but want a reliable procedure for when you do.
|
|
7
|
+
|
|
8
|
+
For day-to-day usage (commands, admin UI tour, themes, plugins, deploying), start with [README.md](./README.md).
|
|
9
|
+
|
|
10
|
+
## Contents
|
|
11
|
+
|
|
12
|
+
- [AppSync API key (auto-renewed)](#appsync-api-key-auto-renewed)
|
|
13
|
+
- [Common operations](#common-operations)
|
|
14
|
+
- [Promote / demote a user](#promote--demote-a-user)
|
|
15
|
+
- [Reset a user's password (admin override)](#reset-a-users-password-admin-override)
|
|
16
|
+
- [Restore from a Post-table backup](#restore-from-a-post-table-backup)
|
|
17
|
+
- [Inspect failed plugin events](#inspect-failed-plugin-events)
|
|
18
|
+
- [Multi-site / custom domains](#multi-site--custom-domains)
|
|
19
|
+
- [Single domain operation](#single-domain-operation)
|
|
20
|
+
- [Multi-site mode caveat: SSR caching is force-disabled](#multi-site-mode-caveat-ssr-caching-is-force-disabled)
|
|
21
|
+
- [Adding a custom domain to Amplify Hosting](#adding-a-custom-domain-to-amplify-hosting)
|
|
4
22
|
|
|
5
23
|
## AppSync API key (auto-renewed)
|
|
6
24
|
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"@tiptap/pm": "^3.23.4",
|
|
23
23
|
"@tiptap/react": "^3.23.4",
|
|
24
24
|
"@tiptap/starter-kit": "^3.23.4",
|
|
25
|
-
"@ampless/plugin-og-image": "^0.2.0-alpha.
|
|
26
|
-
"@ampless/plugin-rss": "^0.2.0-alpha.
|
|
27
|
-
"@ampless/plugin-seo": "^0.2.0-alpha.
|
|
28
|
-
"@ampless/plugin-webhook": "^0.2.0-alpha.
|
|
29
|
-
"@ampless/admin": "^0.2.0-alpha.
|
|
30
|
-
"@ampless/backend": "^0.2.0-alpha.
|
|
31
|
-
"@ampless/runtime": "^0.2.0-alpha.
|
|
25
|
+
"@ampless/plugin-og-image": "^0.2.0-alpha.6",
|
|
26
|
+
"@ampless/plugin-rss": "^0.2.0-alpha.6",
|
|
27
|
+
"@ampless/plugin-seo": "^0.2.0-alpha.6",
|
|
28
|
+
"@ampless/plugin-webhook": "^0.2.0-alpha.6",
|
|
29
|
+
"@ampless/admin": "^0.2.0-alpha.18",
|
|
30
|
+
"@ampless/backend": "^0.2.0-alpha.8",
|
|
31
|
+
"@ampless/runtime": "^0.2.0-alpha.9",
|
|
32
32
|
"@digital-go-jp/tailwind-theme-plugin": "^0.3.4",
|
|
33
|
-
"ampless": "^0.2.0-alpha.
|
|
33
|
+
"ampless": "^0.2.0-alpha.6",
|
|
34
34
|
"aws-amplify": "^6.10.0",
|
|
35
35
|
"class-variance-authority": "^0.7.1",
|
|
36
36
|
"clsx": "^2.1.1",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
> English: [README.md](./README.md)
|
|
2
|
+
>
|
|
3
|
+
# Blog テーマ
|
|
4
|
+
|
|
5
|
+
shadcn/ui のデフォルトに準じたニュートラル系モノクロ。時系列の投稿フィード、個別投稿ページ、タグ別一覧を提供します。
|
|
6
|
+
|
|
7
|
+
## カスタマイズ
|
|
8
|
+
|
|
9
|
+
`/admin/sites/<siteId>/theme` で設定:
|
|
10
|
+
|
|
11
|
+
- **プライマリカラー** — ボタン、リンク、強調表示の背景色
|
|
12
|
+
- **アクセントカラー**
|
|
13
|
+
- **フォーカスリング**
|
|
14
|
+
- **破壊的操作** — 削除等の操作色
|
|
15
|
+
- **角丸**
|
|
16
|
+
- **本文フォント** — システムサンセリフ / セリフ (Georgia) / セリフ (Iowan) / 等幅
|
|
17
|
+
- **トップに固定する記事のスラッグ** — 公開済み投稿を 1 件ホームの先頭に固定
|
|
18
|
+
- **ロゴ画像 URL**
|
|
19
|
+
- **ヘッダーナビ** — ラベル + URL のペア
|
|
20
|
+
- **フッターリンク** — ラベル + URL のペア
|
|
21
|
+
|
|
22
|
+
サイトごとのライト/ダークカラースキームは ampless の標準テーマトークン経由で反映されます。
|
|
@@ -1,49 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
> 日本語版: [README.ja.md](./README.ja.md)
|
|
2
|
+
>
|
|
3
|
+
# Blog theme
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
Neutral monochrome with shadcn/ui defaults. Chronological post feed, single-post page, and tag listing.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Customizing
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
In `/admin/sites/<siteId>/theme`:
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
- **Primary color** — buttons, links, accent fills
|
|
12
|
+
- **Accent color**
|
|
13
|
+
- **Focus ring**
|
|
14
|
+
- **Destructive** — color used for destructive actions
|
|
15
|
+
- **Corner radius**
|
|
16
|
+
- **Body font** — System sans / Serif (Georgia) / Serif (Iowan) / Monospace
|
|
17
|
+
- **Featured post slug** — pin one published post to the top of the home page
|
|
18
|
+
- **Logo image URL**
|
|
19
|
+
- **Header navigation** — label + URL pairs
|
|
20
|
+
- **Footer links** — label + URL pairs
|
|
12
21
|
|
|
13
|
-
|
|
14
|
-
# Requires AWS credentials configured (`aws configure`).
|
|
15
|
-
# First run takes ~5–10 min to provision resources;
|
|
16
|
-
# amplify_outputs.json is regenerated each time before dev starts.
|
|
17
|
-
npm run sandbox
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Then open [http://localhost:3000](http://localhost:3000).
|
|
21
|
-
|
|
22
|
-
## First admin user
|
|
23
|
-
|
|
24
|
-
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.
|
|
25
|
-
|
|
26
|
-
After that, manage content from `/admin`:
|
|
27
|
-
|
|
28
|
-
- `/admin` — dashboard
|
|
29
|
-
- `/admin/posts` — list / create / edit posts (tiptap editor)
|
|
30
|
-
- `/admin/media` — upload images to S3
|
|
31
|
-
|
|
32
|
-
## Production deploy
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
git init && git add . && git commit -m "init"
|
|
36
|
-
git remote add origin <your-repo>
|
|
37
|
-
git push
|
|
38
|
-
# Then connect the repo to AWS Amplify Hosting in the AWS console.
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Customize
|
|
42
|
-
|
|
43
|
-
- `cms.config.ts` — site name, media delivery mode, plugins
|
|
44
|
-
- `app/` — Next.js App Router pages (`(public)/` for the blog, `(admin)/` for the CMS)
|
|
45
|
-
- `amplify/` — Amplify Gen 2 backend definitions (auth / data / storage)
|
|
46
|
-
|
|
47
|
-
## Plugins
|
|
48
|
-
|
|
49
|
-
Enabled: {{plugins}}
|
|
22
|
+
Per-site light/dark color scheme is honored through the standard ampless theme tokens.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
> English: [README.md](./README.md)
|
|
2
|
+
>
|
|
3
|
+
# Corporate テーマ
|
|
4
|
+
|
|
5
|
+
企業サイト向けの落ち着いたレイアウト。明るい背景にネイビーの配色、ヒーロー + お知らせ一覧構成、ヘッダー / フッターナビ付き。
|
|
6
|
+
|
|
7
|
+
## カスタマイズ
|
|
8
|
+
|
|
9
|
+
`/admin/sites/<siteId>/theme` で設定:
|
|
10
|
+
|
|
11
|
+
- **タグライン** — ヒーロー内、サイト名の上に表示される短いフレーズ
|
|
12
|
+
- **プライマリカラー**
|
|
13
|
+
- **角丸**
|
|
14
|
+
- **トップストーリーのスラッグ** — ヒーローとお知らせ一覧の間に公開済み投稿を 1 件フィーチャー
|
|
15
|
+
- **ロゴ画像 URL**
|
|
16
|
+
- **ヘッダーナビ** — ラベル + URL のペア
|
|
17
|
+
- **フッターリンク** — ラベル + URL のペア
|
|
18
|
+
- **フッター注記** — 住所 / 会社情報 / 追加の注意書き
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
> 日本語版: [README.ja.md](./README.ja.md)
|
|
2
|
+
>
|
|
3
|
+
# Corporate theme
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
Conservative business / company-site layout with hero and news section. Navy on near-white, header + footer navigation.
|
|
4
6
|
|
|
5
7
|
## Customizing
|
|
6
8
|
|
|
7
9
|
In `/admin/sites/<siteId>/theme`:
|
|
8
10
|
|
|
9
|
-
- Tagline
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
npm install
|
|
18
|
-
npm run sandbox
|
|
19
|
-
```
|
|
11
|
+
- **Tagline** — short phrase shown above the site name in the hero
|
|
12
|
+
- **Primary color**
|
|
13
|
+
- **Corner radius**
|
|
14
|
+
- **Top story slug** — feature one published post between the hero and the news section
|
|
15
|
+
- **Logo image URL**
|
|
16
|
+
- **Header navigation** — label + URL pairs
|
|
17
|
+
- **Footer links** — label + URL pairs
|
|
18
|
+
- **Footer legend** — address / company info / extra small print
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
> English: [README.md](./README.md)
|
|
2
|
+
>
|
|
3
|
+
# DADS テーマ
|
|
4
|
+
|
|
5
|
+
デジタル庁デザインシステム準拠のレイアウト。政府・自治体・公共系サイト向け。高コントラスト、アクセシビリティ重視、装飾控えめ。公式の **[デジタル庁デザインシステム Tailwind プラグイン](https://github.com/digital-go-jp/tailwind-theme-plugin)**(`@digital-go-jp/tailwind-theme-plugin`、MIT)をベースに構築されています。
|
|
6
|
+
|
|
7
|
+
## プラグインが提供する機能
|
|
8
|
+
|
|
9
|
+
- **カラーパレット** — プライマリカラーに `solidBlue`(`#0017c1`)を使用し、DADS の全スケール(ライトブルー、シアン、グリーン、ライム、イエロー、オレンジ、レッド、マゼンタ)を Tailwind クラス(`bg-blue-900`、`text-blue-50` など)で利用可能
|
|
10
|
+
- **タイポグラフィ** — プラグイン経由で `fontFamily.sans` に Noto Sans JP を設定。`--ampless-body-font` として参照可能
|
|
11
|
+
- **ボーダー半径** — `rounded-4` / `rounded-6` が利用可能
|
|
12
|
+
|
|
13
|
+
`tokens.css` がプラグインの CSS 変数(`--color-blue-900` など)を ampless 標準のテーマ変数(`--primary`、`--background` など)にバインドするため、共有 chrome(SiteHeader、SiteFooter、shadcn ボタンなど)が自動的に DADS カラーで描画されます。
|
|
14
|
+
|
|
15
|
+
DADS が新しいパレットバージョンを公開した場合、`@digital-go-jp/tailwind-theme-plugin` をバージョンアップするだけでテーマに反映されます。
|
|
16
|
+
|
|
17
|
+
## カスタマイズ
|
|
18
|
+
|
|
19
|
+
`/admin/sites/<siteId>/theme` で設定:
|
|
20
|
+
|
|
21
|
+
- **ロゴ画像 URL** — 組織マーク
|
|
22
|
+
- **プライマリカラー** — デフォルトは DADS の `solidBlue`。DADS 以外の色に変更するとサイトは DADS 準拠ではなくなります。
|
|
23
|
+
- **トップストーリーのスラッグ** — ヒーローとお知らせ一覧の間に公開済み投稿を 1 件フィーチャー
|
|
24
|
+
- **ヘッダーナビ** — ラベル + URL のペア
|
|
25
|
+
- **フッターリンク** — ラベル + URL のペア
|
|
26
|
+
- **フッター注記** — 住所 / 機関情報 / 追加の注意書き
|
|
27
|
+
|
|
28
|
+
## 注意事項
|
|
29
|
+
|
|
30
|
+
- ダークモードは反転色による近似実装です。プラグイン 0.3.4 時点では DADS の公式ダークパレットは存在しません。公式ダークパレットが公開された際は、`tokens.css` のダーク変数バインディングを更新してください。
|
|
31
|
+
- このプラグインはデザイントークンのみを提供します。フル DADS コンポーネント(ボタン、アラート、タブなど)については [design-system-example-components](https://github.com/digital-go-jp/design-system-example-components) を参照し、必要に応じて取り込んでください。
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
> 日本語版: [README.ja.md](./README.ja.md)
|
|
2
|
+
>
|
|
3
|
+
# DADS theme
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
Government / public-sector layout following the Digital Agency Design System aesthetic. High contrast, accessibility-first, minimal decoration. Built on the official **[Digital Agency Design System Tailwind plugin](https://github.com/digital-go-jp/tailwind-theme-plugin)** (`@digital-go-jp/tailwind-theme-plugin`, MIT).
|
|
4
6
|
|
|
5
7
|
## What's plugin-backed
|
|
6
8
|
|
|
@@ -8,27 +10,22 @@ DADS theme — built on the official **[Digital Agency Design System Tailwind pl
|
|
|
8
10
|
- **Typography** — `fontFamily.sans` set to Noto Sans JP via the plugin; surfaced through `--ampless-body-font`
|
|
9
11
|
- **Border radii** — `rounded-4` / `rounded-6` available
|
|
10
12
|
|
|
11
|
-
`
|
|
13
|
+
`tokens.css` binds the plugin's CSS variables (`--color-blue-900` etc.) to the standard ampless theme variables (`--primary`, `--background`, ...) so all shared chrome (SiteHeader, SiteFooter, shadcn buttons, etc.) automatically renders in DADS colors.
|
|
12
14
|
|
|
13
|
-
When DADS publishes a new palette version, bumping `@digital-go-jp/tailwind-theme-plugin`
|
|
15
|
+
When DADS publishes a new palette version, bumping `@digital-go-jp/tailwind-theme-plugin` is enough — the theme picks it up.
|
|
14
16
|
|
|
15
17
|
## Customizing
|
|
16
18
|
|
|
17
19
|
In `/admin/sites/<siteId>/theme`:
|
|
18
20
|
|
|
19
|
-
- **Logo image URL** —
|
|
20
|
-
- **Primary color** — defaults to DADS solidBlue
|
|
21
|
-
- **Top story slug** — feature one published post between hero and news
|
|
22
|
-
- **Header navigation
|
|
21
|
+
- **Logo image URL** — organization mark
|
|
22
|
+
- **Primary color** — defaults to DADS `solidBlue`. Changing to a non-DADS color makes the site no longer DADS-conformant.
|
|
23
|
+
- **Top story slug** — feature one published post between the hero and the news section
|
|
24
|
+
- **Header navigation** — label + URL pairs
|
|
25
|
+
- **Footer links** — label + URL pairs
|
|
26
|
+
- **Footer legend** — address / agency info / extra small print
|
|
23
27
|
|
|
24
28
|
## Notes
|
|
25
29
|
|
|
26
|
-
- Dark mode uses an inverted approximation. DADS doesn't ship an official dark palette as of plugin 0.3.4; when one lands, update `
|
|
30
|
+
- Dark mode uses an inverted approximation. DADS doesn't ship an official dark palette as of plugin 0.3.4; when one lands, update `tokens.css` to bind the dark variables.
|
|
27
31
|
- The plugin only provides design tokens. For full DADS components (buttons, alerts, tabs, etc.), see [design-system-example-components](https://github.com/digital-go-jp/design-system-example-components) and adapt as needed.
|
|
28
|
-
|
|
29
|
-
## Getting started
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npm install
|
|
33
|
-
npm run sandbox
|
|
34
|
-
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
> English: [README.md](./README.md)
|
|
2
|
+
>
|
|
3
|
+
# Docs テーマ
|
|
4
|
+
|
|
5
|
+
サイドバー主導のドキュメントレイアウト。サイドバー項目は通常のリンクに加え、**タグ駆動セクション**を組み合わせられます — `tag:<name>` 形式の項目を入れると、そのタグが付いた公開済み投稿の一覧に自動展開されます。タグでコンテンツを整理するだけでナビゲーションに自動反映されます。
|
|
6
|
+
|
|
7
|
+
## カスタマイズ
|
|
8
|
+
|
|
9
|
+
`/admin/sites/<siteId>/theme` で設定:
|
|
10
|
+
|
|
11
|
+
- **プライマリカラー**
|
|
12
|
+
- **角丸**
|
|
13
|
+
- **コードフォント** — システム等幅 / JetBrains Mono
|
|
14
|
+
- **サイドバーナビ** — 各行は `ラベル` + `URL`。URL には以下を指定可能:
|
|
15
|
+
- パス(`/getting-started`)
|
|
16
|
+
- 外部 URL(`https://...`)
|
|
17
|
+
- タグ参照(`tag:tutorials`)→ 見出し + タグ付き投稿一覧として描画
|
|
18
|
+
- **ロゴ画像 URL**
|
|
19
|
+
- **ヘッダーナビ** — トップレベルのリンク
|
|
20
|
+
- **フッターリンク** — ラベル + URL のペア
|
|
21
|
+
|
|
22
|
+
## 執筆のヒント
|
|
23
|
+
|
|
24
|
+
投稿に `guide` タグを付けて、サイドバーに URL `tag:guide` の行を追加するだけ。新しい記事を公開しても手動でリンクを編集する必要はなく、サイドバーに自動で並びます。
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
> 日本語版: [README.ja.md](./README.ja.md)
|
|
2
|
+
>
|
|
3
|
+
# Docs theme
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
Sidebar-led documentation layout. The sidebar combines plain links with **tag-driven sections** — a sidebar entry of the form `tag:<name>` auto-expands into a list of every published post with that tag. Lets writers organize content by tag and have it appear in nav automatically.
|
|
4
6
|
|
|
5
7
|
## Customizing
|
|
6
8
|
|
|
7
9
|
In `/admin/sites/<siteId>/theme`:
|
|
8
10
|
|
|
11
|
+
- **Primary color**
|
|
12
|
+
- **Corner radius**
|
|
13
|
+
- **Code font** — System monospace / JetBrains Mono
|
|
9
14
|
- **Sidebar navigation** — each row is `Label` + `URL`. The URL can be:
|
|
10
15
|
- a path (`/getting-started`)
|
|
11
16
|
- an external URL (`https://...`)
|
|
12
17
|
- a tag reference (`tag:tutorials`) → renders as a heading + list of tagged posts
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
18
|
+
- **Logo image URL**
|
|
19
|
+
- **Header navigation** — top-level links
|
|
20
|
+
- **Footer links** — label + URL pairs
|
|
16
21
|
|
|
17
22
|
## Authoring tip
|
|
18
23
|
|
|
19
24
|
Tag a post `guide` (in the post editor) and add a sidebar row with URL `tag:guide`. The sidebar will list that post automatically — no manual link editing every time you publish.
|
|
20
|
-
|
|
21
|
-
## Getting started
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm install
|
|
25
|
-
npm run sandbox
|
|
26
|
-
```
|
|
@@ -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,24 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
> 日本語版: [README.ja.md](./README.ja.md)
|
|
2
|
+
>
|
|
3
|
+
# Landing theme
|
|
2
4
|
|
|
3
|
-
|
|
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
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm install
|
|
21
|
-
npm run sandbox # provision the AWS backend + start Next.js
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
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
|
|
@@ -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,49 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
> 日本語版: [README.ja.md](./README.ja.md)
|
|
2
|
+
>
|
|
3
|
+
# Minimal theme
|
|
2
4
|
|
|
3
|
-
|
|
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
|
-
##
|
|
7
|
+
## Customizing
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
In `/admin/sites/<siteId>/theme`:
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
npm install
|
|
11
|
+
- **Primary color**
|
|
12
|
+
- **Corner radius**
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
# Requires AWS credentials configured (`aws configure`).
|
|
15
|
-
# First run takes ~5–10 min to provision resources;
|
|
16
|
-
# amplify_outputs.json is regenerated each time before dev starts.
|
|
17
|
-
npm run sandbox
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Then open [http://localhost:3000](http://localhost:3000).
|
|
21
|
-
|
|
22
|
-
## First admin user
|
|
23
|
-
|
|
24
|
-
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.
|
|
25
|
-
|
|
26
|
-
After that, manage content from `/admin`:
|
|
27
|
-
|
|
28
|
-
- `/admin` — dashboard
|
|
29
|
-
- `/admin/posts` — list / create / edit posts (tiptap editor)
|
|
30
|
-
- `/admin/media` — upload images to S3
|
|
31
|
-
|
|
32
|
-
## Production deploy
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
git init && git add . && git commit -m "init"
|
|
36
|
-
git remote add origin <your-repo>
|
|
37
|
-
git push
|
|
38
|
-
# Then connect the repo to AWS Amplify Hosting in the AWS console.
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Customize
|
|
42
|
-
|
|
43
|
-
- `cms.config.ts` — site name, media delivery mode, plugins
|
|
44
|
-
- `app/` — Next.js App Router pages (`(public)/` for the blog, `(admin)/` for the CMS)
|
|
45
|
-
- `amplify/` — Amplify Gen 2 backend definitions (auth / data / storage)
|
|
46
|
-
|
|
47
|
-
## Plugins
|
|
48
|
-
|
|
49
|
-
Enabled: {{plugins}}
|
|
14
|
+
That's it. For richer customization (fonts, multiple accent colors, footer / nav controls), use the `blog` theme.
|