create-einja-app 0.1.1 → 0.1.2
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.md +3 -7
- package/dist/cli.js +11 -49
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/default/.playwright-mcp/dashboard.png +0 -0
- package/templates/default/.playwright-mcp/web-home.png +0 -0
- package/templates/{turborepo-pandacss → default}/CLAUDE.md +5 -5
- package/templates/default/apps/web/server/presentation/routes/userRoutes.ts +57 -0
- package/templates/{turborepo-pandacss → default}/apps/web/src/app/(authenticated)/data/_components/UserTable.tsx +18 -7
- package/templates/default/apps/web/src/app/(authenticated)/data/_components/UserTableContainer.tsx +62 -0
- package/templates/{turborepo-pandacss → default}/apps/web/src/app/(authenticated)/data/page.tsx +13 -8
- package/templates/default/apps/web/src/app/api/rpc/[[...route]]/route.ts +31 -0
- package/templates/default/apps/web/src/hooks/use-users.ts +118 -0
- package/templates/default/apps/web/src/lib/api-client.ts +18 -0
- package/templates/{turborepo-pandacss → default}/apps/web/tsconfig.json +5 -0
- package/templates/{turborepo-pandacss → default}/package.json +7 -2
- package/templates/default/packages/server-core/src/domain/validators/user.ts +23 -0
- package/templates/{turborepo-pandacss → default}/pnpm-lock.yaml +21 -3
- /package/templates/{turborepo-pandacss → default}/.biomeignore +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/biome-format.sh +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/design-doc-check.sh +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/detect-secrets.sh +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/large-file-warning.sh +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/playwright-resize.sh +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/typecheck.sh +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/unset-volta-recursion.sh +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/validate-git-commit.sh +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/warn-index-ts.sh +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/warn-relative-import.sh +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/settings.json +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/skills/create-einja-app-release/SKILL.md +0 -0
- /package/templates/{turborepo-pandacss → default}/.claude/skills/dev-cli-release/SKILL.md +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/commands/spec-create.md +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/commands/start-dev.md +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/commands/task-exec.md +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/commands/task-vibe-kanban-loop.md +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/commands/update-docs-by-task-specs.md +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/mcp.json +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/rules/api-rules.mdc +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/rules/api-test-rules.mdc +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/rules/base-code.mdc +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/rules/base-commit-rules.mdc +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/rules/base-design.mdc +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/rules/base-rules.mdc +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/rules/error-handling-rules.mdc +0 -0
- /package/templates/{turborepo-pandacss → default}/.cursor/rules/refactor-rules.mdc +0 -0
- /package/templates/{turborepo-pandacss → default}/.dockerignore +0 -0
- /package/templates/{turborepo-pandacss → default}/.einja-sync.json +0 -0
- /package/templates/{turborepo-pandacss → default}/.env.ci +0 -0
- /package/templates/{turborepo-pandacss → default}/.env.example +0 -0
- /package/templates/{turborepo-pandacss → default}/.env.personal.example +0 -0
- /package/templates/{turborepo-pandacss → default}/.envrc +0 -0
- /package/templates/{turborepo-pandacss → default}/.gitattributes +0 -0
- /package/templates/{turborepo-pandacss → default}/.husky/pre-commit +0 -0
- /package/templates/{turborepo-pandacss → default}/.lintstagedrc.js +0 -0
- /package/templates/{turborepo-pandacss → default}/.mcp.json +0 -0
- /package/templates/{turborepo-pandacss → default}/.node-version +0 -0
- /package/templates/{turborepo-pandacss → default}/.templateignore +0 -0
- /package/templates/{turborepo-pandacss → default}/.vscode/extensions.json +0 -0
- /package/templates/{turborepo-pandacss → default}/README.md +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/middleware.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/next.config.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/package.json +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/panda.config.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/postcss.config.cjs +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/public/file.svg +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/public/globe.svg +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/public/next.svg +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/public/vercel.svg +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/public/window.svg +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/(authenticated)/dashboard/page.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/(authenticated)/layout-client.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/(authenticated)/layout.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/(authenticated)/profile/page.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/api/auth/[...nextauth]/route.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/api/auth/signup/route.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/error.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/favicon.ico +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/global-error.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/globals.css +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/layout.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/not-found.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/page.module.css +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/page.test.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/page.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/signin/page.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/app/signup/page.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/application/use-cases/UserUseCases.test.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/application/use-cases/UserUseCases.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/auth/login-button.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/auth/logout-button.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/auth/user-avatar.test.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/auth/user-avatar.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/dashboard/dashboard-stats.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/providers/query-provider.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/providers/session-provider.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/shared/Sidebar.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/shared/header.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/accordion.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/alert-dialog.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/alert.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/aspect-ratio.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/avatar.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/badge.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/breadcrumb.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/button.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/card.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/checkbox.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/data-table.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/dialog-hook.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/dialog.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/drawer.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/dropdown-menu.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/form.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/hover-card.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/input.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/label.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/pagination.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/popover.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/progress.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/select.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/separator.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/skeleton.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/sonner.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/table.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/tabs.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/textarea.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/tooltip.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/typography.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/lib/auth/guard.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/lib/auth/index.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/lib/prisma.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/src/lib/utils.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/test/globals.d.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/test/matchers.d.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/test/setup.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/vitest.config.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/apps/web/vitest.d.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/biome.json +0 -0
- /package/templates/{turborepo-pandacss → default}/components.json +0 -0
- /package/templates/{turborepo-pandacss → default}/docker-compose.yml +0 -0
- /package/templates/{turborepo-pandacss → default}/middleware.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/next.config.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/package-lock.json +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/config/package.json +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/config/panda.config.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/config/src/index.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/config/src/worktree-config-loader.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/config/src/worktree-config.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/config/tsconfig.build.json +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/config/tsconfig.json +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/config/typescript/base.json +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/front-core/package.json +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/front-core/src/auth/config.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/front-core/src/auth/index.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/front-core/src/auth/types/next-auth.d.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/front-core/src/auth/utils.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/front-core/src/context/index.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/front-core/src/hooks/index.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/front-core/src/index.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/front-core/src/utils/index.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/front-core/tsconfig.json +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/package.json +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/prisma/schema.prisma +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/prisma/seed.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/prisma.config.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/__generated__/fabbrica/index.d.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/__generated__/fabbrica/index.js +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/core/result.test.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/core/result.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/domain/.gitkeep +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/domain/entities/User.test.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/domain/entities/User.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/domain/repository-interfaces/IUserRepository.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/infrastructure/database/client.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/infrastructure/database/mappers/UserMapper.test.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/infrastructure/database/mappers/UserMapper.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/infrastructure/database/repositories/UserRepository.test.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/infrastructure/database/repositories/UserRepository.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/testing/factories/index.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/testing/factories/user.factory.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/testing/fixtures/users.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/testing/helpers/date.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/testing/helpers/password.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/src/testing/index.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/tsconfig.json +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/server-core/vitest.config.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/package.json +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/accordion.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/alert-dialog.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/alert.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/aspect-ratio.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/avatar.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/badge.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/breadcrumb.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/button.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/card.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/checkbox.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/data-table.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/dialog-hook.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/dialog.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/drawer.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/dropdown-menu.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/form.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/hover-card.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/input.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/label.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/lib/utils.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/pagination.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/popover.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/progress.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/select.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/separator.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/skeleton.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/sonner.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/table.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/tabs.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/textarea.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/tooltip.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/src/typography.tsx +0 -0
- /package/templates/{turborepo-pandacss → default}/packages/ui/tsconfig.json +0 -0
- /package/templates/{turborepo-pandacss → default}/panda.config.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/pnpm-workspace.yaml +0 -0
- /package/templates/{turborepo-pandacss → default}/postcss.config.cjs +0 -0
- /package/templates/{turborepo-pandacss → default}/prisma/schema.prisma +0 -0
- /package/templates/{turborepo-pandacss → default}/public/file.svg +0 -0
- /package/templates/{turborepo-pandacss → default}/public/globe.svg +0 -0
- /package/templates/{turborepo-pandacss → default}/public/next.svg +0 -0
- /package/templates/{turborepo-pandacss → default}/public/vercel.svg +0 -0
- /package/templates/{turborepo-pandacss → default}/public/window.svg +0 -0
- /package/templates/{turborepo-pandacss → default}/scripts/cli-template-update.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/scripts/env-show.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/scripts/env.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/scripts/init.sh +0 -0
- /package/templates/{turborepo-pandacss → default}/scripts/setup-dev.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/scripts/template-update.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/scripts/worktree/dev.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/test/globals.d.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/test/setup.ts +0 -0
- /package/templates/{turborepo-pandacss → default}/tsconfig.json +0 -0
- /package/templates/{turborepo-pandacss → default}/turbo.json +0 -0
- /package/templates/{turborepo-pandacss → default}/vitest.config.ts +0 -0
package/templates/default/apps/web/src/app/(authenticated)/data/_components/UserTableContainer.tsx
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useUsers, type UserFilters } from "@/hooks/use-users";
|
|
4
|
+
import type { PaginatedUserList } from "@web/application/use-cases/UserUseCases";
|
|
5
|
+
import { UserTable } from "./UserTable";
|
|
6
|
+
|
|
7
|
+
interface UserTableContainerProps {
|
|
8
|
+
initialData?: PaginatedUserList;
|
|
9
|
+
filters?: UserFilters;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* UserTableContainer
|
|
14
|
+
*
|
|
15
|
+
* Client Component - Tanstack Queryでデータ管理
|
|
16
|
+
*/
|
|
17
|
+
export function UserTableContainer({
|
|
18
|
+
initialData,
|
|
19
|
+
filters = {},
|
|
20
|
+
}: UserTableContainerProps) {
|
|
21
|
+
const { data, isLoading, error } = useUsers(filters, initialData);
|
|
22
|
+
|
|
23
|
+
const handleView = (userId: string) => {
|
|
24
|
+
console.log("詳細表示:", userId);
|
|
25
|
+
// TODO: 詳細ページへの遷移やモーダル表示
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const handleEdit = (userId: string) => {
|
|
29
|
+
console.log("編集:", userId);
|
|
30
|
+
// TODO: 編集ページへの遷移やモーダル表示
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const handleDelete = (userId: string) => {
|
|
34
|
+
console.log("削除:", userId);
|
|
35
|
+
// TODO: 削除確認モーダル表示とAPI呼び出し
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
if (error) {
|
|
39
|
+
return (
|
|
40
|
+
<div className="text-destructive">
|
|
41
|
+
エラーが発生しました: {error.message}
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (isLoading) {
|
|
47
|
+
return <div>読み込み中...</div>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (!data) {
|
|
51
|
+
return <div>データがありません</div>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<UserTable
|
|
56
|
+
users={data.items}
|
|
57
|
+
onView={handleView}
|
|
58
|
+
onEdit={handleEdit}
|
|
59
|
+
onDelete={handleDelete}
|
|
60
|
+
/>
|
|
61
|
+
);
|
|
62
|
+
}
|
package/templates/{turborepo-pandacss → default}/apps/web/src/app/(authenticated)/data/page.tsx
RENAMED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { userUseCases } from "@/application/use-cases/UserUseCases";
|
|
2
1
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
3
|
-
import {
|
|
2
|
+
import { prefetchUsers } from "@/hooks/use-users";
|
|
3
|
+
import { UserTableContainer } from "./_components/UserTableContainer";
|
|
4
4
|
|
|
5
5
|
export default async function DataPage() {
|
|
6
|
-
|
|
6
|
+
let initialData;
|
|
7
|
+
let error;
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
try {
|
|
10
|
+
initialData = await prefetchUsers({ page: 1, limit: 100 });
|
|
11
|
+
} catch (e) {
|
|
12
|
+
error = e instanceof Error ? e.message : "データの取得に失敗しました";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (error) {
|
|
9
16
|
return (
|
|
10
17
|
<div className="container mx-auto p-6">
|
|
11
18
|
<div className="space-y-6">
|
|
@@ -22,7 +29,7 @@ export default async function DataPage() {
|
|
|
22
29
|
<CardDescription>データの取得中にエラーが発生しました。</CardDescription>
|
|
23
30
|
</CardHeader>
|
|
24
31
|
<CardContent>
|
|
25
|
-
<p className="text-destructive">{
|
|
32
|
+
<p className="text-destructive">{error}</p>
|
|
26
33
|
</CardContent>
|
|
27
34
|
</Card>
|
|
28
35
|
</div>
|
|
@@ -30,8 +37,6 @@ export default async function DataPage() {
|
|
|
30
37
|
);
|
|
31
38
|
}
|
|
32
39
|
|
|
33
|
-
const { items: users } = result.value;
|
|
34
|
-
|
|
35
40
|
return (
|
|
36
41
|
<div className="container mx-auto p-6">
|
|
37
42
|
<div className="space-y-6">
|
|
@@ -48,7 +53,7 @@ export default async function DataPage() {
|
|
|
48
53
|
</CardDescription>
|
|
49
54
|
</CardHeader>
|
|
50
55
|
<CardContent>
|
|
51
|
-
<
|
|
56
|
+
<UserTableContainer initialData={initialData} />
|
|
52
57
|
</CardContent>
|
|
53
58
|
</Card>
|
|
54
59
|
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* route.ts
|
|
3
|
+
*
|
|
4
|
+
* Hono APIエントリーポイント
|
|
5
|
+
* basePath: /api/rpc
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { Hono } from "hono";
|
|
9
|
+
import { handle } from "hono/vercel";
|
|
10
|
+
import { userRoutes } from "@web/server/presentation/routes/userRoutes";
|
|
11
|
+
|
|
12
|
+
const app = new Hono().basePath("/api/rpc");
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* ルート登録
|
|
16
|
+
*/
|
|
17
|
+
const routes = app.route("/users", userRoutes);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 型エクスポート(Hono Client用)
|
|
21
|
+
*/
|
|
22
|
+
export type AppType = typeof routes;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Next.js App Router統合
|
|
26
|
+
*/
|
|
27
|
+
export const GET = handle(app);
|
|
28
|
+
export const POST = handle(app);
|
|
29
|
+
export const PUT = handle(app);
|
|
30
|
+
export const DELETE = handle(app);
|
|
31
|
+
export const PATCH = handle(app);
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* use-users.ts
|
|
3
|
+
*
|
|
4
|
+
* Tanstack Query hooks for user data management
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
"use client";
|
|
8
|
+
|
|
9
|
+
import { useQuery } from "@tanstack/react-query";
|
|
10
|
+
import { apiClient } from "@/lib/api-client";
|
|
11
|
+
import type { PaginatedUserList } from "@web/application/use-cases/UserUseCases";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* QueryKey factory for users
|
|
15
|
+
*/
|
|
16
|
+
export const userKeys = {
|
|
17
|
+
all: ["users"] as const,
|
|
18
|
+
lists: () => [...userKeys.all, "list"] as const,
|
|
19
|
+
list: (filters: UserFilters) => [...userKeys.lists(), filters] as const,
|
|
20
|
+
details: () => [...userKeys.all, "detail"] as const,
|
|
21
|
+
detail: (id: string) => [...userKeys.details(), id] as const,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* User filters type
|
|
26
|
+
*/
|
|
27
|
+
export interface UserFilters {
|
|
28
|
+
page?: number;
|
|
29
|
+
limit?: number;
|
|
30
|
+
search?: string;
|
|
31
|
+
status?: "active" | "inactive";
|
|
32
|
+
role?: "admin" | "user";
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* useUsers hook
|
|
37
|
+
*
|
|
38
|
+
* ユーザー一覧を取得するhook
|
|
39
|
+
*/
|
|
40
|
+
export function useUsers(
|
|
41
|
+
filters: UserFilters = {},
|
|
42
|
+
initialData?: PaginatedUserList
|
|
43
|
+
) {
|
|
44
|
+
return useQuery({
|
|
45
|
+
queryKey: userKeys.list(filters),
|
|
46
|
+
queryFn: async () => {
|
|
47
|
+
const response = await apiClient.api.rpc.users.$get({
|
|
48
|
+
query: {
|
|
49
|
+
page: filters.page?.toString() ?? "1",
|
|
50
|
+
limit: filters.limit?.toString() ?? "10",
|
|
51
|
+
search: filters.search,
|
|
52
|
+
status: filters.status,
|
|
53
|
+
role: filters.role,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
if (!response.ok) {
|
|
58
|
+
throw new Error("Failed to fetch users");
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return response.json() as Promise<PaginatedUserList>;
|
|
62
|
+
},
|
|
63
|
+
initialData,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* useUser hook
|
|
69
|
+
*
|
|
70
|
+
* 特定のユーザーを取得するhook
|
|
71
|
+
*/
|
|
72
|
+
export function useUser(id: string) {
|
|
73
|
+
return useQuery({
|
|
74
|
+
queryKey: userKeys.detail(id),
|
|
75
|
+
queryFn: async () => {
|
|
76
|
+
const response = await apiClient.api.rpc.users[":id"].$get({
|
|
77
|
+
param: { id },
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
if (!response.ok) {
|
|
81
|
+
throw new Error("Failed to fetch user");
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return response.json();
|
|
85
|
+
},
|
|
86
|
+
enabled: !!id,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* prefetchUsers
|
|
92
|
+
*
|
|
93
|
+
* Server Component用のデータ取得関数
|
|
94
|
+
*/
|
|
95
|
+
export async function prefetchUsers(
|
|
96
|
+
filters: UserFilters = {}
|
|
97
|
+
): Promise<PaginatedUserList> {
|
|
98
|
+
const baseUrl = process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000";
|
|
99
|
+
const params = new URLSearchParams();
|
|
100
|
+
|
|
101
|
+
if (filters.page) params.set("page", filters.page.toString());
|
|
102
|
+
if (filters.limit) params.set("limit", filters.limit.toString());
|
|
103
|
+
if (filters.search) params.set("search", filters.search);
|
|
104
|
+
if (filters.status) params.set("status", filters.status);
|
|
105
|
+
if (filters.role) params.set("role", filters.role);
|
|
106
|
+
|
|
107
|
+
const url = `${baseUrl}/api/rpc/users?${params.toString()}`;
|
|
108
|
+
|
|
109
|
+
const response = await fetch(url, {
|
|
110
|
+
cache: "no-store",
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
if (!response.ok) {
|
|
114
|
+
throw new Error("Failed to prefetch users");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return response.json();
|
|
118
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* api-client.ts
|
|
3
|
+
*
|
|
4
|
+
* Hono Client設定
|
|
5
|
+
* 型安全なAPI呼び出しを提供
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { hc } from "hono/client";
|
|
9
|
+
import type { AppType } from "@/app/api/rpc/[[...route]]/route";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Hono Client インスタンス
|
|
13
|
+
*
|
|
14
|
+
* 使用方法:
|
|
15
|
+
* - 一覧取得: apiClient.api.rpc.users.$get({ query: { page: "1", limit: "10" } })
|
|
16
|
+
* - 詳細取得: apiClient.api.rpc.users[":id"].$get({ param: { id: "..." } })
|
|
17
|
+
*/
|
|
18
|
+
export const apiClient = hc<AppType>("/");
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
"@/*": [
|
|
11
11
|
"./src/*"
|
|
12
12
|
],
|
|
13
|
+
"@web/*": [
|
|
14
|
+
"./src/*",
|
|
15
|
+
"./*"
|
|
16
|
+
],
|
|
13
17
|
"@/styled-system/*": [
|
|
14
18
|
"./styled-system/*"
|
|
15
19
|
],
|
|
@@ -24,6 +28,7 @@
|
|
|
24
28
|
"test/matchers.d.ts",
|
|
25
29
|
"**/*.ts",
|
|
26
30
|
"**/*.tsx",
|
|
31
|
+
"server/**/*.ts",
|
|
27
32
|
".next/types/**/*.ts",
|
|
28
33
|
"../../packages/front-core/src/auth/types/**/*.d.ts"
|
|
29
34
|
],
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"dotenvx": "dotenvx",
|
|
46
46
|
"env:encrypt": "dotenvx encrypt",
|
|
47
47
|
"env:show": "tsx scripts/env-show.ts",
|
|
48
|
-
"task:loop": "einja task:loop"
|
|
48
|
+
"task:loop": "npx @einja/dev-cli task:loop",
|
|
49
|
+
"einja:sync": "npx @einja/dev-cli sync"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@clack/prompts": "^0.11.0",
|
|
52
53
|
"@dotenvx/dotenvx": "^1.51.4",
|
|
53
|
-
"@einja/dev-cli": "workspace:*",
|
|
54
54
|
"@types/node": "^25.0.3",
|
|
55
55
|
"husky": "^9.1.7",
|
|
56
56
|
"lint-staged": "^16.1.0",
|
|
@@ -60,5 +60,10 @@
|
|
|
60
60
|
"volta": {
|
|
61
61
|
"node": "22.16.0",
|
|
62
62
|
"pnpm": "10.14.0"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@hono/zod-validator": "^0.7.6",
|
|
66
|
+
"hono": "^4.11.3",
|
|
67
|
+
"zod": "^4.3.5"
|
|
63
68
|
}
|
|
64
69
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ユーザー一覧取得クエリパラメータスキーマ
|
|
5
|
+
*/
|
|
6
|
+
export const userListQuerySchema = z.object({
|
|
7
|
+
page: z.string().optional().default("1").transform(Number),
|
|
8
|
+
limit: z.string().optional().default("10").transform(Number),
|
|
9
|
+
search: z.string().optional(),
|
|
10
|
+
status: z.enum(["active", "inactive"]).optional(),
|
|
11
|
+
role: z.enum(["admin", "user"]).optional(),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export type UserListQuery = z.infer<typeof userListQuerySchema>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* ユーザーIDパスパラメータスキーマ
|
|
18
|
+
*/
|
|
19
|
+
export const userIdParamSchema = z.object({
|
|
20
|
+
id: z.string().uuid("Invalid user ID format"),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export type UserIdParam = z.infer<typeof userIdParamSchema>;
|
|
@@ -7,6 +7,16 @@ settings:
|
|
|
7
7
|
importers:
|
|
8
8
|
|
|
9
9
|
.:
|
|
10
|
+
dependencies:
|
|
11
|
+
'@hono/zod-validator':
|
|
12
|
+
specifier: ^0.7.6
|
|
13
|
+
version: 0.7.6(hono@4.11.3)(zod@4.3.5)
|
|
14
|
+
hono:
|
|
15
|
+
specifier: ^4.11.3
|
|
16
|
+
version: 4.11.3
|
|
17
|
+
zod:
|
|
18
|
+
specifier: ^4.3.5
|
|
19
|
+
version: 4.3.5
|
|
10
20
|
devDependencies:
|
|
11
21
|
'@clack/prompts':
|
|
12
22
|
specifier: ^0.11.0
|
|
@@ -14,9 +24,6 @@ importers:
|
|
|
14
24
|
'@dotenvx/dotenvx':
|
|
15
25
|
specifier: ^1.51.4
|
|
16
26
|
version: 1.51.4
|
|
17
|
-
'@einja/dev-cli':
|
|
18
|
-
specifier: workspace:*
|
|
19
|
-
version: link:packages/cli
|
|
20
27
|
'@types/node':
|
|
21
28
|
specifier: ^25.0.3
|
|
22
29
|
version: 25.0.3
|
|
@@ -1094,6 +1101,12 @@ packages:
|
|
|
1094
1101
|
peerDependencies:
|
|
1095
1102
|
hono: ^4
|
|
1096
1103
|
|
|
1104
|
+
'@hono/zod-validator@0.7.6':
|
|
1105
|
+
resolution: {integrity: sha512-Io1B6d011Gj1KknV4rXYz4le5+5EubcWEU/speUjuw9XMMIaP3n78yXLhjd2A3PXaXaUwEAluOiAyLqhBEJgsw==}
|
|
1106
|
+
peerDependencies:
|
|
1107
|
+
hono: '>=3.9.0'
|
|
1108
|
+
zod: ^3.25.0 || ^4.0.0
|
|
1109
|
+
|
|
1097
1110
|
'@hookform/resolvers@5.2.2':
|
|
1098
1111
|
resolution: {integrity: sha512-A/IxlMLShx3KjV/HeTcTfaMxdwy690+L/ZADoeaTltLx+CVuzkeVIPuybK3jrRfw7YZnmdKsVVHAlEPIAEUNlA==}
|
|
1099
1112
|
peerDependencies:
|
|
@@ -5205,6 +5218,11 @@ snapshots:
|
|
|
5205
5218
|
dependencies:
|
|
5206
5219
|
hono: 4.11.3
|
|
5207
5220
|
|
|
5221
|
+
'@hono/zod-validator@0.7.6(hono@4.11.3)(zod@4.3.5)':
|
|
5222
|
+
dependencies:
|
|
5223
|
+
hono: 4.11.3
|
|
5224
|
+
zod: 4.3.5
|
|
5225
|
+
|
|
5208
5226
|
'@hookform/resolvers@5.2.2(react-hook-form@7.65.0(react@19.2.0))':
|
|
5209
5227
|
dependencies:
|
|
5210
5228
|
'@standard-schema/utils': 0.3.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/unset-volta-recursion.sh
RENAMED
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/validate-git-commit.sh
RENAMED
|
File without changes
|
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/.claude/hooks/einja/warn-relative-import.sh
RENAMED
|
File without changes
|
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/.claude/skills/create-einja-app-release/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/.cursor/commands/update-docs-by-task-specs.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/app/(authenticated)/layout-client.tsx
RENAMED
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/app/(authenticated)/layout.tsx
RENAMED
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/app/(authenticated)/profile/page.tsx
RENAMED
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/app/api/auth/[...nextauth]/route.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/application/use-cases/UserUseCases.ts
RENAMED
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/components/auth/login-button.tsx
RENAMED
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/components/auth/logout-button.tsx
RENAMED
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/components/auth/user-avatar.test.tsx
RENAMED
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/components/auth/user-avatar.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/components/shared/Sidebar.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/alert-dialog.tsx
RENAMED
|
File without changes
|
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/aspect-ratio.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/{turborepo-pandacss → default}/apps/web/src/components/ui/dialog-hook.tsx
RENAMED
|
File without changes
|
|
File without changes
|