AI Planning Poker - Demo
This pull request introduces a new feature for creating and managing games, including the necessary database migrations, API routes, and frontend components. It also includes updates to the testing setup and configuration files. ### New Feature: Game Management * [`src/app/api/games/route.ts`](diffhunk://#diff-9545a67e2bea99e85818ad43cb4971ae93c162ce47a76dfcd3fb1c6f7becab10R1-R34): Added a new API route for creating games, including input validation using `zod` and database interaction. * [`src/app/api/games/route.test.ts`](diffhunk://#diff-9811da7135e82aa253c43f957818e20ab0002d7092f95182e3fb8ac1b169f25fR1-R66): Added tests for the new API route to ensure proper handling of different scenarios (e.g., missing game name, successful creation, server error). * [`src/components/create-game/CreateGameForm.tsx`](diffhunk://#diff-17a025e1acb7eb89b8955257a419c103ba6202cd882354e69f4de73a2065faa0R1-R96): Created a form component for creating new games, with form validation using `react-hook-form` and `zod`. * [`src/components/create-game/CreateGameForm.test.tsx`](diffhunk://#diff-87f6d23c884cfc928f8c4f8f2a45621e829e9748efdef7cefe45e8a463aed2d3R1-R66): Added tests for the `CreateGameForm` component to verify form rendering, validation, and submission behavior. * [`src/components/create-game/GameFormCard.tsx`](diffhunk://#diff-658065149cb8cf1d84c0c1209a9d271a3575952bc49d8061fca39f715a47ad6aR1-R18): Created a card component to wrap the game creation form. ### Database Migrations * [`migrations/0000_shallow_millenium_guard.sql`](diffhunk://#diff-7fbaa8c34e92193974acecbf8038cef9517471421ed3cce6721c6950b6d2faf4R1-R5): Added a new migration to create the `games` table with `id`, `name`, and `description` columns. * `migrations/meta/0000_snapshot.json`, `migrations/meta/_journal.json`: Updated migration metadata to include the new `games` table. [[1]](diffhunk://#diff-bd8e42eff0aaa35dce1032283dbc9d3dc1f1cc4bdc7de6eb446d0687b512c380R1-R51) [[2]](diffhunk://#diff-4b1c503c046a7a5e68db62d77604227e208e1b9c26e76106a6a002627e958883R1-R13) ### Configuration and Setup * [`drizzle.config.ts`](diffhunk://#diff-d4e1c765f5d43acb9c59d87b520418289031da3fe52f5031041502b1250509c8R1-R11): Added configuration for `drizzle-orm` to manage database migrations. * [`jest.setup.ts`](diffhunk://#diff-a1c786cdea90125d840669112d499d337a658bf6431a8c972a2e14301d908662R1): Imported `@testing-library/jest-dom` to extend Jest matchers for DOM nodes. * [`package.json`](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R12-R46): Updated dependencies and devDependencies to include necessary packages for the new feature and testing. ### Frontend Updates * [`src/app/page.tsx`](diffhunk://#diff-73d7a23e5015801b9bcc9db601d6ec9594d3eb34e5bb23154e0ae4b0c30f1a3bL1-R9): Updated the home page to include the `GameFormCard` and `CreateGameForm` components for game creation. ### UI Components * [`src/components/ui/button.tsx`](diffhunk://#diff-c29ec4c06502c45a9ee8740156618a5823f7cadbcd01a339304a66537c0dc30dR1-R58): Created a reusable `Button` component with various styles and sizes. * [`src/components/ui/card.tsx`](diffhunk://#diff-1ef22b640d802930fa7379695d54d55541e603efb1fc820ce8d2a0860369afc0R1-R68): Created a reusable `Card` component with header, title, description, content, and footer sections. Fixes #1
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by judeibe and has received 1 comments.