Skip to content

Commit e3eabf8

Browse files
yn1323claude
andauthored
feat: 認証システムの完全リファクタリングと未登録ユーザー対応 (#22)
* remove: storybook vrt * fix: convex clerk * fix * fix: initial register path * feat: 登録状態に応じたSideMenuの表示制御機能を追加 - SideMenuコンポーネントにisRegisteredプロップを追加 - 未登録ユーザーの場合はメニュー項目を非表示に - Storybookに未登録ユーザー用ストーリーを追加 - ログアウトアイコンをFcUndoに変更 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: 認証システムのリファクタリングとスキーマ更新 - Convex認証スキーマの更新(hasProfile → isRegistered) - user.tsファイルの新規作成と完全なCRUD実装 - バリデーションとエラーハンドリングの改善 - ユーザー登録フローの最適化 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: 未登録ユーザー専用レイアウトの追加 - (unregistered)レイアウトグループの新規作成 - join/userページの適切なレイアウトグループへの移動 - 認証レイアウトからSideMenuの条件分岐を削除 - 登録状態に応じた適切なレイアウト分離を実現 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: 不要ファイルとコードの削除・整理 - 古いauth.tsとfunctions.tsファイルの削除 - 使用されていないJWTヘルパーファイルの削除 - globals.d.tsの不要な型定義を削除 - Topコンポーネントからテスト用コードを削除 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: 移動済みファイルの削除 - app/(auth)/join/user/page.tsx の削除 - (unregistered)レイアウトグループへの移動に伴う整理 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix * fix: delete test * fix: story * fix: sub path import * fix * fix * fix * fix: edge * fix: no turbo * fix * fix * fix: edge * fix * remove: edge * feat: jwt * fix * fix: assertion * fix: build * fix * fix * fix; wrangeler * fix: lint * fix: script * fix * fix: delete setting page * fix: downgrade nextjs * fix: add pnpm * fix; edge * lock * fix: lint --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9cb9846 commit e3eabf8

File tree

49 files changed

+14574
-4660
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+14574
-4660
lines changed

.claude/settings.local.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"Bash(git rm:*)",
2525
"mcp__serena__search_for_pattern",
2626
"Bash(git fetch:*)",
27-
"Bash(git reset:*)"
27+
"Bash(git reset:*)",
28+
"WebSearch"
2829
],
2930
"deny": [
3031
"mcp__serena__execute_shell_command",

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
concurrency:
1212
group: "playwright-convex"
13-
cancel-in-progress: true
13+
cancel-in-progress: false
1414
steps:
1515
- uses: actions/checkout@v5
1616
- name: Setup

.serena/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/cache

.storybook/preview.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,17 @@ const preview: Preview = {
2020
(Story) => {
2121
z.setErrorMap(customErrorMap);
2222
return (
23-
<ConvexClientProvider>
24-
<ClerkProvider
25-
// STORYBOOK_CLERK_PUBLISHABLE_KEY・・・Vitest
26-
// NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY・・・Chromatic
27-
publishableKey={
28-
process.env.STORYBOOK_CLERK_PUBLISHABLE_KEY ?? process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
29-
}
30-
>
23+
<ClerkProvider
24+
// STORYBOOK_CLERK_PUBLISHABLE_KEY・・・Vitest
25+
// NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY・・・Chromatic
26+
publishableKey={process.env.STORYBOOK_CLERK_PUBLISHABLE_KEY ?? process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}
27+
>
28+
<ConvexClientProvider>
3129
<ChakraProvider value={defaultSystem}>
3230
<Story />
3331
</ChakraProvider>
34-
</ClerkProvider>
35-
</ConvexClientProvider>
32+
</ConvexClientProvider>
33+
</ClerkProvider>
3634
);
3735
},
3836
],

app/(auth)/attendance/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { Center, Heading } from "@chakra-ui/react";
22
import { Animation } from "@/src/components/templates/Animation";
3+
import { verifySession } from "@/src/helpers/utils/transition";
4+
5+
export default async function AttendancePage() {
6+
await verifySession();
37

4-
export default function AttendancePage() {
58
return (
69
<Animation>
710
<Center h="100vh">

app/(auth)/layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { Box } from "@chakra-ui/react";
22
import { SideMenu } from "@/src/components/layout/SideMenu";
33

4-
export default function AuthLayout({ children }: { children: React.ReactNode }) {
4+
const AuthLayout = async ({ children }: { children: React.ReactNode }) => {
5+
// プロフィール未完了の場合は登録ページへ(Middlewareで実施)
56
return (
67
<Box display="flex">
78
<SideMenu />
@@ -10,4 +11,6 @@ export default function AuthLayout({ children }: { children: React.ReactNode })
1011
</Box>
1112
</Box>
1213
);
13-
}
14+
};
15+
16+
export default AuthLayout;

app/(auth)/mypage/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ const mockShops = [
7777
];
7878

7979
export default function MyPage() {
80+
// Server Component化したら解除する
81+
// await verifySession();
8082
const router = useRouter();
8183
const userName = "テストユーザー"; // 仮のユーザー名
8284
const now = new Date();

app/(auth)/settings/page.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/(auth)/shifts/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { Center, Heading } from "@chakra-ui/react";
22
import { Animation } from "@/src/components/templates/Animation";
3+
import { verifySession } from "@/src/helpers/utils/transition";
4+
5+
export default async function ShiftsPage() {
6+
await verifySession();
37

4-
export default function ShiftsPage() {
58
return (
69
<Animation>
710
<Center h="100vh">
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import { useState } from "react";
2020
import { HiArrowLeft, HiSave } from "react-icons/hi";
2121
import { Animation } from "@/src/components/templates/Animation";
2222

23-
export const runtime = "edge";
24-
2523
// 仮のデータ取得
2624
const getMockShopData = (id: string) => {
2725
const shops = {

0 commit comments

Comments
 (0)