create-einja-app 0.1.1
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 +307 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +1041 -0
- package/dist/cli.js.map +1 -0
- package/package.json +62 -0
- package/templates/turborepo-pandacss/.biomeignore +15 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/biome-format.sh +49 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/design-doc-check.sh +61 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/detect-secrets.sh +62 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/large-file-warning.sh +42 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/playwright-resize.sh +36 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/typecheck.sh +37 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/unset-volta-recursion.sh +32 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/validate-git-commit.sh +239 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/warn-index-ts.sh +34 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/warn-relative-import.sh +48 -0
- package/templates/turborepo-pandacss/.claude/settings.json +174 -0
- package/templates/turborepo-pandacss/.claude/skills/create-einja-app-release/SKILL.md +186 -0
- package/templates/turborepo-pandacss/.claude/skills/dev-cli-release/SKILL.md +173 -0
- package/templates/turborepo-pandacss/.cursor/commands/spec-create.md +227 -0
- package/templates/turborepo-pandacss/.cursor/commands/start-dev.md +98 -0
- package/templates/turborepo-pandacss/.cursor/commands/task-exec.md +287 -0
- package/templates/turborepo-pandacss/.cursor/commands/task-vibe-kanban-loop.md +532 -0
- package/templates/turborepo-pandacss/.cursor/commands/update-docs-by-task-specs.md +448 -0
- package/templates/turborepo-pandacss/.cursor/mcp.json +45 -0
- package/templates/turborepo-pandacss/.cursor/rules/api-rules.mdc +171 -0
- package/templates/turborepo-pandacss/.cursor/rules/api-test-rules.mdc +181 -0
- package/templates/turborepo-pandacss/.cursor/rules/base-code.mdc +70 -0
- package/templates/turborepo-pandacss/.cursor/rules/base-commit-rules.mdc +174 -0
- package/templates/turborepo-pandacss/.cursor/rules/base-design.mdc +12 -0
- package/templates/turborepo-pandacss/.cursor/rules/base-rules.mdc +231 -0
- package/templates/turborepo-pandacss/.cursor/rules/error-handling-rules.mdc +188 -0
- package/templates/turborepo-pandacss/.cursor/rules/refactor-rules.mdc +93 -0
- package/templates/turborepo-pandacss/.dockerignore +126 -0
- package/templates/turborepo-pandacss/.einja-sync.json +35 -0
- package/templates/turborepo-pandacss/.env.ci +25 -0
- package/templates/turborepo-pandacss/.env.example +35 -0
- package/templates/turborepo-pandacss/.env.personal.example +27 -0
- package/templates/turborepo-pandacss/.envrc +4 -0
- package/templates/turborepo-pandacss/.gitattributes +5 -0
- package/templates/turborepo-pandacss/.husky/pre-commit +1 -0
- package/templates/turborepo-pandacss/.lintstagedrc.js +24 -0
- package/templates/turborepo-pandacss/.mcp.json +45 -0
- package/templates/turborepo-pandacss/.node-version +1 -0
- package/templates/turborepo-pandacss/.templateignore +60 -0
- package/templates/turborepo-pandacss/.vscode/extensions.json +3 -0
- package/templates/turborepo-pandacss/CLAUDE.md +415 -0
- package/templates/turborepo-pandacss/README.md +322 -0
- package/templates/turborepo-pandacss/apps/web/middleware.ts +28 -0
- package/templates/turborepo-pandacss/apps/web/next.config.ts +10 -0
- package/templates/turborepo-pandacss/apps/web/package.json +80 -0
- package/templates/turborepo-pandacss/apps/web/panda.config.ts +114 -0
- package/templates/turborepo-pandacss/apps/web/postcss.config.cjs +6 -0
- package/templates/turborepo-pandacss/apps/web/public/file.svg +1 -0
- package/templates/turborepo-pandacss/apps/web/public/globe.svg +1 -0
- package/templates/turborepo-pandacss/apps/web/public/next.svg +1 -0
- package/templates/turborepo-pandacss/apps/web/public/vercel.svg +1 -0
- package/templates/turborepo-pandacss/apps/web/public/window.svg +1 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/dashboard/page.tsx +79 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/data/_components/UserTable.tsx +203 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/data/page.tsx +57 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/layout-client.tsx +31 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/layout.tsx +17 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/profile/page.tsx +59 -0
- package/templates/turborepo-pandacss/apps/web/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/templates/turborepo-pandacss/apps/web/src/app/api/auth/signup/route.ts +70 -0
- package/templates/turborepo-pandacss/apps/web/src/app/error.tsx +106 -0
- package/templates/turborepo-pandacss/apps/web/src/app/favicon.ico +0 -0
- package/templates/turborepo-pandacss/apps/web/src/app/global-error.tsx +110 -0
- package/templates/turborepo-pandacss/apps/web/src/app/globals.css +121 -0
- package/templates/turborepo-pandacss/apps/web/src/app/layout.tsx +28 -0
- package/templates/turborepo-pandacss/apps/web/src/app/not-found.tsx +54 -0
- package/templates/turborepo-pandacss/apps/web/src/app/page.module.css +165 -0
- package/templates/turborepo-pandacss/apps/web/src/app/page.test.tsx +52 -0
- package/templates/turborepo-pandacss/apps/web/src/app/page.tsx +284 -0
- package/templates/turborepo-pandacss/apps/web/src/app/signin/page.tsx +296 -0
- package/templates/turborepo-pandacss/apps/web/src/app/signup/page.tsx +395 -0
- package/templates/turborepo-pandacss/apps/web/src/application/use-cases/UserUseCases.test.ts +229 -0
- package/templates/turborepo-pandacss/apps/web/src/application/use-cases/UserUseCases.ts +115 -0
- package/templates/turborepo-pandacss/apps/web/src/components/auth/login-button.tsx +35 -0
- package/templates/turborepo-pandacss/apps/web/src/components/auth/logout-button.tsx +24 -0
- package/templates/turborepo-pandacss/apps/web/src/components/auth/user-avatar.test.tsx +68 -0
- package/templates/turborepo-pandacss/apps/web/src/components/auth/user-avatar.tsx +43 -0
- package/templates/turborepo-pandacss/apps/web/src/components/dashboard/dashboard-stats.tsx +128 -0
- package/templates/turborepo-pandacss/apps/web/src/components/providers/query-provider.tsx +30 -0
- package/templates/turborepo-pandacss/apps/web/src/components/providers/session-provider.tsx +12 -0
- package/templates/turborepo-pandacss/apps/web/src/components/shared/Sidebar.tsx +175 -0
- package/templates/turborepo-pandacss/apps/web/src/components/shared/header.tsx +166 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/accordion.tsx +64 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/alert-dialog.tsx +135 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/alert.tsx +60 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/aspect-ratio.tsx +9 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/avatar.tsx +41 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/badge.tsx +39 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/breadcrumb.tsx +101 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/button.tsx +56 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/card.tsx +75 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/checkbox.tsx +29 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/data-table.tsx +189 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/dialog-hook.tsx +210 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/dialog.tsx +129 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/drawer.tsx +124 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/dropdown-menu.tsx +228 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/form.tsx +152 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/hover-card.tsx +38 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/input.tsx +21 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/label.tsx +21 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/pagination.tsx +105 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/popover.tsx +42 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/progress.tsx +28 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/select.tsx +170 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/separator.tsx +28 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/skeleton.tsx +13 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/sonner.tsx +25 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/table.tsx +92 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/tabs.tsx +54 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/textarea.tsx +18 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/tooltip.tsx +57 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/typography.tsx +158 -0
- package/templates/turborepo-pandacss/apps/web/src/lib/auth/guard.ts +36 -0
- package/templates/turborepo-pandacss/apps/web/src/lib/auth/index.ts +22 -0
- package/templates/turborepo-pandacss/apps/web/src/lib/prisma.ts +3 -0
- package/templates/turborepo-pandacss/apps/web/src/lib/utils.ts +6 -0
- package/templates/turborepo-pandacss/apps/web/test/globals.d.ts +1 -0
- package/templates/turborepo-pandacss/apps/web/test/matchers.d.ts +1 -0
- package/templates/turborepo-pandacss/apps/web/test/setup.ts +22 -0
- package/templates/turborepo-pandacss/apps/web/tsconfig.json +37 -0
- package/templates/turborepo-pandacss/apps/web/vitest.config.ts +20 -0
- package/templates/turborepo-pandacss/apps/web/vitest.d.ts +2 -0
- package/templates/turborepo-pandacss/biome.json +60 -0
- package/templates/turborepo-pandacss/components.json +21 -0
- package/templates/turborepo-pandacss/docker-compose.yml +27 -0
- package/templates/turborepo-pandacss/middleware.ts +32 -0
- package/templates/turborepo-pandacss/next.config.ts +10 -0
- package/templates/turborepo-pandacss/package-lock.json +9346 -0
- package/templates/turborepo-pandacss/package.json +64 -0
- package/templates/turborepo-pandacss/packages/config/package.json +41 -0
- package/templates/turborepo-pandacss/packages/config/panda.config.ts +114 -0
- package/templates/turborepo-pandacss/packages/config/src/index.ts +24 -0
- package/templates/turborepo-pandacss/packages/config/src/worktree-config-loader.ts +129 -0
- package/templates/turborepo-pandacss/packages/config/src/worktree-config.ts +75 -0
- package/templates/turborepo-pandacss/packages/config/tsconfig.build.json +19 -0
- package/templates/turborepo-pandacss/packages/config/tsconfig.json +24 -0
- package/templates/turborepo-pandacss/packages/config/typescript/base.json +19 -0
- package/templates/turborepo-pandacss/packages/front-core/package.json +24 -0
- package/templates/turborepo-pandacss/packages/front-core/src/auth/config.ts +84 -0
- package/templates/turborepo-pandacss/packages/front-core/src/auth/index.ts +5 -0
- package/templates/turborepo-pandacss/packages/front-core/src/auth/types/next-auth.d.ts +20 -0
- package/templates/turborepo-pandacss/packages/front-core/src/auth/utils.ts +29 -0
- package/templates/turborepo-pandacss/packages/front-core/src/context/index.ts +2 -0
- package/templates/turborepo-pandacss/packages/front-core/src/hooks/index.ts +2 -0
- package/templates/turborepo-pandacss/packages/front-core/src/index.ts +4 -0
- package/templates/turborepo-pandacss/packages/front-core/src/utils/index.ts +2 -0
- package/templates/turborepo-pandacss/packages/front-core/tsconfig.json +14 -0
- package/templates/turborepo-pandacss/packages/server-core/package.json +32 -0
- package/templates/turborepo-pandacss/packages/server-core/prisma/schema.prisma +102 -0
- package/templates/turborepo-pandacss/packages/server-core/prisma/seed.ts +67 -0
- package/templates/turborepo-pandacss/packages/server-core/prisma.config.ts +8 -0
- package/templates/turborepo-pandacss/packages/server-core/src/__generated__/fabbrica/index.d.ts +270 -0
- package/templates/turborepo-pandacss/packages/server-core/src/__generated__/fabbrica/index.js +484 -0
- package/templates/turborepo-pandacss/packages/server-core/src/core/result.test.ts +78 -0
- package/templates/turborepo-pandacss/packages/server-core/src/core/result.ts +53 -0
- package/templates/turborepo-pandacss/packages/server-core/src/domain/.gitkeep +0 -0
- package/templates/turborepo-pandacss/packages/server-core/src/domain/entities/User.test.ts +232 -0
- package/templates/turborepo-pandacss/packages/server-core/src/domain/entities/User.ts +105 -0
- package/templates/turborepo-pandacss/packages/server-core/src/domain/repository-interfaces/IUserRepository.ts +101 -0
- package/templates/turborepo-pandacss/packages/server-core/src/infrastructure/database/client.ts +15 -0
- package/templates/turborepo-pandacss/packages/server-core/src/infrastructure/database/mappers/UserMapper.test.ts +278 -0
- package/templates/turborepo-pandacss/packages/server-core/src/infrastructure/database/mappers/UserMapper.ts +103 -0
- package/templates/turborepo-pandacss/packages/server-core/src/infrastructure/database/repositories/UserRepository.test.ts +317 -0
- package/templates/turborepo-pandacss/packages/server-core/src/infrastructure/database/repositories/UserRepository.ts +169 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/factories/index.ts +22 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/factories/user.factory.ts +123 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/fixtures/users.ts +92 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/helpers/date.ts +49 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/helpers/password.ts +50 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/index.ts +26 -0
- package/templates/turborepo-pandacss/packages/server-core/tsconfig.json +14 -0
- package/templates/turborepo-pandacss/packages/server-core/vitest.config.ts +15 -0
- package/templates/turborepo-pandacss/packages/ui/package.json +37 -0
- package/templates/turborepo-pandacss/packages/ui/src/accordion.tsx +66 -0
- package/templates/turborepo-pandacss/packages/ui/src/alert-dialog.tsx +157 -0
- package/templates/turborepo-pandacss/packages/ui/src/alert.tsx +66 -0
- package/templates/turborepo-pandacss/packages/ui/src/aspect-ratio.tsx +11 -0
- package/templates/turborepo-pandacss/packages/ui/src/avatar.tsx +53 -0
- package/templates/turborepo-pandacss/packages/ui/src/badge.tsx +46 -0
- package/templates/turborepo-pandacss/packages/ui/src/breadcrumb.tsx +108 -0
- package/templates/turborepo-pandacss/packages/ui/src/button.tsx +59 -0
- package/templates/turborepo-pandacss/packages/ui/src/card.tsx +92 -0
- package/templates/turborepo-pandacss/packages/ui/src/checkbox.tsx +32 -0
- package/templates/turborepo-pandacss/packages/ui/src/data-table.tsx +216 -0
- package/templates/turborepo-pandacss/packages/ui/src/dialog-hook.tsx +226 -0
- package/templates/turborepo-pandacss/packages/ui/src/dialog.tsx +143 -0
- package/templates/turborepo-pandacss/packages/ui/src/drawer.tsx +135 -0
- package/templates/turborepo-pandacss/packages/ui/src/dropdown-menu.tsx +257 -0
- package/templates/turborepo-pandacss/packages/ui/src/form.tsx +168 -0
- package/templates/turborepo-pandacss/packages/ui/src/hover-card.tsx +44 -0
- package/templates/turborepo-pandacss/packages/ui/src/input.tsx +21 -0
- package/templates/turborepo-pandacss/packages/ui/src/label.tsx +24 -0
- package/templates/turborepo-pandacss/packages/ui/src/lib/utils.ts +6 -0
- package/templates/turborepo-pandacss/packages/ui/src/pagination.tsx +126 -0
- package/templates/turborepo-pandacss/packages/ui/src/popover.tsx +48 -0
- package/templates/turborepo-pandacss/packages/ui/src/progress.tsx +31 -0
- package/templates/turborepo-pandacss/packages/ui/src/select.tsx +185 -0
- package/templates/turborepo-pandacss/packages/ui/src/separator.tsx +28 -0
- package/templates/turborepo-pandacss/packages/ui/src/skeleton.tsx +13 -0
- package/templates/turborepo-pandacss/packages/ui/src/sonner.tsx +25 -0
- package/templates/turborepo-pandacss/packages/ui/src/table.tsx +116 -0
- package/templates/turborepo-pandacss/packages/ui/src/tabs.tsx +66 -0
- package/templates/turborepo-pandacss/packages/ui/src/textarea.tsx +18 -0
- package/templates/turborepo-pandacss/packages/ui/src/tooltip.tsx +61 -0
- package/templates/turborepo-pandacss/packages/ui/src/typography.tsx +187 -0
- package/templates/turborepo-pandacss/packages/ui/tsconfig.json +20 -0
- package/templates/turborepo-pandacss/panda.config.ts +114 -0
- package/templates/turborepo-pandacss/pnpm-lock.yaml +9032 -0
- package/templates/turborepo-pandacss/pnpm-workspace.yaml +11 -0
- package/templates/turborepo-pandacss/postcss.config.cjs +6 -0
- package/templates/turborepo-pandacss/prisma/schema.prisma +82 -0
- package/templates/turborepo-pandacss/public/file.svg +1 -0
- package/templates/turborepo-pandacss/public/globe.svg +1 -0
- package/templates/turborepo-pandacss/public/next.svg +1 -0
- package/templates/turborepo-pandacss/public/vercel.svg +1 -0
- package/templates/turborepo-pandacss/public/window.svg +1 -0
- package/templates/turborepo-pandacss/scripts/cli-template-update.ts +387 -0
- package/templates/turborepo-pandacss/scripts/env-show.ts +129 -0
- package/templates/turborepo-pandacss/scripts/env.ts +555 -0
- package/templates/turborepo-pandacss/scripts/init.sh +92 -0
- package/templates/turborepo-pandacss/scripts/setup-dev.ts +640 -0
- package/templates/turborepo-pandacss/scripts/template-update.ts +277 -0
- package/templates/turborepo-pandacss/scripts/worktree/dev.ts +872 -0
- package/templates/turborepo-pandacss/test/globals.d.ts +1 -0
- package/templates/turborepo-pandacss/test/setup.ts +22 -0
- package/templates/turborepo-pandacss/tsconfig.json +46 -0
- package/templates/turborepo-pandacss/turbo.json +57 -0
- package/templates/turborepo-pandacss/vitest.config.ts +20 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# einja-management-template
|
|
2
|
+
|
|
3
|
+
いいんじゃ管理画面テンプレート - Turborepo + pnpm モノレポ構成
|
|
4
|
+
|
|
5
|
+
## プロジェクト構成
|
|
6
|
+
|
|
7
|
+
このプロジェクトは**Turborepo**を使用したモノレポ構成です。
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
einja-management-template/
|
|
11
|
+
├── apps/
|
|
12
|
+
│ └── web/ # メイン管理画面アプリ
|
|
13
|
+
│ ├── src/
|
|
14
|
+
│ │ ├── app/ # Next.js App Router
|
|
15
|
+
│ │ ├── components/ # アプリ固有のコンポーネント
|
|
16
|
+
│ │ └── lib/
|
|
17
|
+
│ │ ├── auth/ # アプリ固有の認証設定
|
|
18
|
+
│ │ └── ... # アプリ固有のユーティリティ
|
|
19
|
+
│ ├── package.json
|
|
20
|
+
│ └── tsconfig.json
|
|
21
|
+
├── packages/
|
|
22
|
+
│ ├── config/ # 共通設定(Biome, TypeScript, Panda CSS)
|
|
23
|
+
│ ├── front-core/ # フロントエンド共通層
|
|
24
|
+
│ │ └── src/
|
|
25
|
+
│ │ ├── auth/ # NextAuth共通設定・型定義
|
|
26
|
+
│ │ ├── hooks/ # 共通hooks
|
|
27
|
+
│ │ ├── utils/ # 共通ユーティリティ
|
|
28
|
+
│ │ └── context/ # 共通context
|
|
29
|
+
│ ├── server-core/ # バックエンド共通層
|
|
30
|
+
│ │ ├── prisma/ # Prismaスキーマ
|
|
31
|
+
│ │ └── src/
|
|
32
|
+
│ │ ├── domain/ # ドメイン層
|
|
33
|
+
│ │ ├── infrastructure/ # Prismaクライアント等
|
|
34
|
+
│ │ └── utils/ # 共通ユーティリティ
|
|
35
|
+
│ └── ui/ # 共通UIコンポーネント(shadcn/ui)
|
|
36
|
+
├── turbo.json # Turborepoの設定
|
|
37
|
+
├── pnpm-workspace.yaml # pnpmワークスペース設定
|
|
38
|
+
└── package.json # ルートpackage.json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 技術スタック
|
|
42
|
+
|
|
43
|
+
- **モノレポ**: Turborepo + pnpm workspaces
|
|
44
|
+
- **フレームワーク**: Next.js 15 (App Router)
|
|
45
|
+
- **言語**: TypeScript (strict mode)
|
|
46
|
+
- **スタイリング**: Panda CSS
|
|
47
|
+
- **UI**: shadcn/ui + Radix UI
|
|
48
|
+
- **データベース**: PostgreSQL + Prisma
|
|
49
|
+
- **認証**: NextAuth.js v5
|
|
50
|
+
- **状態管理**: TanStack Query (React Query)
|
|
51
|
+
- **テスト**: Vitest + React Testing Library + Playwright
|
|
52
|
+
- **Linter/Formatter**: Biome
|
|
53
|
+
- **Git Hooks**: Husky + lint-staged
|
|
54
|
+
|
|
55
|
+
## 開発環境セットアップ
|
|
56
|
+
|
|
57
|
+
### 初回セットアップ(初めての方)
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# 1. リポジトリをクローン
|
|
61
|
+
git clone <repository-url>
|
|
62
|
+
cd einja-management-template
|
|
63
|
+
|
|
64
|
+
# 2. Volta/Node/pnpmをインストール(初回のみ)
|
|
65
|
+
./scripts/init.sh
|
|
66
|
+
|
|
67
|
+
# 3. ターミナルを再起動
|
|
68
|
+
exec $SHELL
|
|
69
|
+
|
|
70
|
+
# 4. 環境セットアップ(.env、DB起動・初期化)
|
|
71
|
+
pnpm dev:setup
|
|
72
|
+
|
|
73
|
+
# 5. 開発サーバー起動(バックグラウンド)
|
|
74
|
+
pnpm dev:bg
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
ログは `log/dev.log` に出力されます。
|
|
78
|
+
ブラウザで http://localhost:3000(またはWorktreeで自動割り当てされたポート)を開く
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### コマンドの役割
|
|
83
|
+
|
|
84
|
+
| コマンド | タイミング | 内容 |
|
|
85
|
+
|---------|-----------|------|
|
|
86
|
+
| `./scripts/init.sh` | 初回のみ | Volta/Node/pnpmのインストール |
|
|
87
|
+
| `pnpm dev:setup` | 初回 + 環境変更時 | .env作成、DB起動・初期化 |
|
|
88
|
+
| `pnpm dev:bg` | 毎回 | 開発サーバー起動(バックグラウンド・推奨) |
|
|
89
|
+
| `pnpm dev:status` | 随時 | 開発サーバーの状態確認 |
|
|
90
|
+
| `pnpm dev:stop` | 随時 | 開発サーバーを停止 |
|
|
91
|
+
| `pnpm env:update` | 随時 | 環境変数の設定・変更(対話式ウィザード) |
|
|
92
|
+
|
|
93
|
+
## 主要コマンド
|
|
94
|
+
|
|
95
|
+
### 開発
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
pnpm dev:bg # 開発サーバーをバックグラウンドで起動(推奨)
|
|
99
|
+
pnpm dev:status # 開発サーバーの状態確認
|
|
100
|
+
pnpm dev:logs # ログをリアルタイム表示
|
|
101
|
+
pnpm dev:stop # 開発サーバーを停止
|
|
102
|
+
pnpm dev # フォアグラウンドで起動(ターミナル直接操作時のみ)
|
|
103
|
+
pnpm build # 全アプリのプロダクションビルド
|
|
104
|
+
pnpm start # プロダクションサーバーを起動
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 環境変数の管理
|
|
108
|
+
|
|
109
|
+
対話式ウィザードで環境変数を設定・変更できます:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pnpm env:update
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
#### メニュー
|
|
116
|
+
|
|
117
|
+
1. **個人トークンを設定** - `GITHUB_TOKEN` 等の個人用トークンを `.env.personal` に設定
|
|
118
|
+
2. **環境設定を変更** - 各環境の暗号化された設定ファイルを編集
|
|
119
|
+
3. **現在の状態を確認** - 環境変数の設定状況を表示
|
|
120
|
+
|
|
121
|
+
#### 対応環境
|
|
122
|
+
|
|
123
|
+
| 環境 | ファイル | 用途 |
|
|
124
|
+
|------|----------|------|
|
|
125
|
+
| ローカル開発 | `.env.local` | ローカル開発環境 |
|
|
126
|
+
| 開発 | `.env.development` | 開発環境 |
|
|
127
|
+
| ステージング | `.env.staging` | ステージング環境 |
|
|
128
|
+
| 本番 | `.env.production` | 本番環境 |
|
|
129
|
+
| CI | `.env.ci` | CI環境 |
|
|
130
|
+
|
|
131
|
+
> **Note**: 環境設定の変更には `.env.keys` の秘密鍵が必要です。本番環境の変更時は追加の確認が表示されます。
|
|
132
|
+
|
|
133
|
+
### コード品質
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
pnpm lint # Biome linterでコードをチェック
|
|
137
|
+
pnpm lint:fix # Biomeで自動的にlintの問題を修正
|
|
138
|
+
pnpm format # Biomeでコードフォーマットをチェック
|
|
139
|
+
pnpm format:fix # Biomeでコードを自動フォーマット
|
|
140
|
+
pnpm typecheck # TypeScriptの型チェック
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### テスト
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
pnpm test # Vitestでテスト実行
|
|
147
|
+
pnpm test:watch # Vitestウォッチモード
|
|
148
|
+
pnpm test:ui # Vitest UIモード
|
|
149
|
+
pnpm test:coverage # カバレッジ付きテスト
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### データベース
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
pnpm db:generate # Prismaクライアント生成
|
|
156
|
+
pnpm db:push # データベースマイグレーション
|
|
157
|
+
pnpm db:migrate # マイグレーションファイル作成&実行
|
|
158
|
+
pnpm db:studio # Prisma Studio起動
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### ワークスペース固有のコマンド
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# 特定のワークスペースでコマンド実行
|
|
165
|
+
pnpm --filter @repo/web dev
|
|
166
|
+
pnpm --filter @repo/web build
|
|
167
|
+
pnpm --filter @repo/web panda codegen
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## データベース設定
|
|
171
|
+
|
|
172
|
+
### Docker Compose サービス
|
|
173
|
+
|
|
174
|
+
- **postgres**: PostgreSQL 15
|
|
175
|
+
- ポート: `${POSTGRES_PORT:-25432}` (ホスト) → 5432 (コンテナ)
|
|
176
|
+
- データベース: ブランチ名から自動生成(例: `main`, `feature_auth`)
|
|
177
|
+
- ユーザー: `postgres`
|
|
178
|
+
- パスワード: `postgres`
|
|
179
|
+
|
|
180
|
+
### 便利なコマンド
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
# ログを確認
|
|
184
|
+
docker-compose logs -f postgres
|
|
185
|
+
|
|
186
|
+
# データベースに直接接続
|
|
187
|
+
docker-compose exec postgres psql -U postgres -d einja_management
|
|
188
|
+
|
|
189
|
+
# データベースをリセット
|
|
190
|
+
docker-compose down -v
|
|
191
|
+
docker-compose up -d postgres
|
|
192
|
+
pnpm db:push
|
|
193
|
+
|
|
194
|
+
# Prisma Studio を起動
|
|
195
|
+
pnpm db:studio
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## ディレクトリ構造の詳細
|
|
199
|
+
|
|
200
|
+
### apps/web
|
|
201
|
+
|
|
202
|
+
メイン管理画面アプリケーション
|
|
203
|
+
|
|
204
|
+
- **src/app**: Next.js App Router(ページ、レイアウト、API)
|
|
205
|
+
- **src/components**: アプリ固有のコンポーネント
|
|
206
|
+
- `ui/`: 基本的なUIコンポーネント
|
|
207
|
+
- `shared/`: 共通コンポーネント(Header, Sidebarなど)
|
|
208
|
+
- **src/lib**: ユーティリティ、認証設定など
|
|
209
|
+
|
|
210
|
+
### packages
|
|
211
|
+
|
|
212
|
+
- **@repo/config**: Biome, TypeScript, Panda CSSの共通設定
|
|
213
|
+
- **@repo/front-core**: フロントエンド共通層(認証共通設定、hooks、utils、context)
|
|
214
|
+
- **@repo/server-core**: バックエンド共通層(Prismaクライアント・スキーマ、ドメインロジック)
|
|
215
|
+
- **@repo/ui**: 共通UIコンポーネント(shadcn/ui)
|
|
216
|
+
- **@einja/dev-cli**: Claude Code設定配布CLI([詳細](./packages/cli/README.md))
|
|
217
|
+
|
|
218
|
+
## CLI パッケージ (@einja/dev-cli)
|
|
219
|
+
|
|
220
|
+
Claude Code用の`.claude`設定ディレクトリを配布するCLIツールです。
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
# 新規プロジェクトへのセットアップ
|
|
224
|
+
npx @einja/dev-cli init
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### 配布内容
|
|
228
|
+
|
|
229
|
+
- `.claude/` - エージェント、コマンド、スキル、hooks
|
|
230
|
+
- `docs/einja/` - テンプレート、ステアリングドキュメント
|
|
231
|
+
- `CLAUDE.md` - プロジェクト設定テンプレート
|
|
232
|
+
|
|
233
|
+
### 関連ドキュメント
|
|
234
|
+
|
|
235
|
+
- [CLI README](./packages/cli/README.md) - 使用方法
|
|
236
|
+
- [ビルドプロセス](./packages/cli/docs/BUILD.md) - ビルドパイプラインの説明
|
|
237
|
+
- [NPM公開手順](./packages/cli/docs/PUBLISHING.md) - リリース手順
|
|
238
|
+
- [リリース手順](./packages/cli/RELEASING.md) - バージョン管理とタグプッシュ
|
|
239
|
+
|
|
240
|
+
## 開発ワークフロー
|
|
241
|
+
|
|
242
|
+
1. ブランチを作成
|
|
243
|
+
2. コードを変更
|
|
244
|
+
3. ホットリロードで即座に反映
|
|
245
|
+
4. データベーススキーマを変更した場合は `pnpm db:push`
|
|
246
|
+
5. Panda CSSのスタイル変更時は自動生成される
|
|
247
|
+
6. コミット前に自動的にlint-stagedが実行される
|
|
248
|
+
7. プルリクエストを作成
|
|
249
|
+
|
|
250
|
+
## トラブルシューティング
|
|
251
|
+
|
|
252
|
+
### Volta関連エラー
|
|
253
|
+
|
|
254
|
+
**`zsh: command not found: volta`**
|
|
255
|
+
|
|
256
|
+
ターミナルを開き直してください。それでも解決しない場合:
|
|
257
|
+
```bash
|
|
258
|
+
source ~/.zshrc
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**`Volta error: Node is not available`**
|
|
262
|
+
|
|
263
|
+
Node.jsがインストールされていません:
|
|
264
|
+
```bash
|
|
265
|
+
volta install node@22.16.0 pnpm@10.14.0
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**`pnpm: command not found`**
|
|
269
|
+
|
|
270
|
+
pnpmがインストールされていません:
|
|
271
|
+
```bash
|
|
272
|
+
volta install pnpm@10.14.0
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Panda CSS関連エラー
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# styled-systemを再生成
|
|
279
|
+
pnpm --filter @repo/web panda codegen
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Prisma関連エラー
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
# Prismaクライアントを再生成
|
|
286
|
+
pnpm db:generate
|
|
287
|
+
|
|
288
|
+
# データベースをリセット
|
|
289
|
+
docker-compose down -v
|
|
290
|
+
docker-compose up -d postgres
|
|
291
|
+
pnpm db:push
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### 依存関係の問題
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
# node_modulesをクリーンアップ
|
|
298
|
+
rm -rf node_modules apps/*/node_modules packages/*/node_modules
|
|
299
|
+
rm pnpm-lock.yaml
|
|
300
|
+
pnpm install
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Turborepoキャッシュのクリア
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
# .turboディレクトリを削除
|
|
307
|
+
rm -rf .turbo apps/*/.turbo packages/*/.turbo
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## コーディング規約
|
|
311
|
+
|
|
312
|
+
詳細は以下のドキュメントを参照してください:
|
|
313
|
+
|
|
314
|
+
- [コーディング規約](./.claude/skills/einja-coding-standards/SKILL.md)
|
|
315
|
+
- [コンポーネント設計ガイドライン](./.claude/skills/einja-component-design/SKILL.md)
|
|
316
|
+
- [テスト戦略](./docs/einja/steering/development/testing-strategy.md)
|
|
317
|
+
- [コードレビューガイドライン](./docs/einja/steering/development/review-guidelines.md)
|
|
318
|
+
- [コミットルール](./docs/einja/steering/commit-rules.md)
|
|
319
|
+
|
|
320
|
+
## ライセンス
|
|
321
|
+
|
|
322
|
+
Proprietary
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { auth } from "@/lib/auth";
|
|
2
|
+
|
|
3
|
+
export default auth((req) => {
|
|
4
|
+
const { nextUrl } = req;
|
|
5
|
+
const isLoggedIn = !!req.auth;
|
|
6
|
+
|
|
7
|
+
// Protected routes that require authentication
|
|
8
|
+
const protectedRoutes = ["/dashboard", "/profile"];
|
|
9
|
+
const isProtectedRoute = protectedRoutes.some((route) => nextUrl.pathname.startsWith(route));
|
|
10
|
+
|
|
11
|
+
// Public routes that authenticated users shouldn't access
|
|
12
|
+
const publicRoutes = ["/signin", "/signup"];
|
|
13
|
+
const isPublicRoute = publicRoutes.some((route) => nextUrl.pathname.startsWith(route));
|
|
14
|
+
|
|
15
|
+
// Redirect authenticated users away from public routes to dashboard
|
|
16
|
+
if (isLoggedIn && isPublicRoute) {
|
|
17
|
+
return Response.redirect(new URL("/dashboard", nextUrl));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Redirect unauthenticated users to signin
|
|
21
|
+
if (!isLoggedIn && isProtectedRoute) {
|
|
22
|
+
return Response.redirect(new URL("/signin", nextUrl));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const config = {
|
|
27
|
+
matcher: ["/((?!api|_next/static|_next/image|favicon.ico).*)"],
|
|
28
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@repo/web",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rm -rf .next && next dev --turbopack --port ${PORT_WEB:-3000}",
|
|
7
|
+
"build": "panda codegen && next build",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"panda": "panda codegen",
|
|
10
|
+
"lint": "biome check .",
|
|
11
|
+
"lint:fix": "biome check --write",
|
|
12
|
+
"format": "biome format .",
|
|
13
|
+
"format:fix": "biome format --write .",
|
|
14
|
+
"typecheck": "tsc --noEmit",
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"test:watch": "vitest",
|
|
17
|
+
"test:ui": "vitest --ui",
|
|
18
|
+
"test:coverage": "vitest run --coverage"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@repo/front-core": "workspace:*",
|
|
22
|
+
"@repo/server-core": "workspace:*",
|
|
23
|
+
"@repo/ui": "workspace:*",
|
|
24
|
+
"@hookform/resolvers": "^5.1.1",
|
|
25
|
+
"@radix-ui/react-accordion": "^1.2.11",
|
|
26
|
+
"@radix-ui/react-alert-dialog": "^1.1.14",
|
|
27
|
+
"@radix-ui/react-aspect-ratio": "^1.1.7",
|
|
28
|
+
"@radix-ui/react-avatar": "^1.1.10",
|
|
29
|
+
"@radix-ui/react-checkbox": "^1.3.2",
|
|
30
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
31
|
+
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
32
|
+
"@radix-ui/react-hover-card": "^1.1.14",
|
|
33
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
34
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
35
|
+
"@radix-ui/react-popover": "^1.1.14",
|
|
36
|
+
"@radix-ui/react-progress": "^1.1.7",
|
|
37
|
+
"@radix-ui/react-select": "^2.2.5",
|
|
38
|
+
"@radix-ui/react-separator": "^1.1.7",
|
|
39
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
40
|
+
"@radix-ui/react-tabs": "^1.1.12",
|
|
41
|
+
"@radix-ui/react-tooltip": "^1.2.7",
|
|
42
|
+
"@tailwindcss/postcss": "^4.1.10",
|
|
43
|
+
"@tanstack/react-query": "^5.81.5",
|
|
44
|
+
"@tanstack/react-table": "^8.21.3",
|
|
45
|
+
"bcryptjs": "^3.0.2",
|
|
46
|
+
"class-variance-authority": "^0.7.1",
|
|
47
|
+
"clsx": "^2.1.1",
|
|
48
|
+
"lucide-react": "^0.523.0",
|
|
49
|
+
"next": "15.3.3",
|
|
50
|
+
"next-auth": "^5.0.0-beta.28",
|
|
51
|
+
"next-themes": "^0.4.6",
|
|
52
|
+
"postcss": "^8.5.6",
|
|
53
|
+
"react": "^19.0.0",
|
|
54
|
+
"react-dom": "^19.0.0",
|
|
55
|
+
"react-hook-form": "^7.59.0",
|
|
56
|
+
"sonner": "^2.0.5",
|
|
57
|
+
"tailwind-merge": "^3.3.1",
|
|
58
|
+
"tailwindcss": "^4.1.10",
|
|
59
|
+
"vaul": "^1.1.2",
|
|
60
|
+
"zod": "^3.25.67"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@biomejs/biome": "1.9.4",
|
|
64
|
+
"@repo/config": "workspace:*",
|
|
65
|
+
"@pandacss/dev": "^0.53.7",
|
|
66
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
67
|
+
"@testing-library/react": "^16.3.0",
|
|
68
|
+
"@types/bcryptjs": "^2.4.6",
|
|
69
|
+
"@types/node": "^22",
|
|
70
|
+
"@types/react": "^19",
|
|
71
|
+
"@types/react-dom": "^19",
|
|
72
|
+
"@vitest/browser": "^3.2.3",
|
|
73
|
+
"@vitest/coverage-v8": "^3.2.3",
|
|
74
|
+
"jsdom": "^26.1.0",
|
|
75
|
+
"playwright": "^1.53.0",
|
|
76
|
+
"tw-animate-css": "^1.3.4",
|
|
77
|
+
"typescript": "^5",
|
|
78
|
+
"vitest": "^3.2.2"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { defineConfig } from "@pandacss/dev";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
// TailwindCSSとの共存のためpreflightを無効化
|
|
5
|
+
preflight: false,
|
|
6
|
+
|
|
7
|
+
// Where to look for your css declarations
|
|
8
|
+
include: ["./src/**/*.{js,jsx,ts,tsx}", "./pages/**/*.{js,jsx,ts,tsx}"],
|
|
9
|
+
|
|
10
|
+
// Files to exclude
|
|
11
|
+
exclude: [],
|
|
12
|
+
|
|
13
|
+
// Panda CSSクラスにプレフィックスを付けてTailwindと区別
|
|
14
|
+
prefix: "panda",
|
|
15
|
+
|
|
16
|
+
// Useful for theme customization
|
|
17
|
+
theme: {
|
|
18
|
+
extend: {
|
|
19
|
+
breakpoints: {
|
|
20
|
+
sm: "640px",
|
|
21
|
+
md: "768px",
|
|
22
|
+
lg: "1024px",
|
|
23
|
+
xl: "1280px",
|
|
24
|
+
"2xl": "1440px",
|
|
25
|
+
},
|
|
26
|
+
tokens: {
|
|
27
|
+
colors: {
|
|
28
|
+
// shadcnのカラーシステムと互換性を保つ
|
|
29
|
+
border: { value: "hsl(214.3 31.8% 91.4%)" },
|
|
30
|
+
input: { value: "hsl(214.3 31.8% 91.4%)" },
|
|
31
|
+
ring: { value: "hsl(222.2 84% 4.9%)" },
|
|
32
|
+
background: { value: "hsl(0 0% 100%)" },
|
|
33
|
+
foreground: { value: "hsl(222.2 84% 4.9%)" },
|
|
34
|
+
primary: {
|
|
35
|
+
DEFAULT: { value: "hsl(222.2 47.4% 11.2%)" },
|
|
36
|
+
foreground: { value: "hsl(210 40% 98%)" },
|
|
37
|
+
},
|
|
38
|
+
secondary: {
|
|
39
|
+
DEFAULT: { value: "hsl(210 40% 96%)" },
|
|
40
|
+
foreground: { value: "hsl(222.2 84% 4.9%)" },
|
|
41
|
+
},
|
|
42
|
+
destructive: {
|
|
43
|
+
DEFAULT: { value: "hsl(0 62.8% 30.6%)" },
|
|
44
|
+
foreground: { value: "hsl(210 40% 98%)" },
|
|
45
|
+
},
|
|
46
|
+
muted: {
|
|
47
|
+
DEFAULT: { value: "hsl(210 40% 96%)" },
|
|
48
|
+
foreground: { value: "hsl(215.4 16.3% 46.9%)" },
|
|
49
|
+
},
|
|
50
|
+
accent: {
|
|
51
|
+
DEFAULT: { value: "hsl(210 40% 96%)" },
|
|
52
|
+
foreground: { value: "hsl(222.2 84% 4.9%)" },
|
|
53
|
+
},
|
|
54
|
+
popover: {
|
|
55
|
+
DEFAULT: { value: "hsl(0 0% 100%)" },
|
|
56
|
+
foreground: { value: "hsl(222.2 84% 4.9%)" },
|
|
57
|
+
},
|
|
58
|
+
card: {
|
|
59
|
+
DEFAULT: { value: "hsl(0 0% 100%)" },
|
|
60
|
+
foreground: { value: "hsl(222.2 84% 4.9%)" },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
recipes: {
|
|
65
|
+
// 独自のPanda CSSレシピを定義
|
|
66
|
+
pandaButton: {
|
|
67
|
+
className: "panda-button",
|
|
68
|
+
base: {
|
|
69
|
+
display: "inline-flex",
|
|
70
|
+
alignItems: "center",
|
|
71
|
+
justifyContent: "center",
|
|
72
|
+
borderRadius: "md",
|
|
73
|
+
fontSize: "sm",
|
|
74
|
+
fontWeight: "medium",
|
|
75
|
+
transition: "all 0.2s",
|
|
76
|
+
cursor: "pointer",
|
|
77
|
+
_disabled: {
|
|
78
|
+
pointerEvents: "none",
|
|
79
|
+
opacity: 0.5,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
variants: {
|
|
83
|
+
variant: {
|
|
84
|
+
primary: {
|
|
85
|
+
bg: "primary",
|
|
86
|
+
color: "primary.foreground",
|
|
87
|
+
_hover: { opacity: 0.9 },
|
|
88
|
+
},
|
|
89
|
+
secondary: {
|
|
90
|
+
bg: "secondary",
|
|
91
|
+
color: "secondary.foreground",
|
|
92
|
+
_hover: { opacity: 0.8 },
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
size: {
|
|
96
|
+
sm: { h: "8", px: "3" },
|
|
97
|
+
md: { h: "10", px: "4" },
|
|
98
|
+
lg: { h: "12", px: "6" },
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
defaultVariants: {
|
|
102
|
+
variant: "primary",
|
|
103
|
+
size: "md",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
// The output directory for your css system
|
|
111
|
+
outdir: "styled-system",
|
|
112
|
+
|
|
113
|
+
jsxFramework: "react",
|
|
114
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { DashboardStats } from "@/components/dashboard/dashboard-stats";
|
|
2
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
3
|
+
import { H1, P } from "@/components/ui/typography";
|
|
4
|
+
import { auth } from "@/lib/auth";
|
|
5
|
+
import { css } from "../../../../styled-system/css";
|
|
6
|
+
|
|
7
|
+
export default async function DashboardPage() {
|
|
8
|
+
const session = await auth();
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div
|
|
12
|
+
className={css({
|
|
13
|
+
minHeight: "100vh",
|
|
14
|
+
background: "linear-gradient(135deg, {colors.gray.50} 0%, {colors.blue.50} 100%)",
|
|
15
|
+
})}
|
|
16
|
+
>
|
|
17
|
+
<main
|
|
18
|
+
className={css({
|
|
19
|
+
maxWidth: "7xl",
|
|
20
|
+
margin: "0 auto",
|
|
21
|
+
padding: {
|
|
22
|
+
base: "1.5rem 1rem",
|
|
23
|
+
md: "2rem 1.5rem",
|
|
24
|
+
lg: "2.5rem 2rem",
|
|
25
|
+
},
|
|
26
|
+
})}
|
|
27
|
+
>
|
|
28
|
+
<div className="space-y-8">
|
|
29
|
+
{/* ページタイトル */}
|
|
30
|
+
<div className="space-y-2">
|
|
31
|
+
<H1>管理画面ダッシュボード</H1>
|
|
32
|
+
<P className="text-muted-foreground">
|
|
33
|
+
ようこそ、{session?.user?.name || session?.user?.email}さん
|
|
34
|
+
</P>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
{/* 統計情報カード */}
|
|
38
|
+
<DashboardStats />
|
|
39
|
+
|
|
40
|
+
{/* メインコンテンツエリア */}
|
|
41
|
+
<Card>
|
|
42
|
+
<CardHeader>
|
|
43
|
+
<CardTitle>管理機能</CardTitle>
|
|
44
|
+
<CardDescription>各種管理機能にアクセスできます</CardDescription>
|
|
45
|
+
</CardHeader>
|
|
46
|
+
<CardContent>
|
|
47
|
+
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
|
48
|
+
<div className="p-4 border rounded-lg hover:bg-muted/50 cursor-pointer">
|
|
49
|
+
<h3 className="font-semibold">ユーザー管理</h3>
|
|
50
|
+
<p className="text-sm text-muted-foreground mt-1">ユーザーの作成、編集、削除</p>
|
|
51
|
+
</div>
|
|
52
|
+
<div className="p-4 border rounded-lg hover:bg-muted/50 cursor-pointer">
|
|
53
|
+
<h3 className="font-semibold">データ管理</h3>
|
|
54
|
+
<p className="text-sm text-muted-foreground mt-1">データベースの管理と操作</p>
|
|
55
|
+
</div>
|
|
56
|
+
<div className="p-4 border rounded-lg hover:bg-muted/50 cursor-pointer">
|
|
57
|
+
<h3 className="font-semibold">設定</h3>
|
|
58
|
+
<p className="text-sm text-muted-foreground mt-1">システム設定の管理</p>
|
|
59
|
+
</div>
|
|
60
|
+
<div className="p-4 border rounded-lg hover:bg-muted/50 cursor-pointer">
|
|
61
|
+
<h3 className="font-semibold">レポート</h3>
|
|
62
|
+
<p className="text-sm text-muted-foreground mt-1">各種レポートの生成</p>
|
|
63
|
+
</div>
|
|
64
|
+
<div className="p-4 border rounded-lg hover:bg-muted/50 cursor-pointer">
|
|
65
|
+
<h3 className="font-semibold">ログ監視</h3>
|
|
66
|
+
<p className="text-sm text-muted-foreground mt-1">システムログの監視</p>
|
|
67
|
+
</div>
|
|
68
|
+
<div className="p-4 border rounded-lg hover:bg-muted/50 cursor-pointer">
|
|
69
|
+
<h3 className="font-semibold">API管理</h3>
|
|
70
|
+
<p className="text-sm text-muted-foreground mt-1">API キーとアクセス管理</p>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</CardContent>
|
|
74
|
+
</Card>
|
|
75
|
+
</div>
|
|
76
|
+
</main>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
}
|