AIでインタラクティブなレストランサイトを作る

料理のアニメーション、充実したメニュー、テイクアウトとデリバリーの注文、すべてを管理するダッシュボードを備えたレストランサイトを作ります。 ライブデモを見る (新しいタブで開きます)

ロードマップと資料

必要なもの

Claude Desktop

デスクトップアプリのClaude Codeで、レストランのサイトをカスタマイズします。

Claude Desktopをダウンロードする

https://claude.ai/download

GitHubアカウント

無料です。Sorrelの自分用コピーをここに置き、Hostingerはそこからデプロイします。

GitHubアカウントを作成する

https://github.com/signup

Node.js

LTS版をダウンロードしてください。ステップ4で、ClaudeがSupabaseのセットアップを実行するのに使います。

Node.jsをダウンロードする

https://nodejs.org/en/download

Hostingerのホスティング

ホスティングが必要になるのは、サイトを公開するステップ2です。

Hostingerのプランを選ぶ

UnlimitedプランかCloudプランを使ってください。Sorrelは静的サイトではなく、Node.js Web Appとしてデプロイされます。

スターターを手に入れる

自分用のコピーを作成する

GitHubでSorrelを開く

https://github.com/salhiworks/sorrel-restaurant-starter

Use this templateをクリックし、Create a new repositoryをクリックする 名前を付け、PublicかPrivateを選ぶ — どちらでも動きます Create repositoryをクリックし、そのアドレスをコピーする

Hostingerでデプロイする

Web Appを作成する

まだホスティングがありませんか?「必要なもの」でプランを入手してください。

Hostinger Websites Create site Web App

Hostingerがドメインの選択肢を出したら自分のドメインを選ぶ — 選ばない場合、サイトは一時ドメインで始まります Import Git Repositoryを選ぶ GitHubを承認し、Sorrelの自分用コピーを選ぶ

設定してデプロイする

Hostingerが検出したNext.jsの設定をそのまま使う Node.js 22を選ぶ ビルドコマンドがnpm run build、起動コマンドがnpm run startになっていることを確認する 環境変数はまだ追加しない Deployをクリックし、ビルドが終わるまで待つ

変数がない状態では、Sorrelはデモモードで動きます。サンプルのレストランを使った完全なサイトと、/adminのデモダッシュボードが使えます。まだ何も接続されていないため、デモ注文やダッシュボードでの編集は各訪問者のブラウザー内にだけ残り、どこにも送信されません。チェックアウト画面にもその旨が表示されます。

公開サイトを確かめる

サイトのアドレスを開く — 料理のショーケースをスクロールしてから、スマートフォンでも試す 料理をいくつか注文に追加し、Review & checkoutをクリックする デモ注文を出してから、サイトの/adminを開く:注文がデモダッシュボードに表示されます

Claude Desktopでカスタマイズする

Claude Desktopに取り込む

Claude Desktop Code Local

Documentsなどのフォルダーで Local セッションを始め、下にリポジトリのアドレスを入力して送信します:

コピーをクローンする

自分のSorrelリポジトリを新しいサブフォルダーにダウンロードし、Claudeが更新できることを確認します。

Clone {{REPOSITORY_URL}} into a NEW subfolder inside the folder I selected, named after the repository. Never clone directly into the selected folder and never overwrite existing files. If Git is missing, tell me exactly how to install it. Then check that you can push to this repository with git push --dry-run. If GitHub needs me to sign in, tell me exactly what to do, and never ask me to paste a password or token into the chat. When it is done, tell me which new folder to open in my next Claude Desktop Local session.

リポジトリのアドレス

https://github.com/your-name/my-restaurant

Sorrelフォルダーを開く

新しいLocalセッションを始める Claudeが作成したフォルダー(README.mdが入っているもの)を開く Claude Desktopに聞かれたら、そのフォルダーを信頼する

レストランについてClaudeに伝える

わかる項目だけ入力してください。空欄の項目は、ClaudeがSorrelのものをそのまま使います。入力したら、Sorrelのセッションで送信します:

自分のレストランをカスタマイズする

店名、ストーリー、メニュー、写真、見た目を変更し、料理のショーケースと注文機能はそのまま動かして、変更を自分のGitHubリポジトリにプッシュします。

