開發者工具已於 2026年11月5日 驗證
Typed Next.js app with tests
A Next.js App Router app with Tailwind styling, Zod-validated inputs and Vitest unit tests.
作者:Promptu
你最終會得到
A working Next.js app where every input is validated with Zod and core logic has Vitest tests. The two prompts draft the Zod schemas from sample JSON and the first unit tests.
建置順序
- 1
- 2技術StylingTailwind CSS
Utility-first CSS framework. Style directly in markup and ship only the classes you use.
- 3技術ValidationZod
TypeScript-first schema validation with static type inference. Validate API input once and get types for free.
npm install zod
- 4提示詞Draft the schemasZod schema from a JSON example
- 5技術TestingVitest
Fast, Vite-native unit test framework with a Jest-compatible API.
npm install -D vitest
- 6提示詞Draft the first testsUnit tests for a pure function (no mocks)
執行指令前請先檢查。Promptu 絕不會在你的電腦上執行程式碼。

