尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗A small guestbook built with Next.js 16 (App Router, Server Actions, Cache Components) and Tailwind CSS.
Entries are stored in Upstash Redis. Create a database (free tier is fine), then add its REST credentials to .env.local:
UPSTASH_REDIS_REST_URL=https://...upstash.io
UPSTASH_REDIS_REST_TOKEN=...
npm install
npm run dev
Open http://localhost:3000 and sign the guestbook.
src/app/page.tsx renders the form and streams the entry list inside a <Suspense> boundary.src/app/guestbook-form.tsx is a client component using useActionState for validation errors and pending state.src/app/actions.ts holds the signGuestbook Server Action, which validates input, saves the entry and revalidates /.src/lib/guestbook.ts stores entries as a Redis list (guestbook:entries), newest first.Add Upstash Redis from the project's Storage tab (Marketplace). The integration sets KV_REST_API_URL and KV_REST_API_TOKEN, which the client picks up automatically. Run vercel env pull .env.local to use the same database locally.