This folder is my own copy of the Sorrel restaurant starter. Before you change anything, read README.md (step 3, "Customise with Claude Desktop", and "How it works"), CLAUDE.md and AGENTS.md. AGENTS.md matters: this version of Next.js differs from what you may know. Customize the website for my restaurant. Restaurant name: {{RESTAURANT_NAME}} Our concept and story: {{RESTAURANT_STORY}} Our menu: {{MENU}} Dish photos: {{PHOTOS_FOLDER}} Visual identity: {{VISUAL_STYLE}} Where each change belongs: - The restaurant's name, tagline, story, opening hours, categories and dishes: lib/seed.ts. Keep its structure and every field, and give each dish its allergens and dietary labels. If I haven't given a price, description or category, ask me instead of inventing one. - Colours and type: app/globals.css. Fonts and the page title: app/layout.tsx. - Photos: public/images/. If I gave you a photo folder, copy my photos from it (JPG, PNG, WebP or AVIF) into public/images/dishes/ with simple file names and use each one for its dish. Square photos taken from above look best in the showcase. Never use a photo from the internet. Keep these working exactly as they are: - The dish showcase in components/ui/dish-orbit-carousel.tsx: scroll-driven on large screens, swipe and tap on phones, reduced motion and the "Skip to full menu" link. You may change its colours and which dishes appear in it. - The cart, checkout, pickup and delivery, prices calculated on the server, the dashboard, Demo Mode, the Supabase migration, next.config.ts and the environment variables. - The dependencies: don't add new ones. First show me a short plan: every file you will change, and what changes in it. Wait for my approval. Then make the changes. If Node.js 22 or newer is already installed, run npm install, npm run lint, npm run typecheck and npm test, and fix anything they report. If it isn't installed, don't install it: tell me, and check your changes extra carefully, because Hostinger's build will be the first test. Don't start a local server. Then summarize what you changed and wait. I may ask for more changes. Only when I say it's ready: make sure .env.local and any other secrets are not committed, commit everything with a clear message and push it to the main branch of my own GitHub repository. Never push to any other repository. If GitHub needs me to sign in, tell me exactly what to do. When it is done, tell me the commit you pushed.

店名

Harbour Kitchen

レストランのコンセプトやストーリー

2011年から港に面した場所で営む、家族経営のシーフード料理店。朝の漁船から仕入れる魚と、自家製のパン。

メニュー

前菜:カニのトースト、焦がしバター、レモン — 12 メイン:メルルーサ、ムール貝、サフランのスープ — 26

料理の写真が入ったフォルダー

/Users/me/Pictures/レストランの料理

デザインの方向性

Claudeのプランと変更内容を確認し、追加の変更は同じセッションで頼みます。たとえばアクセントカラーを変える、ショーケースの料理を入れ替える、ストーリーを短くする、などです。準備ができたとClaudeに伝えると一度だけプッシュし、mainにプッシュするたびにHostingerがサイトを再ビルドします。

パソコンにNode.jsがインストールされていれば、Claudeはプッシュ前にコードもチェックします。これは任意で、どちらの場合もHostingerがサイトをビルドします。

ステップ4のあとは、料理、価格、写真、営業時間、設定をダッシュボードで編集します。コードは不要です。Claudeがlib/seed.tsに入れた内容が、そこでの最初のメニューになります。

Supabaseを接続してダッシュボードを有効にする

Supabaseプロジェクトを作成する

試したりカスタマイズしたりしている間、Supabaseは任意です。デモモードはSupabaseなしで動きますが、デモ注文やダッシュボードでの編集はブラウザーの外に出ません。実際の注文を受ける前には必要です。Supabaseを接続すると本番モードになり、メニューと設定がデータベースに保存され、ダッシュボードはパスワードで保護され、お客様からの実際の注文を受けられます。

Supabaseを開く

https://supabase.link/r4gdwhi

ログインするか、無料アカウントを作成する New projectをクリックする — リージョンは自由で、Freeプランで問題ありません データベースのパスワードを安全な場所に保存する — Claudeが使うことはありません プロジェクトの準備ができたら、Project IDをコピーする

Supabase Project Settings General

Claudeが必要とするプロジェクトの情報はProject IDだけです。SQLを書く必要はありません。データベースは次にClaudeがセットアップします。

ClaudeにSupabaseの接続を頼む

ステップ3のSorrelのセッションで、下にProject IDを入力して送信します:

SorrelをSupabaseに接続する

Claudeがプロジェクトをリンクし、あなたに確認し、履歴をチェックし、ドライランを見せてから、Supabase CLIでデータベースをセットアップします。

Connect this Sorrel restaurant to my Supabase project {{PROJECT_REF}}. Work only on that project and never touch any other. Read docs/SETUP.md first, including "For Claude", and follow it exactly. Use only the migration and scripts this project already has: don't write new SQL, tables or policies, and don't change the website's code. Use only this project's pinned Supabase CLI, through npx supabase after npm install — never a global supabase command — always on my hosted project. Never run supabase db reset, supabase migration repair or any command that deletes data, and never start a local database or Docker. Never ask me for a password, an access token or a Secret key, and never use --reveal. Do these yourself, and tell me what each one does before you run it: 1. Check that Node.js 20.9 or newer is installed (if it isn't, stop and tell me how to install it), then run npm install and check that npx supabase --version shows 2.122.0. If it doesn't, stop and tell me. 2. Check that I'm signed in to the Supabase CLI with npx supabase projects list. If I'm not, stop and tell me to run npx supabase login in the Terminal myself, and continue when I say I'm signed in. 3. Link this folder with npx supabase link --project-ref {{PROJECT_REF}}, then show me the project's name and URL and ask me to confirm it's the right one. 4. Run npm run setup -- --check. If the project's migration history has migrations that aren't in supabase/migrations, stop and explain what you see: change nothing until I decide. 5. If the database still needs setting up, show me the dry run (npx supabase db push --linked --dry-run), then apply it with npx supabase db push --linked. Then run npm run setup -- --check again: the database check must pass. Then tell me to run npm run setup in the Terminal myself: it creates my owner account with a password I type into a hidden prompt, and checks that public sign-ups are off. Never ask me for my password in this chat. When I tell you it's done, run npm run setup -- --check and tell me in plain words what passed, which values to add to Hostinger's Environment variables, and what is still left to do. Don't create .env.local and don't start a local server: my site is already live on Hostinger.

SupabaseのProject ID

abcdefghijklmnopqrst

Claudeはコマンドを実行する前に毎回確認します — Allowをクリックしてください。あなたの番になると、Claudeは止まります。

Supabase CLIにログインする

Claudeに頼まれたら、これを自分で一度だけ実行します(ブラウザが開きます):

セッションのタイトルバーにあるTerminalをクリックする 下のコマンドを実行する 開いたブラウザのウィンドウでログインを承認する サインインしたことをClaudeに伝える

npx supabase login

オーナーアカウントを作成する

Claudeに頼まれたら、Sorrel独自のセットアップをTerminalで実行します。Claudeが済ませた作業はすべてスキップされ、非公開の情報だけを聞かれます:

npm run setup

メールアドレスを入力し、続けて10文字以上のパスワードを入力する — パスワードは表示されません 求められたら、SupabaseダッシュボードでAllow new users to sign upをオフにして保存し、Enterキーを押す — オフになっているかをセットアップが確認します 表示された値をHostinger用に控えておき、終わったことをClaudeに伝える

Supabase Authentication Sign In / Providers

パスワードは非公開にしておく

パスワードは、Terminalの非表示の入力欄にだけ入力してください。チャットには絶対に貼り付けないでください。

Supabase CLIが動かない場合は?

Terminalでnpx supabase loginをもう一度実行し、Claudeにやり直してもらいましょう。それでも解決しない場合は、Sorrelフォルダー内のセットアップガイドのWithout the CLIに、同じ手順をSupabaseのSQL Editorで手動で行う方法が載っています:

docs/SETUP.md

キーをHostingerに追加する

Hostinger Your Web App Environment variables

次の変数を追加します。Project URLとPublishable keyはnpm run setupが表示しています。Secret keyはProject Settings › API Keysから自分でコピーしてください — Claudeを通しては絶対に扱わないでください。

NEXT_PUBLIC_SUPABASE_URL NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY SUPABASE_SECRET_KEY TRUSTED_PROXY NEXT_PUBLIC_SITE_URL ORDER_IP_SALT

NEXT_PUBLIC_SUPABASE_URL

SupabaseのProject URL

NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY

SupabaseのPublishable key(sb_publishable_…)

SUPABASE_SECRET_KEY

SupabaseのSecret key(sb_secret_…)

TRUSTED_PROXY

hostingerという単語(小文字)

NEXT_PUBLIC_SITE_URL

https://で始まるサイトのアドレス

ORDER_IP_SALT

任意:長いランダムな文字列

Secret keyは、プロジェクトのAPI Keysにあります。

API Keysを開く

https://supabase.com/dashboard/project/_/settings/api-keys

Secret keyは秘密にする

SUPABASE_SECRET_KEYはサーバー専用の唯一の値です。NEXT_PUBLIC_で始まる名前を付けたり、コードに書いたり、チャットに貼り付けたりは絶対にしないでください。NEXT_PUBLIC_で始まるものはすべてブラウザーから見えます。

変数を保存する サイトを再デプロイし、ビルドが終わるまで待つ — 公開用の値はサイトに組み込まれるため、変更するたびに再デプロイが必要です

ダッシュボードを有効にする

公開サイトで/adminを開き、オーナーのメールアドレスとパスワードでログインする Overviewで、Import sample menuをクリックしてステップ3でClaudeが作ったメニューをデータベースにコピーする — または空のメニューから始める サイトを開く:チェックアウトの表示がPlace demo orderではなくPlace orderになっています

これでサイトは本番モードになりました。Sorrelがサンプルデータに戻ることはありません。サイトにSupabaseからメニューを読み込めなかったと表示された場合は、キーが間違っているか、データベースのセットアップが完了していません — Claudeにnpm run setup -- --checkを実行してもらってください。

注文数制限の保護を確認する

Sorrelは、1つの接続から10分間に出せる注文の数を制限しています。訪問者のアドレスを認識できているか確認するには、ログインした状態で/admin/connection-checkを開きます。表示されるアドレスが、「what is my IP」のようなサイトで表示される自分の接続のアドレスと一致するはずです。スマートフォンのモバイルデータでも試してください。アドレスが見つからない場合は、TRUSTED_PROXYがhostingerになっているか、サイトでHostingerのCDNがオンになっているかを確認します。

設定して公開する

レストランを設定する

ダッシュボードで保存した内容は、すべてサイトに反映されます。コードは不要です。Settingsを開きます:

Restaurantで店名とキャッチフレーズを設定し、ロゴがあれば追加する Contact & locationで、電話番号、メールアドレス、住所、地図のリンクを追加する Opening hoursで曜日ごとの時間を設定し、続けてTimezoneとCurrencyを設定する — 注文は営業時間中だけ受け付けます OrderingでPickupとDeliveryのオン・オフを切り替え、Delivery fee、Delivery minimum、Delivery noteを設定する Save changesをクリックする

次にMenuを開きます:

各料理の名前、説明、価格、アレルゲン、食事制限のラベル、写真を編集し、新しい料理はAdd dishで追加する 料理が売り切れたらAvailableをオフにする — メニューには残り、売り切れと表示されます アニメーションのショーケースに載せたい料理で、Show in the homepage showcaseをオンにする

テスト注文をする

スマートフォンでサイトを開き、料理をいくつか追加してReview & checkoutをクリックする テイクアウトかデリバリーと時間を選び、情報を入力してPlace orderをクリックする ダッシュボードでOrdersを開く — 注文が届いています Accept orderをクリックし、続けてStart preparing、Mark ready、Completeをクリックする

オンラインでの支払いはありません。お客様は受け取り時、または配達時に支払います。オンライン注文はSettingsでAccept online ordersをオフにすればいつでも一時停止でき、メニューは表示されたままです。

ドメインを接続して公開する

まだ一時ドメインのままですか?自分のドメインを接続しましょう:

Hostinger Your Web App Connect domain

ドメインを入力し、Hostingerの接続手順に従う ドメインをほかの会社で登録している場合は、Hostingerに表示されるDNSレコードを登録先で追加し、既存のメール用レコードはそのまま残す NEXT_PUBLIC_SITE_URLを新しいアドレスに変更して再デプロイする

自分のドメインが鍵マーク付きで開き、店名、写真、正しい営業状況が表示される

ショーケースがパソコンではスクロールで、スマートフォンではスワイプで動く

テスト注文がダッシュボードのOrdersに届いた

営業時間、タイムゾーン、配達料、価格が正しい

今後、料理、価格、写真、営業時間はダッシュボードで変更でき、すぐに反映されます。デザインやコードの変更は、SorrelのセッションでClaudeに頼んでプッシュを承認してください。mainにプッシュするたびにHostingerがサイトを再ビルドします。