From 96f81273132f5eaa5eac3f54d14dc04f2e289527 Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 21:54:37 +0900 Subject: [PATCH 01/23] =?UTF-8?q?chore:=20Flutter=20=EC=95=B1=EC=9D=84=20a?= =?UTF-8?q?pps/mobile=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 앱과 웹을 같은 저장소에서 관리하기로 한 결정에 맞춘다. 코드가 거의 없는 지금 옮겨야 CI·배포 설정의 경로 변경 비용이 가장 작다. --- .gitignore | 50 +---------------- .fvmrc => apps/mobile/.fvmrc | 0 apps/mobile/.gitignore | 51 ++++++++++++++++++ .metadata => apps/mobile/.metadata | 0 .../mobile/analysis_options.yaml | 0 {android => apps/mobile/android}/.gitignore | 0 .../mobile/android}/app/build.gradle.kts | 0 .../app/src/debug/AndroidManifest.xml | 0 .../android}/app/src/main/AndroidManifest.xml | 0 .../kotlin/com/ject/highfive/MainActivity.kt | 0 .../res/drawable-v21/launch_background.xml | 0 .../main/res/drawable/launch_background.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../app/src/main/res/values-night/styles.xml | 0 .../app/src/main/res/values/styles.xml | 0 .../app/src/profile/AndroidManifest.xml | 0 .../mobile/android}/build.gradle.kts | 0 .../mobile/android}/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.properties | 0 .../mobile/android}/settings.gradle.kts | 0 {ios => apps/mobile/ios}/.gitignore | 0 .../ios}/Flutter/AppFrameworkInfo.plist | 0 .../mobile/ios}/Flutter/Debug.xcconfig | 0 .../mobile/ios}/Flutter/Release.xcconfig | 0 .../ios}/Runner.xcodeproj/project.pbxproj | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 .../xcshareddata/xcschemes/Runner.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 .../mobile/ios}/Runner/AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../Icon-App-1024x1024@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin .../Icon-App-83.5x83.5@2x.png | Bin .../LaunchImage.imageset/Contents.json | 0 .../LaunchImage.imageset/LaunchImage.png | Bin .../LaunchImage.imageset/LaunchImage@2x.png | Bin .../LaunchImage.imageset/LaunchImage@3x.png | Bin .../LaunchImage.imageset/README.md | 0 .../Runner/Base.lproj/LaunchScreen.storyboard | 0 .../ios}/Runner/Base.lproj/Main.storyboard | 0 {ios => apps/mobile/ios}/Runner/Info.plist | 0 .../ios}/Runner/Runner-Bridging-Header.h | 0 .../mobile/ios}/Runner/SceneDelegate.swift | 0 .../mobile/ios}/RunnerTests/RunnerTests.swift | 0 {lib => apps/mobile/lib}/main.dart | 0 pubspec.lock => apps/mobile/pubspec.lock | 0 pubspec.yaml => apps/mobile/pubspec.yaml | 0 {test => apps/mobile/test}/widget_test.dart | 0 68 files changed, 52 insertions(+), 49 deletions(-) rename .fvmrc => apps/mobile/.fvmrc (100%) create mode 100644 apps/mobile/.gitignore rename .metadata => apps/mobile/.metadata (100%) rename analysis_options.yaml => apps/mobile/analysis_options.yaml (100%) rename {android => apps/mobile/android}/.gitignore (100%) rename {android => apps/mobile/android}/app/build.gradle.kts (100%) rename {android => apps/mobile/android}/app/src/debug/AndroidManifest.xml (100%) rename {android => apps/mobile/android}/app/src/main/AndroidManifest.xml (100%) rename {android => apps/mobile/android}/app/src/main/kotlin/com/ject/highfive/MainActivity.kt (100%) rename {android => apps/mobile/android}/app/src/main/res/drawable-v21/launch_background.xml (100%) rename {android => apps/mobile/android}/app/src/main/res/drawable/launch_background.xml (100%) rename {android => apps/mobile/android}/app/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename {android => apps/mobile/android}/app/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename {android => apps/mobile/android}/app/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename {android => apps/mobile/android}/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename {android => apps/mobile/android}/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename {android => apps/mobile/android}/app/src/main/res/values-night/styles.xml (100%) rename {android => apps/mobile/android}/app/src/main/res/values/styles.xml (100%) rename {android => apps/mobile/android}/app/src/profile/AndroidManifest.xml (100%) rename {android => apps/mobile/android}/build.gradle.kts (100%) rename {android => apps/mobile/android}/gradle.properties (100%) rename {android => apps/mobile/android}/gradle/wrapper/gradle-wrapper.properties (100%) rename {android => apps/mobile/android}/settings.gradle.kts (100%) rename {ios => apps/mobile/ios}/.gitignore (100%) rename {ios => apps/mobile/ios}/Flutter/AppFrameworkInfo.plist (100%) rename {ios => apps/mobile/ios}/Flutter/Debug.xcconfig (100%) rename {ios => apps/mobile/ios}/Flutter/Release.xcconfig (100%) rename {ios => apps/mobile/ios}/Runner.xcodeproj/project.pbxproj (100%) rename {ios => apps/mobile/ios}/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename {ios => apps/mobile/ios}/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {ios => apps/mobile/ios}/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename {ios => apps/mobile/ios}/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (100%) rename {ios => apps/mobile/ios}/Runner.xcworkspace/contents.xcworkspacedata (100%) rename {ios => apps/mobile/ios}/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {ios => apps/mobile/ios}/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename {ios => apps/mobile/ios}/Runner/AppDelegate.swift (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png (100%) rename {ios => apps/mobile/ios}/Runner/Assets.xcassets/LaunchImage.imageset/README.md (100%) rename {ios => apps/mobile/ios}/Runner/Base.lproj/LaunchScreen.storyboard (100%) rename {ios => apps/mobile/ios}/Runner/Base.lproj/Main.storyboard (100%) rename {ios => apps/mobile/ios}/Runner/Info.plist (100%) rename {ios => apps/mobile/ios}/Runner/Runner-Bridging-Header.h (100%) rename {ios => apps/mobile/ios}/Runner/SceneDelegate.swift (100%) rename {ios => apps/mobile/ios}/RunnerTests/RunnerTests.swift (100%) rename {lib => apps/mobile/lib}/main.dart (100%) rename pubspec.lock => apps/mobile/pubspec.lock (100%) rename pubspec.yaml => apps/mobile/pubspec.yaml (100%) rename {test => apps/mobile/test}/widget_test.dart (100%) diff --git a/.gitignore b/.gitignore index 3cdb389..3a9a139 100644 --- a/.gitignore +++ b/.gitignore @@ -1,51 +1,3 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp .DS_Store -.atom/ -.build/ -.buildlog/ -.history -.svn/ -.swiftpm/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws .idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins-dependencies -.pub-cache/ -.pub/ -/build/ -/coverage/ - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release - -# Widget Preview related -.widget_preview/ - -# FVM Version Cache -.fvm/ \ No newline at end of file +*.iml diff --git a/.fvmrc b/apps/mobile/.fvmrc similarity index 100% rename from .fvmrc rename to apps/mobile/.fvmrc diff --git a/apps/mobile/.gitignore b/apps/mobile/.gitignore new file mode 100644 index 0000000..3cdb389 --- /dev/null +++ b/apps/mobile/.gitignore @@ -0,0 +1,51 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ +/coverage/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release + +# Widget Preview related +.widget_preview/ + +# FVM Version Cache +.fvm/ \ No newline at end of file diff --git a/.metadata b/apps/mobile/.metadata similarity index 100% rename from .metadata rename to apps/mobile/.metadata diff --git a/analysis_options.yaml b/apps/mobile/analysis_options.yaml similarity index 100% rename from analysis_options.yaml rename to apps/mobile/analysis_options.yaml diff --git a/android/.gitignore b/apps/mobile/android/.gitignore similarity index 100% rename from android/.gitignore rename to apps/mobile/android/.gitignore diff --git a/android/app/build.gradle.kts b/apps/mobile/android/app/build.gradle.kts similarity index 100% rename from android/app/build.gradle.kts rename to apps/mobile/android/app/build.gradle.kts diff --git a/android/app/src/debug/AndroidManifest.xml b/apps/mobile/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from android/app/src/debug/AndroidManifest.xml rename to apps/mobile/android/app/src/debug/AndroidManifest.xml diff --git a/android/app/src/main/AndroidManifest.xml b/apps/mobile/android/app/src/main/AndroidManifest.xml similarity index 100% rename from android/app/src/main/AndroidManifest.xml rename to apps/mobile/android/app/src/main/AndroidManifest.xml diff --git a/android/app/src/main/kotlin/com/ject/highfive/MainActivity.kt b/apps/mobile/android/app/src/main/kotlin/com/ject/highfive/MainActivity.kt similarity index 100% rename from android/app/src/main/kotlin/com/ject/highfive/MainActivity.kt rename to apps/mobile/android/app/src/main/kotlin/com/ject/highfive/MainActivity.kt diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/apps/mobile/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable-v21/launch_background.xml rename to apps/mobile/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/android/app/src/main/res/drawable/launch_background.xml b/apps/mobile/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable/launch_background.xml rename to apps/mobile/android/app/src/main/res/drawable/launch_background.xml diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/values-night/styles.xml b/apps/mobile/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from android/app/src/main/res/values-night/styles.xml rename to apps/mobile/android/app/src/main/res/values-night/styles.xml diff --git a/android/app/src/main/res/values/styles.xml b/apps/mobile/android/app/src/main/res/values/styles.xml similarity index 100% rename from android/app/src/main/res/values/styles.xml rename to apps/mobile/android/app/src/main/res/values/styles.xml diff --git a/android/app/src/profile/AndroidManifest.xml b/apps/mobile/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from android/app/src/profile/AndroidManifest.xml rename to apps/mobile/android/app/src/profile/AndroidManifest.xml diff --git a/android/build.gradle.kts b/apps/mobile/android/build.gradle.kts similarity index 100% rename from android/build.gradle.kts rename to apps/mobile/android/build.gradle.kts diff --git a/android/gradle.properties b/apps/mobile/android/gradle.properties similarity index 100% rename from android/gradle.properties rename to apps/mobile/android/gradle.properties diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/apps/mobile/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.properties rename to apps/mobile/android/gradle/wrapper/gradle-wrapper.properties diff --git a/android/settings.gradle.kts b/apps/mobile/android/settings.gradle.kts similarity index 100% rename from android/settings.gradle.kts rename to apps/mobile/android/settings.gradle.kts diff --git a/ios/.gitignore b/apps/mobile/ios/.gitignore similarity index 100% rename from ios/.gitignore rename to apps/mobile/ios/.gitignore diff --git a/ios/Flutter/AppFrameworkInfo.plist b/apps/mobile/ios/Flutter/AppFrameworkInfo.plist similarity index 100% rename from ios/Flutter/AppFrameworkInfo.plist rename to apps/mobile/ios/Flutter/AppFrameworkInfo.plist diff --git a/ios/Flutter/Debug.xcconfig b/apps/mobile/ios/Flutter/Debug.xcconfig similarity index 100% rename from ios/Flutter/Debug.xcconfig rename to apps/mobile/ios/Flutter/Debug.xcconfig diff --git a/ios/Flutter/Release.xcconfig b/apps/mobile/ios/Flutter/Release.xcconfig similarity index 100% rename from ios/Flutter/Release.xcconfig rename to apps/mobile/ios/Flutter/Release.xcconfig diff --git a/ios/Runner.xcodeproj/project.pbxproj b/apps/mobile/ios/Runner.xcodeproj/project.pbxproj similarity index 100% rename from ios/Runner.xcodeproj/project.pbxproj rename to apps/mobile/ios/Runner.xcodeproj/project.pbxproj diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/apps/mobile/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to apps/mobile/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/apps/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to apps/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/apps/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to apps/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/apps/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to apps/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/apps/mobile/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/Runner.xcworkspace/contents.xcworkspacedata rename to apps/mobile/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/apps/mobile/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to apps/mobile/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/apps/mobile/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to apps/mobile/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/ios/Runner/AppDelegate.swift b/apps/mobile/ios/Runner/AppDelegate.swift similarity index 100% rename from ios/Runner/AppDelegate.swift rename to apps/mobile/ios/Runner/AppDelegate.swift diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to apps/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/apps/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to apps/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/apps/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to apps/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/apps/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to apps/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/apps/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to apps/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/apps/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to apps/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/apps/mobile/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from ios/Runner/Base.lproj/LaunchScreen.storyboard rename to apps/mobile/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/ios/Runner/Base.lproj/Main.storyboard b/apps/mobile/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from ios/Runner/Base.lproj/Main.storyboard rename to apps/mobile/ios/Runner/Base.lproj/Main.storyboard diff --git a/ios/Runner/Info.plist b/apps/mobile/ios/Runner/Info.plist similarity index 100% rename from ios/Runner/Info.plist rename to apps/mobile/ios/Runner/Info.plist diff --git a/ios/Runner/Runner-Bridging-Header.h b/apps/mobile/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from ios/Runner/Runner-Bridging-Header.h rename to apps/mobile/ios/Runner/Runner-Bridging-Header.h diff --git a/ios/Runner/SceneDelegate.swift b/apps/mobile/ios/Runner/SceneDelegate.swift similarity index 100% rename from ios/Runner/SceneDelegate.swift rename to apps/mobile/ios/Runner/SceneDelegate.swift diff --git a/ios/RunnerTests/RunnerTests.swift b/apps/mobile/ios/RunnerTests/RunnerTests.swift similarity index 100% rename from ios/RunnerTests/RunnerTests.swift rename to apps/mobile/ios/RunnerTests/RunnerTests.swift diff --git a/lib/main.dart b/apps/mobile/lib/main.dart similarity index 100% rename from lib/main.dart rename to apps/mobile/lib/main.dart diff --git a/pubspec.lock b/apps/mobile/pubspec.lock similarity index 100% rename from pubspec.lock rename to apps/mobile/pubspec.lock diff --git a/pubspec.yaml b/apps/mobile/pubspec.yaml similarity index 100% rename from pubspec.yaml rename to apps/mobile/pubspec.yaml diff --git a/test/widget_test.dart b/apps/mobile/test/widget_test.dart similarity index 100% rename from test/widget_test.dart rename to apps/mobile/test/widget_test.dart From 07371bd89b6eedfc0486fe66e0b7660c60f582e6 Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 21:54:37 +0900 Subject: [PATCH 02/23] =?UTF-8?q?chore:=20=EC=95=B1=20=EB=BC=88=EB=8C=80?= =?UTF-8?q?=EC=99=80=20=EC=9E=91=EC=97=85=20=EA=B7=9C=EC=B9=99=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feature-first + 가벼운 MVVM으로 기능 개발을 바로 시작할 수 있도록 결정된 패키지(Riverpod, get_it, go_router, Dio, freezed, 보안 저장소)와 app/core/shared/features 골격, dev/prod 환경 분기를 넣는다. 작업 규칙은 AGENTS.md에 둔다. --- AGENTS.md | 146 ++++ README.md | 27 +- apps/mobile/analysis_options.yaml | 29 +- apps/mobile/lib/app/app.dart | 30 + apps/mobile/lib/app/di.dart | 22 + apps/mobile/lib/app/env.dart | 31 + apps/mobile/lib/app/providers.dart | 10 + apps/mobile/lib/app/router.dart | 25 + apps/mobile/lib/core/network/dio_client.dart | 25 + .../auth/presentation/views/login_view.dart | 11 + apps/mobile/lib/main.dart | 128 +--- apps/mobile/lib/shared/theme/app_theme.dart | 6 + apps/mobile/pubspec.lock | 700 +++++++++++++++++- apps/mobile/pubspec.yaml | 81 +- apps/mobile/test/app/app_test.dart | 41 + apps/mobile/test/widget_test.dart | 30 - 16 files changed, 1094 insertions(+), 248 deletions(-) create mode 100644 AGENTS.md create mode 100644 apps/mobile/lib/app/app.dart create mode 100644 apps/mobile/lib/app/di.dart create mode 100644 apps/mobile/lib/app/env.dart create mode 100644 apps/mobile/lib/app/providers.dart create mode 100644 apps/mobile/lib/app/router.dart create mode 100644 apps/mobile/lib/core/network/dio_client.dart create mode 100644 apps/mobile/lib/features/auth/presentation/views/login_view.dart create mode 100644 apps/mobile/lib/shared/theme/app_theme.dart create mode 100644 apps/mobile/test/app/app_test.dart delete mode 100644 apps/mobile/test/widget_test.dart diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..171987c --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,146 @@ +# highfive-5th-Client 작업 규칙 + +사람과 코딩 에이전트가 같이 보는 규칙이다. 설계 결정의 배경은 팀 아키텍처 문서를 따르고, 여기에는 코드를 쓸 때 지킬 것만 적는다. + +## 저장소 + +``` +apps/mobile/ Flutter 앱. flutter 명령은 이 폴더에서 `fvm flutter ...`로 실행 +apps/web/ React + TypeScript + Vite (아직 없음) +docs/ API·앱↔웹 계약·배포 절차 (아직 없음) +``` + +- Flutter 버전은 `apps/mobile/.fvmrc`로 고정한다. `fvm install` 후 `fvm flutter`, `fvm dart`만 쓴다. SDK 업그레이드는 PR로 합의한다. +- 앱에만 영향 있는 변경은 웹을, 웹에만 영향 있는 변경은 앱을 건드리지 않는다. 앱↔웹 공통 계약은 양쪽을 검증한다. + +## 명령 (apps/mobile 에서) + +| 할 일 | 명령 | +| --- | --- | +| 의존성 | `fvm flutter pub get` | +| 실행 | `fvm flutter run --dart-define=FLAVOR=dev` (`prod`도 가능, 생략 시 dev) | +| 테스트 | `fvm flutter test` | +| 분석 | `fvm flutter analyze` | +| 포맷 | `fvm dart format lib test` | +| 코드 생성 | `fvm dart run build_runner build --delete-conflicting-outputs` | + +PR 전에 포맷·분석·테스트가 모두 통과해야 한다. 경로에 한글이 있으면 `flutter analyze`가 크래시할 수 있다(analysis server 버그). 그럴 때는 영문 경로에 복사해서 돌린다. + +## 폴더 (apps/mobile/lib) + +``` +main.dart 진입. AppEnv 결정 → setupDi → ProviderScope로 앱 시작 +app/ 초기화·DI·환경·라우팅 + app.dart MaterialApp.router, dev 배너 + di.dart get_it 등록 (setupDi) + env.dart Flavor, AppEnv + providers.dart get_it → Riverpod 연결 Provider + router.dart AppRoutes 경로 상수 + routerProvider +core/ 기술 기반: 네트워크·오류·저장소·SDK·WebView + network/dio_client.dart +shared/ 공통 UI·디자인 토큰 + theme/app_theme.dart +features// 기능 단위 + models/ 도메인 모델 (freezed) + data/ dto/ services/ repositories/ + presentation/ providers/ view_models/ views/ widgets/ +``` + +기능 이름: `auth`, `bands`, `performances`, `recruitments`, `venues`, `ticketing`, `payments`, `settlements`, `chat`. + +- 실제 구현하는 기능부터 만든다. 빈 폴더·UseCase·인터페이스를 미리 만들지 않는다. 지금은 `features/auth`에 로그인 화면 자리만 있다. +- 기능 안의 하위 폴더도 필요한 것만 만든다. +- 여러 기능에서 쓴다는 이유만으로 core/shared로 옮기지 않는다. core는 기술 기반, shared는 공통 UI. +- 다른 기능의 View·ViewModel을 import하지 않는다. 기능 간 데이터는 Repository·모델 계약으로만 주고받고 순환 의존을 만들지 않는다. +- 협업 단위(페이지·API Task)와 코드 배치는 별개다. 페이지 단위로 나눠 작업해도 폴더는 feature-first를 유지한다. + +## 계층 책임 + +``` +View ── 사용자 명령 ──→ ViewModel ──→ Repository ──→ Service ──→ 서버/SDK + ↑ │ + └── Riverpod 상태 구독 ──┘ +``` + +| 역할 | 담당 | 하지 않는 것 | +| --- | --- | --- | +| View | 표시·입력·화면 이동 | HTTP 호출, 권한·재고·상태 판단 | +| ViewModel | 상태·사용자 명령. Riverpod `Notifier`/`AsyncNotifier` | 위젯 import, getIt 직접 조회 | +| Repository | 모델 변환·저장·캐시·데이터 처리 | 위젯·Riverpod 의존 | +| Service | HTTP(Dio)·소켓·SDK 호출 | 모델 변환, 캐시 | +| get_it | Service·Repository 등 공유 객체 생성·연결 | ViewModel 등록 | + +권한·재고·가격·마감은 서버가 최종 판단한다. 화면에서 버튼을 숨기는 것으로 확정하지 않는다. + +## DI와 상태 + +- `getIt`은 `app/di.dart`(등록)와 `app/providers.dart`(연결 Provider)에서만 조회한다. 그 외 코드는 연결 Provider를 `ref.watch/read` 한다. +- ViewModel은 Riverpod만 관리한다. get_it에 중복 등록하지 않는다. +- 상태 범위: 입력값은 위젯 로컬 상태, 로그인 세션은 앱 공통 Provider, 상세 조회는 `.family`로 ID별 상태. +- 신청·예매·결제처럼 결과가 남는 명령은 Provider의 `build()`에서 실행하지 않는다. 버튼 → ViewModel 메서드로 명시적으로 실행하고 ViewModel에서 중복 실행을 막는다. 서버 멱등성 키 계약이 있으면 따르고, 타임아웃은 실패 확정이 아니므로 기존 결과를 먼저 조회한다. +- 로그아웃·계정 전환 시 사용자 상태·Repository 캐시·소켓·보안 저장소를 정리한다. Riverpod 초기화만으로 Repository 캐시가 정리됐다고 가정하지 않는다. 이전 세션 요청의 늦은 응답은 버린다. +- 테스트는 `ProviderScope(overrides: [...])`로 연결 Provider를 바꿔 끼운다. 전역 getIt 등록에 기대지 않는다. `test/app/app_test.dart`가 예다. + +연결 Provider와 ViewModel 모양: + +```dart +// app/providers.dart +final authRepositoryProvider = + Provider((ref) => getIt()); + +// features/auth/presentation/view_models/login_view_model.dart +class LoginViewModel extends AsyncNotifier { + @override + Future build() async {} + + Future login(String email, String password) async { + if (state.isLoading) return; // 중복 실행 방지 + state = const AsyncLoading(); + state = await AsyncValue.guard( + () => ref.read(authRepositoryProvider).login(email, password), + ); + } +} + +final loginViewModelProvider = + AsyncNotifierProvider(LoginViewModel.new); +``` + +## 환경과 저장 + +- `--dart-define=FLAVOR=dev|prod`로 `AppEnv`를 만든다. 생략하면 dev. API 주소 등 환경값은 `app/env.dart`에만 둔다. +- dev 빌드는 release 모드로도 배포하므로 화면 왼쪽 위에 `DEV` 배너가 붙는다. +- 네이티브 flavor(앱 ID·이름 분리, 두 앱 동시 설치)는 아직 없다. 추가할 때 Android `productFlavors`와 iOS scheme·xcconfig를 같이 만든다. +- 인증 정보는 `FlutterSecureStorage`에만 저장한다. `SharedPreferencesAsync`·로그·URL·분석 이벤트에 넣지 않는다. 디버그 로그 인터셉터는 헤더를 남기지 않는다. + +## 모델과 코드 생성 + +- 모델은 `freezed` + `json_serializable`. DTO(서버 응답)와 도메인 모델을 구분하고 변환은 Repository에서 한다. +- `*.freezed.dart`, `*.g.dart`는 직접 수정하지 않는다. 모델을 바꾸면 build_runner를 돌리고 생성 파일도 함께 커밋한다(CI가 build_runner 없이 분석·테스트). +- `pubspec.yaml`의 SDK 제약과 패키지 메이저 버전 변경은 PR에서 따로 알린다. + +## 이름 + +- 파일은 snake_case, 접미사로 역할을 드러낸다: `login_view.dart`, `login_view_model.dart`, `auth_repository.dart`, `auth_service.dart`, `login_request_dto.dart`. +- Provider 변수는 `xxxProvider`. 라우트 경로 문자열은 `AppRoutes`에만 둔다. +- 테스트는 `test/`에 `lib/`와 같은 경로. 순수 로직은 단위 테스트, 화면은 위젯 테스트. 문구를 고정하는 테스트는 만들지 않는다. + +## Git·Jira + +| 항목 | 규칙 | +| --- | --- | +| 브랜치 | `feat/JECT-123-login`, `fix/JECT-124-login-error` (type: feat / fix / chore / refactor / docs) | +| 커밋 | `feat(JECT-123): 로그인 기능 구현`. 본문은 "왜"만, 파일 나열 금지 | +| PR | `[JECT-123] 로그인 기능 구현`. 본문: 변경 / 검증 / UI 캡처 / 호환성 | +| 기능 머지 | 기능 브랜치 → `develop`, 상대 1명 리뷰 후 squash | +| 릴리스 | `develop` → `main`, 이력 유지하는 merge | +| 긴급 수정 | `main`에서 fix 브랜치 → PR로 main 반영 → develop에도 반영 | +| 공통 변경 | DI·모델·라우팅·네이티브·bridge는 사전 공유 후 상대 리뷰 | + +`JECT-123`은 예시다. `develop` 브랜치는 아직 없으므로 첫 기능 작업 전에 만든다. + +## 아직 안 한 것 + +- 네이티브 flavor, Shorebird, Fastlane, GitHub Actions +- 토큰 갱신(동시 401은 한 번만 갱신)·세션 복원·WebView bridge +- `develop` 브랜치, `apps/web`, `docs/` diff --git a/README.md b/README.md index 3f178d2..692b3ca 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,30 @@ # highfive-5th-Client -Flutter 3.47.9 (fvm) 기반 클라이언트입니다. +highfive 5기 클라이언트 저장소. 앱(Flutter)과 웹(React, 예정)을 같은 저장소에서 관리한다. + +``` +apps/mobile Flutter 앱 +apps/web React + TypeScript + Vite (예정) +docs/ API·앱↔웹 계약·배포 절차 (예정) +``` + +작업 규칙은 [AGENTS.md](./AGENTS.md)를 본다. + +## 앱 실행 + +Flutter 버전은 `apps/mobile/.fvmrc`에 고정한다(현재 3.47.9). ```bash -fvm install +cd apps/mobile +fvm install # .fvmrc 버전 설치 fvm flutter pub get -fvm flutter run +fvm flutter run --dart-define=FLAVOR=dev # FLAVOR 생략 시 dev +``` + +PR 전 검증: + +```bash +fvm dart format --set-exit-if-changed lib test +fvm flutter analyze +fvm flutter test ``` diff --git a/apps/mobile/analysis_options.yaml b/apps/mobile/analysis_options.yaml index 0da40e9..9caab8a 100644 --- a/apps/mobile/analysis_options.yaml +++ b/apps/mobile/analysis_options.yaml @@ -1,12 +1,3 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml analyzer: @@ -14,21 +5,5 @@ analyzer: - build/** - android/** - ios/** - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options + - "**/*.g.dart" + - "**/*.freezed.dart" diff --git a/apps/mobile/lib/app/app.dart b/apps/mobile/lib/app/app.dart new file mode 100644 index 0000000..2b0babe --- /dev/null +++ b/apps/mobile/lib/app/app.dart @@ -0,0 +1,30 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import '../shared/theme/app_theme.dart'; +import 'providers.dart'; +import 'router.dart'; + +class HighfiveApp extends ConsumerWidget { + const HighfiveApp({super.key}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final env = ref.watch(appEnvProvider); + final router = ref.watch(routerProvider); + return MaterialApp.router( + title: 'highfive', + theme: AppTheme.light, + routerConfig: router, + builder: (context, child) { + if (!env.isDev) return child!; + // dev 빌드는 release 모드로도 배포하므로 DEBUG 배너와 별개로 표시한다. + return Banner( + message: 'DEV', + location: BannerLocation.topStart, + child: child, + ); + }, + ); + } +} diff --git a/apps/mobile/lib/app/di.dart b/apps/mobile/lib/app/di.dart new file mode 100644 index 0000000..2be9d84 --- /dev/null +++ b/apps/mobile/lib/app/di.dart @@ -0,0 +1,22 @@ +import 'package:dio/dio.dart'; +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; +import 'package:get_it/get_it.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +import '../core/network/dio_client.dart'; +import 'env.dart'; + +final getIt = GetIt.instance; + +/// 앱 공통 객체를 생성·연결한다. 앱 시작 시 한 번만 호출한다. +/// +/// - 앱 전체가 공유하는 Service·Repository 등만 등록한다. +/// - ViewModel(Notifier)은 Riverpod이 관리하므로 등록하지 않는다. +/// - 다른 코드는 getIt을 직접 조회하지 않고 `providers.dart`의 연결 Provider를 거친다. +void setupDi(AppEnv env) { + getIt + ..registerSingleton(env) + ..registerSingleton(createDio(baseUrl: env.apiBaseUrl)) + ..registerSingleton(const FlutterSecureStorage()) + ..registerSingleton(SharedPreferencesAsync()); +} diff --git a/apps/mobile/lib/app/env.dart b/apps/mobile/lib/app/env.dart new file mode 100644 index 0000000..192eb66 --- /dev/null +++ b/apps/mobile/lib/app/env.dart @@ -0,0 +1,31 @@ +/// 빌드 환경. `--dart-define=FLAVOR=dev|prod` 로 정한다. +enum Flavor { dev, prod } + +/// 환경별 설정값. 앱 시작 시 한 번 만들어 get_it에 등록한다. +/// +/// 네이티브 flavor(앱 ID·이름 분리)는 아직 없다. 지금은 Dart 쪽 분기만 한다. +class AppEnv { + const AppEnv({required this.flavor, required this.apiBaseUrl}); + + /// `FLAVOR`를 지정하지 않으면 dev. 모르는 값이면 앱 시작 시 바로 실패한다. + factory AppEnv.fromEnvironment() { + const name = String.fromEnvironment('FLAVOR', defaultValue: 'dev'); + return switch (Flavor.values.byName(name)) { + Flavor.dev => const AppEnv( + flavor: Flavor.dev, + // TODO(BE): dev API 주소 확정 후 교체 + apiBaseUrl: 'https://dev-api.highfive.example', + ), + Flavor.prod => const AppEnv( + flavor: Flavor.prod, + // TODO(BE): prod API 주소 확정 후 교체 + apiBaseUrl: 'https://api.highfive.example', + ), + }; + } + + final Flavor flavor; + final String apiBaseUrl; + + bool get isDev => flavor == Flavor.dev; +} diff --git a/apps/mobile/lib/app/providers.dart b/apps/mobile/lib/app/providers.dart new file mode 100644 index 0000000..75b5b44 --- /dev/null +++ b/apps/mobile/lib/app/providers.dart @@ -0,0 +1,10 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +import 'di.dart'; +import 'env.dart'; + +/// get_it에 등록한 앱 공통 객체를 Riverpod으로 넘기는 연결 Provider. +/// +/// View·ViewModel은 getIt 대신 이 Provider들을 watch/read 한다. +/// 테스트는 `ProviderScope(overrides: [...])`로 바꿔 끼우고 전역 getIt 등록에 기대지 않는다. +final appEnvProvider = Provider((ref) => getIt()); diff --git a/apps/mobile/lib/app/router.dart b/apps/mobile/lib/app/router.dart new file mode 100644 index 0000000..fa9ddf4 --- /dev/null +++ b/apps/mobile/lib/app/router.dart @@ -0,0 +1,25 @@ +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:go_router/go_router.dart'; + +import '../features/auth/presentation/views/login_view.dart'; + +/// 경로 문자열은 여기서만 정의한다. View는 자기 경로를 모른다. +abstract final class AppRoutes { + static const login = '/login'; +} + +/// 인증 redirect를 붙일 때는 세션 상태를 `ref.listen`으로 구독해 `refreshListenable`에 연결한다. +/// `ref.watch`로 GoRouter를 다시 만들면 내비게이션 스택이 초기화되므로 쓰지 않는다. +final routerProvider = Provider((ref) { + final router = GoRouter( + initialLocation: AppRoutes.login, + routes: [ + GoRoute( + path: AppRoutes.login, + builder: (context, state) => const LoginView(), + ), + ], + ); + ref.onDispose(router.dispose); + return router; +}); diff --git a/apps/mobile/lib/core/network/dio_client.dart b/apps/mobile/lib/core/network/dio_client.dart new file mode 100644 index 0000000..cb6e302 --- /dev/null +++ b/apps/mobile/lib/core/network/dio_client.dart @@ -0,0 +1,25 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/foundation.dart'; + +/// 앱 공통 Dio. 인증 헤더·토큰 갱신 인터셉터는 auth 기능을 구현할 때 여기에 붙인다. +Dio createDio({required String baseUrl}) { + final dio = Dio( + BaseOptions( + baseUrl: baseUrl, + connectTimeout: const Duration(seconds: 10), + receiveTimeout: const Duration(seconds: 20), + ), + ); + if (kDebugMode) { + // 헤더에는 토큰이 섞이므로 남기지 않는다. 디버그 실행에서만 켠다. + dio.interceptors.add( + LogInterceptor( + requestHeader: false, + responseHeader: false, + requestBody: true, + responseBody: true, + ), + ); + } + return dio; +} diff --git a/apps/mobile/lib/features/auth/presentation/views/login_view.dart b/apps/mobile/lib/features/auth/presentation/views/login_view.dart new file mode 100644 index 0000000..11c20e4 --- /dev/null +++ b/apps/mobile/lib/features/auth/presentation/views/login_view.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; + +/// 로그인 화면. 첫 공통 예제(로그인 → 보호 화면 → 세션 복원 → 로그아웃)를 구현할 때 채운다. +class LoginView extends StatelessWidget { + const LoginView({super.key}); + + @override + Widget build(BuildContext context) { + return const Scaffold(body: Center(child: Text('로그인'))); + } +} diff --git a/apps/mobile/lib/main.dart b/apps/mobile/lib/main.dart index 244a702..ff37a82 100644 --- a/apps/mobile/lib/main.dart +++ b/apps/mobile/lib/main.dart @@ -1,122 +1,12 @@ -import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({super.key}); - - // This widget is the root of your application. - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - // This is the theme of your application. - // - // TRY THIS: Try running your application with "flutter run". You'll see - // the application has a purple toolbar. Then, without quitting the app, - // try changing the seedColor in the colorScheme below to Colors.green - // and then invoke "hot reload" (save your changes or press the "hot - // reload" button in a Flutter-supported IDE, or press "r" if you used - // the command line to start the app). - // - // Notice that the counter didn't reset back to zero; the application - // state is not lost during the reload. To reset the state, use hot - // restart instead. - // - // This works for code too, not just values: Most code changes can be - // tested with just a hot reload. - colorScheme: .fromSeed(seedColor: Colors.deepPurple), - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({super.key, required this.title}); - - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. +import 'app/app.dart'; +import 'app/di.dart'; +import 'app/env.dart'; - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - - final String title; - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. - _counter++; - }); - } - - @override - Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. - return Scaffold( - appBar: AppBar( - // TRY THIS: Try changing the color here to a specific color (to - // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar - // change color while the other colors stay the same. - backgroundColor: Theme.of(context).colorScheme.inversePrimary, - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - // - // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" - // action in the IDE, or press "p" in the console), to see the - // wireframe for each widget. - mainAxisAlignment: .center, - children: [ - const Text('You have pushed the button this many times:'), - Text( - '$_counter', - style: Theme.of(context).textTheme.headlineMedium, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), - ); - } +void main() { + WidgetsFlutterBinding.ensureInitialized(); + setupDi(AppEnv.fromEnvironment()); + runApp(const ProviderScope(child: HighfiveApp())); } diff --git a/apps/mobile/lib/shared/theme/app_theme.dart b/apps/mobile/lib/shared/theme/app_theme.dart new file mode 100644 index 0000000..49d6575 --- /dev/null +++ b/apps/mobile/lib/shared/theme/app_theme.dart @@ -0,0 +1,6 @@ +import 'package:flutter/material.dart'; + +/// 디자인 토큰이 정해지면 색·타이포를 여기서 관리한다. +abstract final class AppTheme { + static final light = ThemeData(colorSchemeSeed: Colors.indigo); +} diff --git a/apps/mobile/pubspec.lock b/apps/mobile/pubspec.lock index 135e89a..93dee74 100644 --- a/apps/mobile/pubspec.lock +++ b/apps/mobile/pubspec.lock @@ -1,6 +1,38 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "1c5591cc6f252d5f440d96ab87c03e43504be552a3fa49d7cb7563f04c51fb0a" + url: "https://pub.dev" + source: hosted + version: "111.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "6c39bd5486a310e56217bed7cb1691377959f31be4227e41750107db7e6dd55c" + url: "https://pub.dev" + source: hosted + version: "14.7.0" + analyzer_buffer: + dependency: transitive + description: + name: analyzer_buffer + sha256: f890a2e708e38fbf4238ad2f9fd3d506538acdddb0cd8eb2c3e8c7bd17784b57 + url: "https://pub.dev" + source: hosted + version: "0.3.4" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" async: dependency: transitive description: @@ -17,6 +49,54 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + build: + dependency: transitive + description: + name: build + sha256: "50df3d1558953a0d936401c1687cc41dbc039f9132f538c7bcb2aac2a580ae7f" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + build_config: + dependency: transitive + description: + name: build_config + sha256: "4703a785fbc3c266c5c7518589d0863f6a05078ee33f7ca5aa4b87a56f1cedd2" + url: "https://pub.dev" + source: hosted + version: "1.4.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "39ab65f7c60c19af64b9ef96e6a5d3ab48355f7dddfd98a9079d55a8cb6628fc" + url: "https://pub.dev" + source: hosted + version: "4.1.7" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "96b9da39a3a8d4365aa1ca6f7655437d80f514ba13d4c21d8408cc8aacb94681" + url: "https://pub.dev" + source: hosted + version: "2.17.1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "44922ecebd8e3d0cef743dadd3b54df4e87e2a4c52a29465a1872aa9e192caa8" + url: "https://pub.dev" + source: hosted + version: "5.1.2" + built_value: + dependency: transitive + description: + name: built_value + sha256: f87ea98192116f7093cb214551ce1929caae0681fdba282b3d8b4462adee7bb7 + url: "https://pub.dev" + source: hosted + version: "8.13.0" characters: dependency: transitive description: @@ -25,6 +105,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" + url: "https://pub.dev" + source: hosted + version: "2.0.4" clock: dependency: transitive description: @@ -33,6 +121,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.3" + code_assets: + dependency: transitive + description: + name: code_assets + sha256: bf394f466ba9205f1812a0433b392d6af280f155f56651eda7c18cc32ed493b8 + url: "https://pub.dev" + source: hosted + version: "1.2.1" collection: dependency: transitive description: @@ -41,6 +137,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.19.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + crypto: + dependency: transitive + description: + name: crypto + sha256: e3626ae6270383c9e3a549f34c9e4cd26c09ae6a9adaab2bf4737a00340efdc4 + url: "https://pub.dev" + source: hosted + version: "3.0.8" cupertino_icons: dependency: "direct main" description: @@ -49,6 +161,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.9" + cupertino_ui: + dependency: transitive + description: + name: cupertino_ui + sha256: e003b87afde18cb396ec15928c7894063d64af04462c68df9a1404c461316dd2 + url: "https://pub.dev" + source: hosted + version: "1.1.5" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: a0e4f65339b31eb6a9e6a12e14b4682a48d46fbc54a82f4a702396fbdbac63a7 + url: "https://pub.dev" + source: hosted + version: "3.1.14" + dio: + dependency: "direct main" + description: + name: dio + sha256: "852ec3b48cc431ac04fff978413c541502b67ffc3e26921e74e3d994694192c1" + url: "https://pub.dev" + source: hosted + version: "5.11.1" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "3a1b2cd7be71086f38504956e3ebcd2837288d231ff454bafa78021244102bfc" + url: "https://pub.dev" + source: hosted + version: "2.2.2" fake_async: dependency: transitive description: @@ -57,6 +201,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.3" + ffi: + dependency: transitive + description: + name: ffi + sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + ffi_leak_tracker: + dependency: transitive + description: + name: ffi_leak_tracker + sha256: "4093d4ef9ca06ffe2786e73bfb25e22aa92112b9bb4ec941f11e3e6b61489a97" + url: "https://pub.dev" + source: hosted + version: "0.1.2" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -70,11 +246,205 @@ packages: url: "https://pub.dev" source: hosted version: "6.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_riverpod: + dependency: "direct main" + description: + name: flutter_riverpod + sha256: "2b7f9d2a3c730ac1a98221b420cef966b990fca7ab546ede324642ca57a533e3" + url: "https://pub.dev" + source: hosted + version: "3.4.3" + flutter_secure_storage: + dependency: "direct main" + description: + name: flutter_secure_storage + sha256: d4e1fb6b2cb524868929e78dc0282fa000554b22060fb53789dc481c9fc95bb8 + url: "https://pub.dev" + source: hosted + version: "11.2.0" + flutter_secure_storage_darwin: + dependency: transitive + description: + name: flutter_secure_storage_darwin + sha256: a031ceac9b070e62ef183cd7f7d1a8798ebde402d5049f0fe6eb3a51bd797a21 + url: "https://pub.dev" + source: hosted + version: "0.4.3" + flutter_secure_storage_linux: + dependency: transitive + description: + name: flutter_secure_storage_linux + sha256: caa75bd78f017422912e3a904933113b2428eb79f981ac37acd2dd2a700458ea + url: "https://pub.dev" + source: hosted + version: "3.0.3" + flutter_secure_storage_platform_interface: + dependency: transitive + description: + name: flutter_secure_storage_platform_interface + sha256: "64951127f001f546891c86f414972bf49ef2c4c8a4c92c65f5790cc0c9100045" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + flutter_secure_storage_web: + dependency: transitive + description: + name: flutter_secure_storage_web + sha256: "073a62b3aeb866ab4ce795f960413948e51e5a42a9b0c8333b6daf5bb3208a1c" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + flutter_secure_storage_windows: + dependency: transitive + description: + name: flutter_secure_storage_windows + sha256: "471951813a97006d899db4948acc654a4f28c440083ea08178935ce20b173ec1" + url: "https://pub.dev" + source: hosted + version: "4.2.2" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + freezed: + dependency: "direct dev" + description: + name: freezed + sha256: cb910646cb09265d49077b63b600ef1f5a718c1d6031836432237ddeabae1b12 + url: "https://pub.dev" + source: hosted + version: "4.0.3" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + get_it: + dependency: "direct main" + description: + name: get_it + sha256: "2b5c6b077aad30bba9782178baff6076a2044141f1d5f2f15b43bca3fbe74874" + url: "https://pub.dev" + source: hosted + version: "9.3.0" + glob: + dependency: transitive + description: + name: glob + sha256: "218aeb56050c714f62a3182775320dfa04602b55074873e24e31bbd39bda96fb" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + go_router: + dependency: "direct main" + description: + name: go_router + sha256: f1c2d3c2b0b2096b435d7af033dd4e586fa31f51d988c5985e64495cd926d872 + url: "https://pub.dev" + source: hosted + version: "18.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + hooks: + dependency: transitive + description: + name: hooks + sha256: "9a62a50b50b769a737bc0a8ff381f333529df3ab746b2f6b02e83760231455ba" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "361668bdd71f0ae2dc6d17b75a593520f3c414af6534f9eed1aa72049dd71d18" + url: "https://pub.dev" + source: hosted + version: "3.2.3" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + intl: + dependency: transitive + description: + name: intl + sha256: "1ca20c894b1717686a2319b8548763d812bc0aabdac580420a44c5178c57a867" + url: "https://pub.dev" + source: hosted + version: "0.20.3" + io: + dependency: transitive + description: + name: io + sha256: "2635216ca6a737e60de577ffa1a48a0bec76ca8a62917cfc1bb88c14c570646f" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + jni: + dependency: transitive + description: + name: jni + sha256: d8df6dab6847855512fe44dd9032b0bbe34dda7bf7597e41d30750879779813f + url: "https://pub.dev" + source: hosted + version: "1.1.1" + jni_flutter: + dependency: transitive + description: + name: jni_flutter + sha256: "0dd33d67797560f66e961a6053882d4df54bd345bf063b8fe7ea133f7ad8b191" + url: "https://pub.dev" + source: hosted + version: "1.0.4+1" + jni_util: + dependency: transitive + description: + name: jni_util + sha256: "1ba86da04a5f2bf18fde2edb235587e70c5b0fc5bd4ba955f46b00942c3fc35f" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + json_annotation: + dependency: "direct main" + description: + name: json_annotation + sha256: "2a743920d81b7910627f68ee2c9ac1fc0bfee32b9fc3403587d7c6791ca12f80" + url: "https://pub.dev" + source: hosted + version: "4.12.0" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + sha256: cc7822761b40be9237bcaae62b755ffe5453ceff96a0001f1f5f2439251c66f1 + url: "https://pub.dev" + source: hosted + version: "6.15.2" leak_tracker: dependency: transitive description: @@ -107,6 +477,22 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.0" + listen: + dependency: transitive + description: + name: listen + sha256: "47501a08016a43fcad79252439d723f50f14f88fa7bfd8a177e0a417e5c9e1f2" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" matcher: dependency: transitive description: @@ -123,6 +509,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.13.0" + material_ui: + dependency: transitive + description: + name: material_ui + sha256: feb289df1e5f9ed9522f9fe3d909432a7f7bc76943f16abad09f80a16cd25196 + url: "https://pub.dev" + source: hosted + version: "1.9.0" meta: dependency: transitive description: @@ -131,6 +525,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.3" + mime: + dependency: transitive + description: + name: mime + sha256: bd47de35f07e27267e69c8c8b22edf9473bfee170a60d60fcc93730c5144b7f6 + url: "https://pub.dev" + source: hosted + version: "2.1.0" + objective_c: + dependency: transitive + description: + name: objective_c + sha256: b7fb95a6d9a4f009edd63dc5ac69f07420b23a16161c6dd8660290b59c602e8e + url: "https://pub.dev" + source: hosted + version: "9.5.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: ffcf4cf3d6c0b74ac43708d9f56625506e8a68aa935abe9d267a7330f320eb5d + url: "https://pub.dev" + source: hosted + version: "3.0.0" path: dependency: transitive description: @@ -139,11 +557,203 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: a7f4874f987173da295a61c181b8ee71dab59b332a486b391babf26a1b884825 + url: "https://pub.dev" + source: hosted + version: "2.1.6" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "69cbd515a62b94d32a7944f086b2f82b4ac40a1d45bebfc00813a430ab2dabcd" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699" + url: "https://pub.dev" + source: hosted + version: "2.6.0" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: "58c2005f147315b11e9b4a7bc889cd5203e250cba8e3f012dae259b4972b5c16" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "484838772624c3a4b94f1e44a3e19897fee738f2d5c4ce448443b0417f7c9dda" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + platform: + dependency: transitive + description: + name: platform + sha256: a36d119c13416516a7b5913fbe8af8531e11633d784c550b2125f76c758524ec + url: "https://pub.dev" + source: hosted + version: "3.2.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "4177f68c237ea2128d1bee66ac17b2ce05ba3dbaafcbdd54c5d40a39d0b6b11c" + url: "https://pub.dev" + source: hosted + version: "1.5.3" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "261236774e8b1d69cfc6b9eabbc96c40f25e7a2d6b171f3385d4f65d5734fb24" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: "9ac81c01ffd6a9cf9b2713288834fbaaf6aebde05ffdf02d380e68b8e06f27d8" + url: "https://pub.dev" + source: hosted + version: "1.7.0" + record_use: + dependency: transitive + description: + name: record_use + sha256: "2551bd8eecfe95d14ae75f6021ad0248be5c27f138c2ec12fcb52b500b3ba1ed" + url: "https://pub.dev" + source: hosted + version: "0.6.0" + riverpod: + dependency: transitive + description: + name: riverpod + sha256: "484dfc873ea4c4f4240e5635444fa066f87b07862b7279ebd004a2b71fba4b7a" + url: "https://pub.dev" + source: hosted + version: "3.4.3" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + sha256: "1e85e0dccf5b4a016077fea7dfbb4a7cb39c759ac1596fcf60c06deadb7da91f" + url: "https://pub.dev" + source: hosted + version: "2.5.6" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "33b38b07d9ac7d16aff0426c61418752fd3e7a8c7dc8be786c875d6ce673b002" + url: "https://pub.dev" + source: hosted + version: "2.5.4" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "2ec3934efa51e46117f23031cc141b8fc878e8525b94ec1ea4f7f586cf1b47ea" + url: "https://pub.dev" + source: hosted + version: "2.5.7" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "649dc798a33931919ea356c4305c2d1f81619ea6e92244070b520187b5140ef9" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 + url: "https://pub.dev" + source: hosted + version: "2.4.3" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shelf: + dependency: transitive + description: + name: shelf + sha256: e75e9cf311d7fd712048038cc17c25199c38536c20330d53e7db058b543d5a48 + url: "https://pub.dev" + source: hosted + version: "1.4.3" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" + url: "https://pub.dev" + source: hosted + version: "3.0.0" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.0" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "833ea7d15b5be79949d3d6c077da0267a0bd93c16897b36a771395a91e63086e" + url: "https://pub.dev" + source: hosted + version: "4.3.1" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "279126bce72de3f2b7d4756408a4157988cf6bb4815be551bf55851aa00e9984" + url: "https://pub.dev" + source: hosted + version: "1.4.0" source_span: dependency: transitive description: @@ -160,6 +770,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.12.2" + state_notifier: + dependency: transitive + description: + name: state_notifier + sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb + url: "https://pub.dev" + source: hosted + version: "1.0.0" stream_channel: dependency: transitive description: @@ -168,6 +786,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: a00e5f18bffc764f923e7dec1038527f7fe7a1791361a7117f0358193f13d53a + url: "https://pub.dev" + source: hosted + version: "2.1.2" string_scanner: dependency: transitive description: @@ -192,6 +818,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.12" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + uuid: + dependency: transitive + description: + name: uuid + sha256: "9b129329f58692f6e6578329498a8fe9fbe98f090beb764ffbb8ee2eadd01dcd" + url: "https://pub.dev" + source: hosted + version: "4.6.0" vector_math: dependency: transitive description: @@ -208,6 +850,62 @@ packages: url: "https://pub.dev" source: hosted version: "15.4.0" + watcher: + dependency: transitive + description: + name: watcher + sha256: "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + web: + dependency: transitive + description: + name: web + sha256: e119e82ac4795c7925103b7cf3768191f33941b99e7ccffbd6c645201d9f606b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 + url: "https://pub.dev" + source: hosted + version: "3.0.3" + win32: + dependency: transitive + description: + name: win32 + sha256: a0b93865d5644f11cf6a8c3f6db909f1ec168958b5805f6cc684adea957cd63d + url: "https://pub.dev" + source: hosted + version: "6.4.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: f67cdd8e07d3c6329146aaef1ba043542b3134c12489f553ca9a7435d1068aea + url: "https://pub.dev" + source: hosted + version: "3.1.4" sdks: dart: ">=3.13.5 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" + flutter: ">=3.47.0" diff --git a/apps/mobile/pubspec.yaml b/apps/mobile/pubspec.yaml index 15011b5..21e5afc 100644 --- a/apps/mobile/pubspec.yaml +++ b/apps/mobile/pubspec.yaml @@ -1,89 +1,34 @@ name: highfive -description: "A new Flutter project." -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +description: "highfive 5기 클라이언트 앱 (Flutter)" +publish_to: 'none' -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# In Windows, build-name is used as the major, minor, and patch parts -# of the product and file versions while build-number is used as the build suffix. version: 1.0.0+1 environment: sdk: ^3.13.5 -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.8 + dio: ^5.11.1 + flutter_riverpod: ^3.4.3 + flutter_secure_storage: ^11.2.0 + freezed_annotation: ^3.1.0 + get_it: ^9.3.0 + go_router: ^18.1.2 + json_annotation: ^4.12.0 + shared_preferences: ^2.5.6 dev_dependencies: flutter_test: sdk: flutter - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. + build_runner: ^2.17.1 flutter_lints: ^6.0.0 + freezed: ^4.0.3 + json_serializable: ^6.15.2 -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/to/resolution-aware-images - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/to/asset-from-package - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/to/font-from-package diff --git a/apps/mobile/test/app/app_test.dart b/apps/mobile/test/app/app_test.dart new file mode 100644 index 0000000..e6f436c --- /dev/null +++ b/apps/mobile/test/app/app_test.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:highfive/app/app.dart'; +import 'package:highfive/app/env.dart'; +import 'package:highfive/app/providers.dart'; +import 'package:highfive/features/auth/presentation/views/login_view.dart'; + +Widget _app(Flavor flavor) { + return ProviderScope( + overrides: [ + appEnvProvider.overrideWithValue( + AppEnv(flavor: flavor, apiBaseUrl: 'http://localhost'), + ), + ], + child: const HighfiveApp(), + ); +} + +final _devBanner = find.byWidgetPredicate( + (w) => w is Banner && w.message == 'DEV', +); + +void main() { + testWidgets('첫 화면은 로그인이다', (tester) async { + await tester.pumpWidget(_app(Flavor.dev)); + await tester.pumpAndSettle(); + + expect(find.byType(LoginView), findsOneWidget); + }); + + testWidgets('dev 환경에서만 DEV 배너를 보여준다', (tester) async { + await tester.pumpWidget(_app(Flavor.dev)); + await tester.pumpAndSettle(); + expect(_devBanner, findsOneWidget); + + await tester.pumpWidget(_app(Flavor.prod)); + await tester.pumpAndSettle(); + expect(_devBanner, findsNothing); + }); +} diff --git a/apps/mobile/test/widget_test.dart b/apps/mobile/test/widget_test.dart deleted file mode 100644 index f557603..0000000 --- a/apps/mobile/test/widget_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:highfive/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} From e52ba32472f756ba4d1f04c022e289799258feff Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 22:30:30 +0900 Subject: [PATCH 03/23] =?UTF-8?q?chore:=20=EC=95=B1=20=EB=94=94=EC=9E=90?= =?UTF-8?q?=EC=9D=B8=20=ED=86=A0=ED=81=B0=20=ED=8C=8C=EC=9D=BC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=EC=99=80=20getIt=20=EC=9C=84=EC=B9=98=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 위젯이 hex·숫자를 직접 쓰지 않도록 색·간격·모서리·글자 크기 토큰을 ThemeExtension과 상수로 둔다. 값은 docs/design-tokens.md와 웹 tokens.css에 맞춘다. getIt을 core/di로 옮겨 features가 app을 import하지 않고도 연결 Provider를 만들 수 있게 한다. --- apps/mobile/lib/app/di.dart | 6 +- apps/mobile/lib/app/providers.dart | 7 +- apps/mobile/lib/core/di/locator.dart | 8 ++ .../auth/presentation/views/login_view.dart | 11 +- apps/mobile/lib/shared/theme/app_colors.dart | 101 ++++++++++++++++++ apps/mobile/lib/shared/theme/app_radius.dart | 6 ++ apps/mobile/lib/shared/theme/app_spacing.dart | 10 ++ apps/mobile/lib/shared/theme/app_theme.dart | 19 +++- .../lib/shared/theme/app_typography.dart | 27 +++++ 9 files changed, 185 insertions(+), 10 deletions(-) create mode 100644 apps/mobile/lib/core/di/locator.dart create mode 100644 apps/mobile/lib/shared/theme/app_colors.dart create mode 100644 apps/mobile/lib/shared/theme/app_radius.dart create mode 100644 apps/mobile/lib/shared/theme/app_spacing.dart create mode 100644 apps/mobile/lib/shared/theme/app_typography.dart diff --git a/apps/mobile/lib/app/di.dart b/apps/mobile/lib/app/di.dart index 2be9d84..4d9c30d 100644 --- a/apps/mobile/lib/app/di.dart +++ b/apps/mobile/lib/app/di.dart @@ -1,18 +1,16 @@ import 'package:dio/dio.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; -import 'package:get_it/get_it.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import '../core/di/locator.dart'; import '../core/network/dio_client.dart'; import 'env.dart'; -final getIt = GetIt.instance; - /// 앱 공통 객체를 생성·연결한다. 앱 시작 시 한 번만 호출한다. /// /// - 앱 전체가 공유하는 Service·Repository 등만 등록한다. /// - ViewModel(Notifier)은 Riverpod이 관리하므로 등록하지 않는다. -/// - 다른 코드는 getIt을 직접 조회하지 않고 `providers.dart`의 연결 Provider를 거친다. +/// - 다른 코드는 getIt을 직접 조회하지 않고 연결 Provider를 거친다. void setupDi(AppEnv env) { getIt ..registerSingleton(env) diff --git a/apps/mobile/lib/app/providers.dart b/apps/mobile/lib/app/providers.dart index 75b5b44..1dc86de 100644 --- a/apps/mobile/lib/app/providers.dart +++ b/apps/mobile/lib/app/providers.dart @@ -1,10 +1,11 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'di.dart'; +import '../core/di/locator.dart'; import 'env.dart'; -/// get_it에 등록한 앱 공통 객체를 Riverpod으로 넘기는 연결 Provider. +/// 앱 전역에서 쓰는 연결 Provider. 기능별 연결 Provider는 +/// `features//presentation/providers/`에 둔다. /// -/// View·ViewModel은 getIt 대신 이 Provider들을 watch/read 한다. +/// View·ViewModel은 getIt 대신 연결 Provider를 watch/read 한다. /// 테스트는 `ProviderScope(overrides: [...])`로 바꿔 끼우고 전역 getIt 등록에 기대지 않는다. final appEnvProvider = Provider((ref) => getIt()); diff --git a/apps/mobile/lib/core/di/locator.dart b/apps/mobile/lib/core/di/locator.dart new file mode 100644 index 0000000..9e08338 --- /dev/null +++ b/apps/mobile/lib/core/di/locator.dart @@ -0,0 +1,8 @@ +import 'package:get_it/get_it.dart'; + +/// 앱 공통 객체 컨테이너. +/// +/// 등록은 `app/di.dart`에서만, 조회는 연결 Provider(`app/providers.dart`, +/// `features//presentation/providers/`)에서만 한다. +/// core에 두는 이유: features가 app을 import하지 않고도 연결 Provider를 만들 수 있게 하려는 것. +final getIt = GetIt.instance; diff --git a/apps/mobile/lib/features/auth/presentation/views/login_view.dart b/apps/mobile/lib/features/auth/presentation/views/login_view.dart index 11c20e4..d4e761d 100644 --- a/apps/mobile/lib/features/auth/presentation/views/login_view.dart +++ b/apps/mobile/lib/features/auth/presentation/views/login_view.dart @@ -1,11 +1,20 @@ import 'package:flutter/material.dart'; +import '../../../../shared/theme/app_spacing.dart'; + /// 로그인 화면. 첫 공통 예제(로그인 → 보호 화면 → 세션 복원 → 로그아웃)를 구현할 때 채운다. class LoginView extends StatelessWidget { const LoginView({super.key}); @override Widget build(BuildContext context) { - return const Scaffold(body: Center(child: Text('로그인'))); + return Scaffold( + body: Center( + child: Padding( + padding: const EdgeInsets.all(AppSpacing.x4), + child: Text('로그인', style: Theme.of(context).textTheme.titleLarge), + ), + ), + ); } } diff --git a/apps/mobile/lib/shared/theme/app_colors.dart b/apps/mobile/lib/shared/theme/app_colors.dart new file mode 100644 index 0000000..8a8b454 --- /dev/null +++ b/apps/mobile/lib/shared/theme/app_colors.dart @@ -0,0 +1,101 @@ +import 'package:flutter/material.dart'; + +/// 원시(primitive) 팔레트. 이 파일 밖에서 쓰지 않는다. +/// +/// 값의 기준은 `docs/design-tokens.md`이고, +/// `apps/web/src/shared/styles/tokens.css`와 같은 값을 유지한다. +abstract final class _Palette { + static const brand500 = Color(0xFF4F46E5); + static const brand600 = Color(0xFF4338CA); + static const gray50 = Color(0xFFF9FAFB); + static const gray200 = Color(0xFFE5E7EB); + static const gray600 = Color(0xFF4B5563); + static const gray900 = Color(0xFF111827); + static const red500 = Color(0xFFEF4444); + static const white = Color(0xFFFFFFFF); +} + +/// 의미(semantic) 색 토큰. 위젯은 `context.colors.primary`처럼 이것만 쓰고 +/// hex 값이나 `Colors.*`를 직접 쓰지 않는다. +@immutable +class AppColors extends ThemeExtension { + const AppColors({ + required this.primary, + required this.primaryPressed, + required this.onPrimary, + required this.background, + required this.surface, + required this.textPrimary, + required this.textSecondary, + required this.border, + required this.danger, + }); + + static const light = AppColors( + primary: _Palette.brand500, + primaryPressed: _Palette.brand600, + onPrimary: _Palette.white, + background: _Palette.gray50, + surface: _Palette.white, + textPrimary: _Palette.gray900, + textSecondary: _Palette.gray600, + border: _Palette.gray200, + danger: _Palette.red500, + ); + + final Color primary; + final Color primaryPressed; + final Color onPrimary; + final Color background; + final Color surface; + final Color textPrimary; + final Color textSecondary; + final Color border; + final Color danger; + + @override + AppColors copyWith({ + Color? primary, + Color? primaryPressed, + Color? onPrimary, + Color? background, + Color? surface, + Color? textPrimary, + Color? textSecondary, + Color? border, + Color? danger, + }) { + return AppColors( + primary: primary ?? this.primary, + primaryPressed: primaryPressed ?? this.primaryPressed, + onPrimary: onPrimary ?? this.onPrimary, + background: background ?? this.background, + surface: surface ?? this.surface, + textPrimary: textPrimary ?? this.textPrimary, + textSecondary: textSecondary ?? this.textSecondary, + border: border ?? this.border, + danger: danger ?? this.danger, + ); + } + + @override + AppColors lerp(AppColors? other, double t) { + if (other == null) return this; + return AppColors( + primary: Color.lerp(primary, other.primary, t)!, + primaryPressed: Color.lerp(primaryPressed, other.primaryPressed, t)!, + onPrimary: Color.lerp(onPrimary, other.onPrimary, t)!, + background: Color.lerp(background, other.background, t)!, + surface: Color.lerp(surface, other.surface, t)!, + textPrimary: Color.lerp(textPrimary, other.textPrimary, t)!, + textSecondary: Color.lerp(textSecondary, other.textSecondary, t)!, + border: Color.lerp(border, other.border, t)!, + danger: Color.lerp(danger, other.danger, t)!, + ); + } +} + +extension AppColorsContext on BuildContext { + /// `context.colors.primary` 형태로 쓴다. + AppColors get colors => Theme.of(this).extension()!; +} diff --git a/apps/mobile/lib/shared/theme/app_radius.dart b/apps/mobile/lib/shared/theme/app_radius.dart new file mode 100644 index 0000000..17e48b2 --- /dev/null +++ b/apps/mobile/lib/shared/theme/app_radius.dart @@ -0,0 +1,6 @@ +/// 모서리 토큰(논리 픽셀). 웹의 `--radius-*`와 같은 값을 쓴다. +abstract final class AppRadius { + static const sm = 8.0; + static const md = 12.0; + static const lg = 16.0; +} diff --git a/apps/mobile/lib/shared/theme/app_spacing.dart b/apps/mobile/lib/shared/theme/app_spacing.dart new file mode 100644 index 0000000..29eef44 --- /dev/null +++ b/apps/mobile/lib/shared/theme/app_spacing.dart @@ -0,0 +1,10 @@ +/// 간격 토큰(논리 픽셀, 4 배수). 웹의 `--space-N`과 같은 번호를 쓴다. +/// 위젯에서 `EdgeInsets.all(16)`처럼 숫자를 직접 쓰지 않는다. +abstract final class AppSpacing { + static const x1 = 4.0; + static const x2 = 8.0; + static const x3 = 12.0; + static const x4 = 16.0; + static const x6 = 24.0; + static const x8 = 32.0; +} diff --git a/apps/mobile/lib/shared/theme/app_theme.dart b/apps/mobile/lib/shared/theme/app_theme.dart index 49d6575..94d0a89 100644 --- a/apps/mobile/lib/shared/theme/app_theme.dart +++ b/apps/mobile/lib/shared/theme/app_theme.dart @@ -1,6 +1,21 @@ import 'package:flutter/material.dart'; -/// 디자인 토큰이 정해지면 색·타이포를 여기서 관리한다. +import 'app_colors.dart'; +import 'app_typography.dart'; + +/// 토큰(app_colors, app_typography, app_spacing, app_radius)을 `ThemeData`로 묶는다. +/// 색·크기 값은 여기서 새로 정하지 않고 토큰 파일에서만 가져온다. abstract final class AppTheme { - static final light = ThemeData(colorSchemeSeed: Colors.indigo); + static final light = ThemeData( + colorScheme: ColorScheme.fromSeed( + seedColor: AppColors.light.primary, + primary: AppColors.light.primary, + onPrimary: AppColors.light.onPrimary, + surface: AppColors.light.surface, + error: AppColors.light.danger, + ), + scaffoldBackgroundColor: AppColors.light.background, + textTheme: AppTypography.textTheme, + extensions: const [AppColors.light], + ); } diff --git a/apps/mobile/lib/shared/theme/app_typography.dart b/apps/mobile/lib/shared/theme/app_typography.dart new file mode 100644 index 0000000..5a5a396 --- /dev/null +++ b/apps/mobile/lib/shared/theme/app_typography.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; + +/// 글자 크기 토큰. 웹의 `--font-size-*`와 같은 값을 쓴다. +abstract final class AppFontSize { + static const sm = 14.0; + static const md = 16.0; + static const lg = 20.0; + static const xl = 24.0; +} + +/// 토큰을 Material `TextTheme`에 매핑한다. 위젯은 `Theme.of(context).textTheme.*`를 쓰고 +/// `TextStyle(fontSize: 16)`처럼 크기를 직접 쓰지 않는다. +/// 지정하지 않은 스타일은 Material 기본값과 합쳐진다. 폰트 패밀리는 디자인 확정 후 넣는다. +abstract final class AppTypography { + static const textTheme = TextTheme( + headlineSmall: TextStyle( + fontSize: AppFontSize.xl, + fontWeight: FontWeight.w700, + ), + titleLarge: TextStyle( + fontSize: AppFontSize.lg, + fontWeight: FontWeight.w600, + ), + bodyMedium: TextStyle(fontSize: AppFontSize.md), + bodySmall: TextStyle(fontSize: AppFontSize.sm), + ); +} From 58f78e967feb1af00963315c48475045a00e3f08 Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 22:39:37 +0900 Subject: [PATCH 04/23] =?UTF-8?q?chore:=20=EC=9B=B9(React=20+=20TypeScript?= =?UTF-8?q?=20+=20Vite)=20=EC=B4=88=EA=B8=B0=20=EC=84=B8=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 공개 페이지와 관객용 모바일 웹을 앱과 같은 저장소에서 만들기 위한 뼈대. feature-first 구조, 라우터, 환경값 검증, 디자인 토큰 CSS, fetch 래퍼, vitest 테스트, ESLint·Prettier를 넣는다. TypeScript는 typescript-eslint 지원 범위에 맞춰 6.0.x로 고정한다. --- apps/web/.env | 3 + apps/web/.env.production | 3 + apps/web/.gitignore | 24 + apps/web/.nvmrc | 1 + apps/web/.prettierignore | 3 + apps/web/.prettierrc | 1 + apps/web/eslint.config.js | 24 + apps/web/index.html | 12 + apps/web/package.json | 47 + apps/web/pnpm-lock.yaml | 2533 +++++++++++++++++ apps/web/pnpm-workspace.yaml | 5 + apps/web/src/app/env.ts | 19 + apps/web/src/app/router.test.tsx | 20 + apps/web/src/app/router.tsx | 10 + apps/web/src/app/routes.ts | 1 + .../notices/pages/NoticeListPage.module.css | 5 + .../features/notices/pages/NoticeListPage.tsx | 10 + apps/web/src/main.tsx | 15 + apps/web/src/shared/api/http.ts | 32 + apps/web/src/shared/styles/global.css | 27 + apps/web/src/shared/styles/tokens.css | 35 + apps/web/src/vite-env.d.ts | 10 + apps/web/tsconfig.app.json | 27 + apps/web/tsconfig.json | 4 + apps/web/tsconfig.node.json | 24 + apps/web/vite.config.ts | 10 + 26 files changed, 2905 insertions(+) create mode 100644 apps/web/.env create mode 100644 apps/web/.env.production create mode 100644 apps/web/.gitignore create mode 100644 apps/web/.nvmrc create mode 100644 apps/web/.prettierignore create mode 100644 apps/web/.prettierrc create mode 100644 apps/web/eslint.config.js create mode 100644 apps/web/index.html create mode 100644 apps/web/package.json create mode 100644 apps/web/pnpm-lock.yaml create mode 100644 apps/web/pnpm-workspace.yaml create mode 100644 apps/web/src/app/env.ts create mode 100644 apps/web/src/app/router.test.tsx create mode 100644 apps/web/src/app/router.tsx create mode 100644 apps/web/src/app/routes.ts create mode 100644 apps/web/src/features/notices/pages/NoticeListPage.module.css create mode 100644 apps/web/src/features/notices/pages/NoticeListPage.tsx create mode 100644 apps/web/src/main.tsx create mode 100644 apps/web/src/shared/api/http.ts create mode 100644 apps/web/src/shared/styles/global.css create mode 100644 apps/web/src/shared/styles/tokens.css create mode 100644 apps/web/src/vite-env.d.ts create mode 100644 apps/web/tsconfig.app.json create mode 100644 apps/web/tsconfig.json create mode 100644 apps/web/tsconfig.node.json create mode 100644 apps/web/vite.config.ts diff --git a/apps/web/.env b/apps/web/.env new file mode 100644 index 0000000..c243f62 --- /dev/null +++ b/apps/web/.env @@ -0,0 +1,3 @@ +# API URL is a placeholder until BE confirms; never put secrets in VITE_*. +VITE_FLAVOR=dev +VITE_API_BASE_URL=https://dev-api.highfive.example diff --git a/apps/web/.env.production b/apps/web/.env.production new file mode 100644 index 0000000..2d181e5 --- /dev/null +++ b/apps/web/.env.production @@ -0,0 +1,3 @@ +# API URL is a placeholder until BE confirms; never put secrets in VITE_*. +VITE_FLAVOR=prod +VITE_API_BASE_URL=https://api.highfive.example diff --git a/apps/web/.gitignore b/apps/web/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/apps/web/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/apps/web/.nvmrc b/apps/web/.nvmrc new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/apps/web/.nvmrc @@ -0,0 +1 @@ +24 diff --git a/apps/web/.prettierignore b/apps/web/.prettierignore new file mode 100644 index 0000000..c4cbfff --- /dev/null +++ b/apps/web/.prettierignore @@ -0,0 +1,3 @@ +dist +node_modules +pnpm-lock.yaml diff --git a/apps/web/.prettierrc b/apps/web/.prettierrc new file mode 100644 index 0000000..fef7c6d --- /dev/null +++ b/apps/web/.prettierrc @@ -0,0 +1 @@ +{ "semi": true, "singleQuote": true, "printWidth": 100, "trailingComma": "all" } diff --git a/apps/web/eslint.config.js b/apps/web/eslint.config.js new file mode 100644 index 0000000..6db529d --- /dev/null +++ b/apps/web/eslint.config.js @@ -0,0 +1,24 @@ +import js from '@eslint/js'; +import globals from 'globals'; +import reactHooks from 'eslint-plugin-react-hooks'; +import reactRefresh from 'eslint-plugin-react-refresh'; +import tseslint from 'typescript-eslint'; +import { defineConfig, globalIgnores } from 'eslint/config'; +import eslintConfigPrettier from 'eslint-config-prettier'; + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + js.configs.recommended, + tseslint.configs.recommended, + reactHooks.configs.flat.recommended, + reactRefresh.configs.vite, + ], + languageOptions: { + globals: globals.browser, + }, + }, + eslintConfigPrettier, +]); diff --git a/apps/web/index.html b/apps/web/index.html new file mode 100644 index 0000000..ced34b9 --- /dev/null +++ b/apps/web/index.html @@ -0,0 +1,12 @@ + + + + + + highfive + + +
+ + + diff --git a/apps/web/package.json b/apps/web/package.json new file mode 100644 index 0000000..364ad83 --- /dev/null +++ b/apps/web/package.json @@ -0,0 +1,47 @@ +{ + "name": "highfive-web", + "private": true, + "version": "0.0.0", + "type": "module", + "packageManager": "pnpm@12.16.1", + "engines": { + "node": ">=24" + }, + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "build:dev": "tsc -b && vite build --mode dev", + "lint": "eslint .", + "preview": "vite preview", + "typecheck": "tsc -b", + "test": "vitest run", + "test:watch": "vitest", + "format": "prettier --write .", + "format:check": "prettier --check ." + }, + "dependencies": { + "react": "^19.3.1", + "react-dom": "^19.3.1", + "react-router": "^8.5.1" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@testing-library/dom": "^10.4.2", + "@testing-library/react": "^16.3.3", + "@types/node": "^24.19.2", + "@types/react": "^19.3.0", + "@types/react-dom": "^19.3.0", + "@vitejs/plugin-react": "6.2.1", + "eslint": "^10.13.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-react-hooks": "^7.1.1", + "eslint-plugin-react-refresh": "^0.5.7", + "globals": "^17.13.0", + "jsdom": "^30.1.3", + "prettier": "^3.9.10", + "typescript": "~6.0.3", + "typescript-eslint": "^8.72.0", + "vite": "^8.3.5", + "vitest": "^5.0.5" + } +} diff --git a/apps/web/pnpm-lock.yaml b/apps/web/pnpm-lock.yaml new file mode 100644 index 0000000..d79a425 --- /dev/null +++ b/apps/web/pnpm-lock.yaml @@ -0,0 +1,2533 @@ +--- +lockfileVersion: '9.0' + +importers: + + .: + configDependencies: {} + packageManagerDependencies: + pnpm: + specifier: 12.16.1 + version: 12.16.1 + +packages: + + '@pnpm/exe.android-arm64@12.16.1': + resolution: {integrity: sha512-PKf78Ew+i0CBYf0Xc+eMcqQiqyBT+u8XCVg1F5roc98/6wWfdYlWhrUMmEBiKWaJ3JqHxrtt8l1NwZ7qfJt2/Q==} + cpu: [arm64] + os: [android] + + '@pnpm/exe.android-x64@12.16.1': + resolution: {integrity: sha512-xdu7gMbB98pdvhwMeA6612Of515FDlRUtfA/1f7nWPZfPLnEdSRBO2u+1N0XBtQ/ennhPH/lrxB1gC6gnR/cdg==} + cpu: [x64] + os: [android] + + '@pnpm/exe.darwin-arm64@12.16.1': + resolution: {integrity: sha512-pVbmIIbhixiLvADLu1WA3TaW8FZy/D72R1De27WbbFx8/2mxvnsTyFVm4fO9kjpjMY7RzJd48CiQ96p8fO3ebQ==} + cpu: [arm64] + os: [darwin] + + '@pnpm/exe.darwin-x64@12.16.1': + resolution: {integrity: sha512-xZvQBFqcZjO7vFKTK3XsJpqY6lnBL9EWSLCzVUPq3kZ94+D96gwJCa76xxGNK8Cj32f4eeM91Qg+yNRR4sRpDw==} + cpu: [x64] + os: [darwin] + + '@pnpm/exe.freebsd-x64@12.16.1': + resolution: {integrity: sha512-zTtunfi9mBhRXiXEJYfwiJj0tk7MgTSfqDSRh+Az9FZ9THazVIiQiVNS8jpcsftDOqu7LKNffQdjmgwHDThfUg==} + cpu: [x64] + os: [freebsd] + + '@pnpm/exe.linux-arm64-musl@12.16.1': + resolution: {integrity: sha512-BJ3mOmcmQgcUo92Ee/WfEOt1pRiv3y2MMAkhEiYHd85UiPpHTfFhv+SpCbALmfExzXk3UlaRtMYwHlkQymc4VA==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@pnpm/exe.linux-arm64@12.16.1': + resolution: {integrity: sha512-JaRd5gNxwdNGBBkrZFt8bknrK4YmHVJBW0JMhUQ0fJ0dEYp6C2GT9ExaCqOO8EwYEyqM+jpKgJIK+8WFaJy3ew==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-ppc64@12.16.1': + resolution: {integrity: sha512-FnSV0Jv40S1cMv7vFNWwvu0X567Lec4L4HCRead3CFcD6zQDNbGw81s8N5bcKPahtPD9ApVuhsbmFCx4rw6RMw==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-riscv64@12.16.1': + resolution: {integrity: sha512-C1Sww4FN5IttD4atRRhAKmQtSGWVp04ZAKNxO8pfu2bkRPwOW+7v+2DH1Xs1W+kZYYpO86BYDvUcadefF+AgaQ==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-s390x@12.16.1': + resolution: {integrity: sha512-kn2fautsTcxIMODoovQVqZyfpDRdNgGkoeVqNdrKqbeBBvrEl+fXLkmZiq5xDht1LMr4sYiCNcsMfNMT6JPFmg==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-x64-musl@12.16.1': + resolution: {integrity: sha512-PM6ccHCOe/O9SsTflTJTYWfwogJZa6EmUvpnwZgiPguJBddh20wDQKgxUPXf48rDsPm9vMsIij0uHswwwbXL8g==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@pnpm/exe.linux-x64@12.16.1': + resolution: {integrity: sha512-RK//8ZLcXGW8A2k8bQOXZDBN1Qu92zN4dYnG1bzj1zoQ1fkZ6jNzZ1AvXtsfGVma795CJtvoaF5bLXf4l/FIUw==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.win32-arm64@12.16.1': + resolution: {integrity: sha512-Ox3kNNVxtGw6pK7SVejmeOUgHhUTZgAM7NQQ6cU7frPw3ix9+j7d2MGbRg3fyEFAaKWq8ZAZLTQGcDyLnAu+qA==} + cpu: [arm64] + os: [win32] + + '@pnpm/exe.win32-x64@12.16.1': + resolution: {integrity: sha512-k+FhRJ0ttphFoFIVB1Sk4v76YJAulafmA/Ly57cysesUhhIzVlApeOShUz0jXubKx317TThlEfpQrukldnqORA==} + cpu: [x64] + os: [win32] + + pnpm@12.16.1: + resolution: {integrity: sha512-CR0d7nknV1Zhsl2rPCrjHK/BxU1rce1qZgDPDByxBDSkR+rhQBXxsj4ua+3u1535SpMuIWTSgyKA3OP7MvZW0Q==} + engines: {node: '>=18'} + hasBin: true + +snapshots: + + '@pnpm/exe.android-arm64@12.16.1': + optional: true + + '@pnpm/exe.android-x64@12.16.1': + optional: true + + '@pnpm/exe.darwin-arm64@12.16.1': + optional: true + + '@pnpm/exe.darwin-x64@12.16.1': + optional: true + + '@pnpm/exe.freebsd-x64@12.16.1': + optional: true + + '@pnpm/exe.linux-arm64-musl@12.16.1': + optional: true + + '@pnpm/exe.linux-arm64@12.16.1': + optional: true + + '@pnpm/exe.linux-ppc64@12.16.1': + optional: true + + '@pnpm/exe.linux-riscv64@12.16.1': + optional: true + + '@pnpm/exe.linux-s390x@12.16.1': + optional: true + + '@pnpm/exe.linux-x64-musl@12.16.1': + optional: true + + '@pnpm/exe.linux-x64@12.16.1': + optional: true + + '@pnpm/exe.win32-arm64@12.16.1': + optional: true + + '@pnpm/exe.win32-x64@12.16.1': + optional: true + + pnpm@12.16.1: + optionalDependencies: + '@pnpm/exe.android-arm64': 12.16.1 + '@pnpm/exe.android-x64': 12.16.1 + '@pnpm/exe.darwin-arm64': 12.16.1 + '@pnpm/exe.darwin-x64': 12.16.1 + '@pnpm/exe.freebsd-x64': 12.16.1 + '@pnpm/exe.linux-arm64': 12.16.1 + '@pnpm/exe.linux-arm64-musl': 12.16.1 + '@pnpm/exe.linux-ppc64': 12.16.1 + '@pnpm/exe.linux-riscv64': 12.16.1 + '@pnpm/exe.linux-s390x': 12.16.1 + '@pnpm/exe.linux-x64': 12.16.1 + '@pnpm/exe.linux-x64-musl': 12.16.1 + '@pnpm/exe.win32-arm64': 12.16.1 + '@pnpm/exe.win32-x64': 12.16.1 + +--- +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + react: + specifier: ^19.3.1 + version: 19.3.1 + react-dom: + specifier: ^19.3.1 + version: 19.3.1(react@19.3.1) + react-router: + specifier: ^8.5.1 + version: 8.5.1(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) + devDependencies: + '@eslint/js': + specifier: ^10.0.1 + version: 10.0.1(eslint@10.14.0) + '@testing-library/dom': + specifier: ^10.4.2 + version: 10.4.2 + '@testing-library/react': + specifier: ^16.3.3 + version: 16.3.3(@testing-library/dom@10.4.2)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) + '@types/node': + specifier: ^24.19.2 + version: 24.19.2 + '@types/react': + specifier: ^19.3.0 + version: 19.3.0 + '@types/react-dom': + specifier: ^19.3.0 + version: 19.3.0(@types/react@19.3.0) + '@vitejs/plugin-react': + specifier: 6.2.1 + version: 6.2.1(vite@8.3.5(@types/node@24.19.2)) + eslint: + specifier: ^10.13.0 + version: 10.14.0 + eslint-config-prettier: + specifier: ^10.1.8 + version: 10.1.8(eslint@10.14.0) + eslint-plugin-react-hooks: + specifier: ^7.1.1 + version: 7.1.1(eslint@10.14.0) + eslint-plugin-react-refresh: + specifier: ^0.5.7 + version: 0.5.7(eslint@10.14.0) + globals: + specifier: ^17.13.0 + version: 17.14.0 + jsdom: + specifier: ^30.1.3 + version: 30.1.3 + prettier: + specifier: ^3.9.10 + version: 3.9.10 + typescript: + specifier: ~6.0.3 + version: 6.0.3 + typescript-eslint: + specifier: ^8.72.0 + version: 8.72.1(eslint@10.14.0)(typescript@6.0.3) + vite: + specifier: ^8.3.5 + version: 8.3.5(@types/node@24.19.2) + vitest: + specifier: ^5.0.5 + version: 5.0.5(@types/node@24.19.2)(jsdom@30.1.3)(vite@8.3.5(@types/node@24.19.2)) + +packages: + + '@asamuzakjp/css-color@7.1.9': + resolution: {integrity: sha512-vZ6JQVq8Ivgz6b/IBlAf90wZviXdluY13cQOPO+nJHbmXwGrPl2GcpqUY7a55/8ZVdfONXpCFMpRijOBCHNlcQ==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + + '@asamuzakjp/dom-selector@10.0.5': + resolution: {integrity: sha512-EgmJ7oEaGQECTn3H3wmnQpEy4hKY66VvM7VQndwPIQob3p877BgbyOUE3EX0LgXQCciF2H8KMdR+RznqjMNOLw==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.29.7': + resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.29.7': + resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.29.12': + resolution: {integrity: sha512-2W76mhjrpQFO1lK5e8IvGYB2D0YZ7S2R1Z2BjO2ZUYuW+amcpK/z60U6ZZmzskwoa7sJ6XohP/Wg8H5KxXI/IA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.29.7': + resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-globals@7.29.7': + resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.29.7': + resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.29.7': + resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-string-parser@7.29.11': + resolution: {integrity: sha512-snZbO7MEDOof+hvNa97EjEY7qD7h2kwvQr5AJC3ZhQudKW5dnej6k3kP9NQV88hJwaS8vDqRLFo9rivLEhle2g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.29.7': + resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.29.10': + resolution: {integrity: sha512-EMCx3AGZ3WfAl6ht7AyQoPm2Lh+BGYEMdc4Q6Hf7uSCDOZFuLq44qNwL+iaim8VlyYhRAo4X43+weadK8ZB4Yg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.12': + resolution: {integrity: sha512-WJ7JBp/Q4+z/ImydtI7jS6NVco5++632ExBemSX+Ysb+G1lCwQ5BVo3SY+jGGOcZXI4ZccbZSUSJLNBW6eEpJg==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/runtime@7.29.10': + resolution: {integrity: sha512-NpugTzbKgGrNe45Ui32cN8vCFFMxVtP/9rtfwv0nP5FRDAjvYBxJcLVpYA9mr1jxP6cnIT7x9LUzuDTbWYYNRA==} + engines: {node: '>=6.9.0'} + + '@babel/template@7.29.7': + resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.29.12': + resolution: {integrity: sha512-MscXe/NAZcOkYEsRajHZFt3ynsb22PUi6CTrp5U7+RYycR9By84mn9mFN54YgfITiqK4hFx3Ju3tZSyzfpS5ew==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.29.11': + resolution: {integrity: sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==} + engines: {node: '>=6.9.0'} + + '@bramus/specificity@2.4.3': + resolution: {integrity: sha512-0GEz8qJWokkUVYQYRukmkSHIFNoBH8QTreeHrAFbvz1XFYc3Y+puhMs8PQ5x8GNugiC2l5jvDBXKLbBIByeSBw==} + hasBin: true + + '@cacheable/memory@2.2.0': + resolution: {integrity: sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==} + + '@cacheable/utils@2.5.0': + resolution: {integrity: sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==} + + '@csstools/color-helpers@6.1.2': + resolution: {integrity: sha512-grhRy3OKmniaAEKXMjua5z/EODX0MSqBGjunw8+j/3HQjOnahs2AGhvEOIYVUWcU6ScApbhLhVrQTX8XqrMrow==} + engines: {node: '>=20.19.0'} + + '@csstools/css-calc@3.4.3': + resolution: {integrity: sha512-iex20d8CHVkyvg6B7UKV7uHnI2Bqo9g+EFfT9E0y+GvTvhZ/DwONJ+9aKb1dlqm0ZiGsL5RXjp0fCoJYnkeDjA==} + engines: {node: '>=20.19.0'} + peerDependencies: + '@csstools/css-parser-algorithms': ^4.0.2 + '@csstools/css-tokenizer': ^4.0.2 + + '@csstools/css-color-parser@4.2.7': + resolution: {integrity: sha512-zgm9yjQz5iJB4VL8RyVwd71TWB8Q89FSxt/NzXoWqPSkEBOVtn9L6vAPtSc9hpKfB0Awo/AL2VKFHjYetBLFHQ==} + engines: {node: '>=20.19.0'} + peerDependencies: + '@csstools/css-parser-algorithms': ^4.0.2 + '@csstools/css-tokenizer': ^4.0.2 + + '@csstools/css-parser-algorithms@4.0.2': + resolution: {integrity: sha512-40cSKyMvK+tq4qz6Awrlye2WGuOKt3FwPgtGg6KTfbHOWNw+Rk1rzbAtZnZ6IBhsY491HLRnDXwoyBAijmmILA==} + engines: {node: '>=20.19.0'} + peerDependencies: + '@csstools/css-tokenizer': ^4.0.2 + + '@csstools/css-syntax-patches-for-csstree@1.1.16': + resolution: {integrity: sha512-LsDbJPP/B8cPasUJyTA5S99F7C4G93ngW8hUluXz8CFeOaaRnBPtBiIlvgcPYU0HmHNz8CXg+1vwFrIB4F6Dgw==} + peerDependencies: + css-tree: ^3.2.1 + peerDependenciesMeta: + css-tree: + optional: true + + '@csstools/css-tokenizer@4.0.2': + resolution: {integrity: sha512-OoKoR0f76dCY666JlcbhmVTs2drYj1GUXZTYTcbUgJjh9Nv41aFfZ21bPQTERm5+L5cBDo466NltB2lplS5GBw==} + engines: {node: '>=20.19.0'} + + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.2': + resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.23.5': + resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/config-helpers@0.7.0': + resolution: {integrity: sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/core@1.2.1': + resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/js@10.0.1': + resolution: {integrity: sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + peerDependencies: + eslint: ^10.0.0 + peerDependenciesMeta: + eslint: + optional: true + + '@eslint/object-schema@3.0.5': + resolution: {integrity: sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/plugin-kit@0.7.3': + resolution: {integrity: sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@exodus/bytes@1.16.0': + resolution: {integrity: sha512-IcpW84uEn3N7ETtNZMlxKhfl6Pec8rUNGOTBtWbK1FKhJxIFAptZyVrvVRVBimAJxJCgc3PxepxkdWWG4DVzfA==} + engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + peerDependencies: + '@noble/hashes': ^1.8.0 || ^2.0.0 + peerDependenciesMeta: + '@noble/hashes': + optional: true + + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@keyv/bigmap@1.3.1': + resolution: {integrity: sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==} + engines: {node: '>= 18'} + peerDependencies: + keyv: ^5.6.0 + + '@keyv/serialize@1.1.1': + resolution: {integrity: sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==} + + '@oxc-project/types@0.156.0': + resolution: {integrity: sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==} + + '@remix-run/route-pattern@0.22.1': + resolution: {integrity: sha512-czdGJWh09Lapvcqt7Vb09KlrU2PhRJ8xQaI+AItTuD9aDJ5MAgxnS38lnys6Ll+6RJEqPiaUqTwIQhVLwFvv+w==} + + '@rolldown/binding-android-arm-eabi@1.2.16': + resolution: {integrity: sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@rolldown/binding-android-arm64@1.2.16': + resolution: {integrity: sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.2.16': + resolution: {integrity: sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.2.16': + resolution: {integrity: sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.2.16': + resolution: {integrity: sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.2.16': + resolution: {integrity: sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.2.16': + resolution: {integrity: sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.2.16': + resolution: {integrity: sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.2.16': + resolution: {integrity: sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.2.16': + resolution: {integrity: sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.2.16': + resolution: {integrity: sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.2.16': + resolution: {integrity: sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.2.16': + resolution: {integrity: sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-win32-arm64-msvc@1.2.16': + resolution: {integrity: sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.2.16': + resolution: {integrity: sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@testing-library/dom@10.4.2': + resolution: {integrity: sha512-yzr2S9HyAIdhz2/6qHgbs665Q7PKVcDF05vsOlHPxG1mo36gKVesdYVeDLnXgfjJ03CrKRk08knc6+E/9m8v2Q==} + engines: {node: '>=18'} + + '@testing-library/react@16.3.3': + resolution: {integrity: sha512-Uo193NgQbPMz6lrrhtRQQFcMC6Re/ELLFbbuVL30WDlZxlpZf9/lMHTAVxPRLw1q1iu9OJmR1c2BLiENRstdBg==} + engines: {node: '>=18'} + peerDependencies: + '@testing-library/dom': ^10.0.0 + '@types/react': ^18.0.0 || ^19.0.0 + '@types/react-dom': ^18.0.0 || ^19.0.0 + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@types/aria-query@5.0.4': + resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/esrecurse@4.3.1': + resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==} + + '@types/estree@1.0.10': + resolution: {integrity: sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/node@24.19.2': + resolution: {integrity: sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==} + + '@types/react-dom@19.3.0': + resolution: {integrity: sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==} + peerDependencies: + '@types/react': ^19.3.0 + + '@types/react@19.3.0': + resolution: {integrity: sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==} + + '@typescript-eslint/eslint-plugin@8.72.1': + resolution: {integrity: sha512-5CokTWXpmbylfFabsbvHC0CAw3XLaGnoa+nFJX5FR592h/LoZsENUE6p/rg5xvkKrFEXz6pYmgI29AgXc2N3BQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.72.1 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/parser@8.72.1': + resolution: {integrity: sha512-ZGwZP4OCfyA0AQTpEAMWz+rtX01DRhQWW5hB0ucKDEIX5U7jdmPSaMx94rQfaPAQzIYz2BimOgKOJtjfpRFQ9g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/project-service@8.72.1': + resolution: {integrity: sha512-fAuVMkwdO/huI8nyo/WKnNKf6Gag93S56Rh3Ts5mGcavwSdaN8tRg1gCeIGX8PF+nzp1BjGfO4gHhGzW1J6jTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/scope-manager@8.72.1': + resolution: {integrity: sha512-lC/t6eMCZZQAAKZEYGL6RDVSuFehpdmMT6h+nJIjIa6oylN/PwDgDVtEIbB7O9xFfZYtZAYLoLlDNWKJhtF+uQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.72.1': + resolution: {integrity: sha512-e4D5R5vpeAEPBxT2BAzsFQL3sbwyeeeo5+aczgNSRK1V734jE7pTqaGFU+fXapWEQwnZbpFaTn32+Z8DwS6OTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/type-utils@8.72.1': + resolution: {integrity: sha512-iY2wlmyrXJmx4yxUGP3aYCFF3cA/6ShddOKmLU2dx7LnEykbAM8WThlxZEfd1NddqceF6eJmZUayxx9oKIYNlg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/types@8.72.1': + resolution: {integrity: sha512-LmE5IhQet1BWOWEXqBrVtBPsMAOQ6Nzk35d+WLh3mk4EUF33sqlfxjio1MdYeSvKSG5skactKKuixBIKXhL4Rw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.72.1': + resolution: {integrity: sha512-DAlUoUV93hIvrtIQLwCbmZQYVZwOMhiHJrOVUUIWicFZaIYjTRqlY3I/NZevfkLmSqkNHRu2qYDcq9lrn16oOQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/utils@8.72.1': + resolution: {integrity: sha512-5v5liypurJBFHCBNqh/RjsymAD+VWcE0djuGY/BUqp5fC3Qn+luWDEksjuTtWjPn6i5zQlUtkZCRG/CYG0yCkA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/visitor-keys@8.72.1': + resolution: {integrity: sha512-SB8xqipSzZHUePCCLNeYxqnxq83X61/qzNhjQGbTfjxGZIeOEP7tBgWYX05Tcd6CgE02WdTJnh5b8kMZJ/+bnQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@vitejs/plugin-react@6.2.1': + resolution: {integrity: sha512-9KyWCij3r0+qLG3Q62vBmv0VyevmYibAtxaCIVK9o0k6CXgaajZRIe8tpfchQcdZArJ5b/7OrIz4W3b2uxVRDA==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@rolldown/plugin-babel': ^0.1.7 || ^0.2.0 || ^0.3.0 + babel-plugin-react-compiler: ^1.0.0 + oxc-transform-react: '>=0.152.0 <0.157.0' + vite: ^8.0.0 + peerDependenciesMeta: + '@rolldown/plugin-babel': + optional: true + babel-plugin-react-compiler: + optional: true + oxc-transform-react: + optional: true + + '@vitest/mocker@5.0.5': + resolution: {integrity: sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==} + peerDependencies: + msw: ^2.4.9 || ^3.0.0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/spy@5.0.5': + resolution: {integrity: sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.19.0: + resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + + aria-query@5.3.0: + resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + + baseline-browser-mapping@2.11.34: + resolution: {integrity: sha512-Aqr8mA1kIvyJ3UY5YAY7ib8LSo1DmDMbMnVqGPtsKW1LxaFQFwn9Eb3yvq2fUKJsRvaXjnAV7R5osqETapzNiA==} + engines: {node: '>=6.0.0'} + hasBin: true + + bidi-js@1.1.0: + resolution: {integrity: sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg==} + + brace-expansion@5.0.12: + resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} + engines: {node: 20 || >=22} + + browserslist@4.29.5: + resolution: {integrity: sha512-khTmKu5NGYTotqcYo8Bew2k4RAE9PuXRSFRXG2lQBrCEQHyeQ/vX6gKMxfokwywBsLiXZMnHsmWMG1pnO8J7uQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + cacheable@2.5.0: + resolution: {integrity: sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==} + + caniuse-lite@1.0.30001820: + resolution: {integrity: sha512-gfWD6MxqVCqAOwmODfZf7DchWvlrA+SRdNX7ceLfg3xRqe5ssjjpF7EgslC/0tiLiNTajdaNN/q8c/5u/7Gz8w==} + + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + cookie-es@3.1.1: + resolution: {integrity: sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + css-tree@3.2.1: + resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + data-urls@8.0.0: + resolution: {integrity: sha512-JQUCCK+/CAGbGGx618PlFZMXH81Jtj7t73CHv9dd/zVWvxgGT2zLFRjnKb+Ng46GIwcy+f7f88qd4duqllK+WQ==} + engines: {node: ^22.14.0 || >=24.0.0} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decimal.js@10.6.0: + resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + dom-accessibility-api@0.5.16: + resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} + + electron-to-chromium@1.5.472: + resolution: {integrity: sha512-s4+nfT29b0FKpVKoaIxl2pWsoNcn7A/nMPSrxayw4T3BsmPeV2lF9Y06BsAQeMGhCTQ4nYJ5XST7jkqe4ZEqFw==} + + entities@8.1.0: + resolution: {integrity: sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==} + engines: {node: '>=20.19.0'} + + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-config-prettier@10.1.8: + resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + + eslint-plugin-react-hooks@7.1.1: + resolution: {integrity: sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g==} + engines: {node: '>=18'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0 + + eslint-plugin-react-refresh@0.5.7: + resolution: {integrity: sha512-XhJSzLljuYD4UjNuFGJu2v7aD3sqNVK12w5/DCUfrNfHWegZo2+TsavNx8MuxMwEquuFAzNbNfXKU0WoZ+YUIg==} + peerDependencies: + eslint: ^9 || ^10 + + eslint-scope@9.1.2: + resolution: {integrity: sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@5.0.1: + resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + eslint@10.14.0: + resolution: {integrity: sha512-T0pNsxkb9IKmtQjhpK3d7nWOpFv+YHuMbTJnSVMoQblF0onvXfErrtp4V1jHtsQPan7dKaGVD0q1WCXnzMF31A==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@11.2.0: + resolution: {integrity: sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + file-entry-cache@11.1.5: + resolution: {integrity: sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@6.1.23: + resolution: {integrity: sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==} + + flatted@3.4.4: + resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + globals@17.14.0: + resolution: {integrity: sha512-UtdkTVyAJePQv0J2M9Xe4L0ruNSDV314XiIJsADI2Zf40bcdAonE/D/OhAU8AT99oij9mhLByb+NvA3QWZYgCg==} + engines: {node: '>=18'} + + hashery@1.5.1: + resolution: {integrity: sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==} + engines: {node: '>=20'} + + hermes-estree@0.25.1: + resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==} + + hermes-parser@0.25.1: + resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==} + + hookified@1.15.1: + resolution: {integrity: sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==} + + hookified@2.2.0: + resolution: {integrity: sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==} + + html-encoding-sniffer@7.0.0: + resolution: {integrity: sha512-UikN5yr7xsCDAq87Or5or0PAlD3HJJOKVzM05az588WnpDJ4Ux7a2A53Qi6gofGg2/EtvF/H4hCi/TXfCW4Y6w==} + engines: {node: ^22.13.0 || >=24.0.0} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + ignore@7.0.14: + resolution: {integrity: sha512-wCBiZ77u1tuWde6G/nfOtLaCTYcFDU5yCzARzK10y+rLhzYoL7a7yEemcopcc2Mzow7gZOIjnV2ym1NYmdiJOQ==} + engines: {node: '>= 4'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-potential-custom-element-name@1.0.1: + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + jsdom@30.1.3: + resolution: {integrity: sha512-hQMUPvRgN7KxsfIytDQji7bimuJeRQa6Qo5+iuiZQk5CafeRxLIA10/cG5YCBFNpD9RO3oqIiN4CO1Y44kxqXg==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + peerDependencies: + canvas: ^3.2.3 + peerDependenciesMeta: + canvas: + optional: true + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + keyv@5.6.0: + resolution: {integrity: sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lru-cache@11.5.3: + resolution: {integrity: sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==} + engines: {node: 20 || >=22} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + lz-string@1.5.0: + resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} + hasBin: true + + magic-string@1.4.5: + resolution: {integrity: sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==} + + mdn-data@2.27.1: + resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} + + minimatch@10.2.6: + resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} + engines: {node: 18 || 20 || >=22} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + node-releases@2.0.63: + resolution: {integrity: sha512-6li2QanLsAXpIH2R6j77MzRyvOyrvdTqlKtO4CgBdHGNvN99ZZfyxszHc5o5+IZBWD5u6Hzwg83JoGXmqZNG9Q==} + engines: {node: '>=18'} + + obug@3.0.0: + resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} + engines: {node: '>=12.20.0'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + parse5@8.0.1: + resolution: {integrity: sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + + postcss@8.5.32: + resolution: {integrity: sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==} + engines: {node: ^10 || ^12 || >=14} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier@3.9.10: + resolution: {integrity: sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==} + engines: {node: '>=14'} + hasBin: true + + pretty-format@27.5.1: + resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + qified@0.10.1: + resolution: {integrity: sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==} + engines: {node: '>=20'} + + react-dom@19.3.1: + resolution: {integrity: sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==} + peerDependencies: + react: ^19.3.1 + + react-is@17.0.2: + resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} + + react-router@8.5.1: + resolution: {integrity: sha512-5u1eQ46QjuXjNfEnLwzrnou1Bm5dquO3xjVYkkMYCudtkicD2AQHtx+fvXzPATtPJx8TW6DR1x1TDRqsfHyZBw==} + engines: {node: '>=22.22.0'} + peerDependencies: + '@types/react': '>=19.2.0' + '@types/react-dom': '>=19.2.0' + react: '>=19.2.7' + react-dom: '>=19.2.7' + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + react-dom: + optional: true + + react@19.3.1: + resolution: {integrity: sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + rolldown@1.2.16: + resolution: {integrity: sha512-bWvlMpFKiTfDKfnK7FC2MPgPeWCf/Kpwsq49ApdW+FQaBZb6O6dZ4MAPbPUjp7hYQrw/RobqCzn64BRrQecGHw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + saxes@6.0.0: + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} + engines: {node: '>=v12.22.7'} + + scheduler@0.28.0: + resolution: {integrity: sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + engines: {node: '>=10'} + hasBin: true + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + source-map-js@1.2.2: + resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} + engines: {node: '>=0.10.0'} + + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} + + tinybench@6.2.2: + resolution: {integrity: sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==} + engines: {node: '>=20.0.0'} + + tinyexec@1.3.1: + resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tldts-core@7.4.20: + resolution: {integrity: sha512-C630TWXZCZmLq0F2bW4QqwnaaxCQ/svpAqvJwnC4JvgEM5ohhBnGsEzTLSOXcN+xjz+kEaHS5uoWIw2klnqd0A==} + + tldts@7.4.19: + resolution: {integrity: sha512-48dH6aSpQnpbzDUc4vIQZ1VjB8tkK+e8c1yx05/SZK+rkssgjEOlxDd/yU8/a4vGYQ9vRgJr9dwMq9TJ0b3X2Q==} + hasBin: true + + tough-cookie@6.0.2: + resolution: {integrity: sha512-exgYmnmL/sJpR3upZfXG5PoatXQii55xAiXGXzY+sROLZ/Y+SLcp9PgJNI9Vz37HpQ74WvDcLT8eqm+kV3FzrA==} + engines: {node: '>=16'} + + tr46@7.0.0: + resolution: {integrity: sha512-BcDSDW+SIGWVOns1Zm6Yg91q9AEj7eaID0QDY9oIqJD1A8dscNwMcl9Sms2DeuWCNov1X0/oXanHGYQBSLwZsg==} + engines: {node: ^22.14.0 || >=24.0.0} + + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + typescript-eslint@8.72.1: + resolution: {integrity: sha512-3Li9FfPmQp45nxEtFD1ZCrYFI3cYK5kpyNtmm1H7lMagm8u9sy6PTjy3ytwQZs7KNukOyKFHAZ6z6GjYFeaeXw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@7.24.6: + resolution: {integrity: sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==} + + undici@8.12.3: + resolution: {integrity: sha512-+fdndUTwBP86cVjihTp21hZHo7d6oj1c/47XPA3lL8mM0XHs+C4EkcjmgRsFnFk2f/UONGDy9ItBItmXsLOQHw==} + engines: {node: '>=22.19.0'} + + update-browserslist-db@1.3.4: + resolution: {integrity: sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + vite@8.3.5: + resolution: {integrity: sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.7.1 || ^0.8.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@5.0.5: + resolution: {integrity: sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.0.5 + '@vitest/browser-preview': 5.0.5 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.0.5 + '@vitest/coverage-v8': 5.0.5 + '@vitest/ui': 5.0.5 + happy-dom: '*' + jsdom: '*' + vite: ^6.4.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + w3c-xmlserializer@6.0.0: + resolution: {integrity: sha512-4Nsy8K5Tr6SPDH9jhKJOHf7ChDrc1zufZTVSF7x72hwuEXBqxqk9G6cK+K2NRUtB3iELRJqjXb4JPDMBjMTl2Q==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + + webidl-conversions@8.0.1: + resolution: {integrity: sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==} + engines: {node: '>=20'} + + whatwg-mimetype@5.0.0: + resolution: {integrity: sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==} + engines: {node: '>=20'} + + whatwg-url@17.3.0: + resolution: {integrity: sha512-KwOAJrpf+GTgBvcBQJcP38sMF0DsQKdwtG+TxM2pW44P6E5k0hDbWrDmyuJDIF0Uef0aQq0ZoJs+5oI+k8ddhg==} + engines: {node: ^22.14.0 || >=24.0.0} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@3.2.1: + resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} + engines: {node: '>=20.11'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + xml-name-validator@5.0.0: + resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} + engines: {node: '>=18'} + + xmlchars@2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + zod-validation-error@4.0.2: + resolution: {integrity: sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + zod: ^3.25.0 || ^4.0.0 + + zod@4.6.7: + resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==} + +snapshots: + + '@asamuzakjp/css-color@7.1.9': + dependencies: + '@csstools/css-calc': 3.4.3(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2) + '@csstools/css-color-parser': 4.2.7(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2) + '@csstools/css-parser-algorithms': 4.0.2(@csstools/css-tokenizer@4.0.2) + '@csstools/css-tokenizer': 4.0.2 + lru-cache: 11.5.3 + + '@asamuzakjp/dom-selector@10.0.5': + dependencies: + bidi-js: 1.1.0 + css-tree: 3.2.1 + is-potential-custom-element-name: 1.0.1 + lru-cache: 11.5.3 + + '@babel/code-frame@7.29.7': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.29.7': {} + + '@babel/core@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.12 + '@babel/helper-compilation-targets': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helpers': 7.29.10 + '@babel/parser': 7.29.12 + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.12 + '@babel/types': 7.29.11 + '@jridgewell/remapping': 2.3.5 + convert-source-map: 2.0.0 + debug: 4.4.3 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.29.12': + dependencies: + '@babel/parser': 7.29.12 + '@babel/types': 7.29.11 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.29.7': + dependencies: + '@babel/compat-data': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + browserslist: 4.29.5 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-globals@7.29.7': {} + + '@babel/helper-module-imports@7.29.7': + dependencies: + '@babel/traverse': 7.29.12 + '@babel/types': 7.29.11 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-imports': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/traverse': 7.29.12 + transitivePeerDependencies: + - supports-color + + '@babel/helper-string-parser@7.29.11': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/helper-validator-option@7.29.7': {} + + '@babel/helpers@7.29.10': + dependencies: + '@babel/template': 7.29.7 + '@babel/types': 7.29.11 + + '@babel/parser@7.29.12': + dependencies: + '@babel/types': 7.29.11 + + '@babel/runtime@7.29.10': {} + + '@babel/template@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/parser': 7.29.12 + '@babel/types': 7.29.11 + + '@babel/traverse@7.29.12': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.12 + '@babel/helper-globals': 7.29.7 + '@babel/parser': 7.29.12 + '@babel/template': 7.29.7 + '@babel/types': 7.29.11 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.29.11': + dependencies: + '@babel/helper-string-parser': 7.29.11 + '@babel/helper-validator-identifier': 7.29.7 + + '@bramus/specificity@2.4.3': + dependencies: + css-tree: 3.2.1 + + '@cacheable/memory@2.2.0': + dependencies: + '@cacheable/utils': 2.5.0 + '@keyv/bigmap': 1.3.1(keyv@5.6.0) + hookified: 1.15.1 + keyv: 5.6.0 + + '@cacheable/utils@2.5.0': + dependencies: + hashery: 1.5.1 + keyv: 5.6.0 + + '@csstools/color-helpers@6.1.2': {} + + '@csstools/css-calc@3.4.3(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2)': + dependencies: + '@csstools/css-parser-algorithms': 4.0.2(@csstools/css-tokenizer@4.0.2) + '@csstools/css-tokenizer': 4.0.2 + + '@csstools/css-color-parser@4.2.7(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2)': + dependencies: + '@csstools/color-helpers': 6.1.2 + '@csstools/css-calc': 3.4.3(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2) + '@csstools/css-parser-algorithms': 4.0.2(@csstools/css-tokenizer@4.0.2) + '@csstools/css-tokenizer': 4.0.2 + + '@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2)': + dependencies: + '@csstools/css-tokenizer': 4.0.2 + + '@csstools/css-syntax-patches-for-csstree@1.1.16(css-tree@3.2.1)': + optionalDependencies: + css-tree: 3.2.1 + + '@csstools/css-tokenizer@4.0.2': {} + + '@eslint-community/eslint-utils@4.10.1(eslint@10.14.0)': + dependencies: + eslint: 10.14.0 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.2': {} + + '@eslint/config-array@0.23.5': + dependencies: + '@eslint/object-schema': 3.0.5 + debug: 4.4.3 + minimatch: 10.2.6 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.7.0': + dependencies: + '@eslint/core': 1.2.1 + + '@eslint/core@1.2.1': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/js@10.0.1(eslint@10.14.0)': + optionalDependencies: + eslint: 10.14.0 + + '@eslint/object-schema@3.0.5': {} + + '@eslint/plugin-kit@0.7.3': + dependencies: + '@eslint/core': 1.2.1 + levn: 0.4.1 + + '@exodus/bytes@1.16.0': {} + + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@keyv/bigmap@1.3.1(keyv@5.6.0)': + dependencies: + hashery: 1.5.1 + hookified: 1.15.1 + keyv: 5.6.0 + + '@keyv/serialize@1.1.1': {} + + '@oxc-project/types@0.156.0': {} + + '@remix-run/route-pattern@0.22.1': {} + + '@rolldown/binding-android-arm-eabi@1.2.16': + optional: true + + '@rolldown/binding-android-arm64@1.2.16': + optional: true + + '@rolldown/binding-darwin-arm64@1.2.16': + optional: true + + '@rolldown/binding-darwin-x64@1.2.16': + optional: true + + '@rolldown/binding-freebsd-x64@1.2.16': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.2.16': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.2.16': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-x64-musl@1.2.16': + optional: true + + '@rolldown/binding-openharmony-arm64@1.2.16': + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.2.16': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.2.16': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + + '@testing-library/dom@10.4.2': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/runtime': 7.29.10 + '@types/aria-query': 5.0.4 + aria-query: 5.3.0 + dom-accessibility-api: 0.5.16 + lz-string: 1.5.0 + picocolors: 1.1.1 + pretty-format: 27.5.1 + + '@testing-library/react@16.3.3(@testing-library/dom@10.4.2)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': + dependencies: + '@babel/runtime': 7.29.10 + '@testing-library/dom': 10.4.2 + react: 19.3.1 + react-dom: 19.3.1(react@19.3.1) + optionalDependencies: + '@types/react': 19.3.0 + '@types/react-dom': 19.3.0(@types/react@19.3.0) + + '@types/aria-query@5.0.4': {} + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + + '@types/esrecurse@4.3.1': {} + + '@types/estree@1.0.10': {} + + '@types/json-schema@7.0.15': {} + + '@types/node@24.19.2': + dependencies: + undici-types: 7.24.6 + + '@types/react-dom@19.3.0(@types/react@19.3.0)': + dependencies: + '@types/react': 19.3.0 + + '@types/react@19.3.0': + dependencies: + csstype: 3.2.3 + + '@typescript-eslint/eslint-plugin@8.72.1(@typescript-eslint/parser@8.72.1(eslint@10.14.0)(typescript@6.0.3))(eslint@10.14.0)(typescript@6.0.3)': + dependencies: + '@eslint-community/regexpp': 4.12.2 + '@typescript-eslint/parser': 8.72.1(eslint@10.14.0)(typescript@6.0.3) + '@typescript-eslint/scope-manager': 8.72.1 + '@typescript-eslint/type-utils': 8.72.1(eslint@10.14.0)(typescript@6.0.3) + '@typescript-eslint/utils': 8.72.1(eslint@10.14.0)(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.72.1 + eslint: 10.14.0 + ignore: 7.0.14 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.72.1(eslint@10.14.0)(typescript@6.0.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.72.1 + '@typescript-eslint/types': 8.72.1 + '@typescript-eslint/typescript-estree': 8.72.1(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.72.1 + debug: 4.4.3 + eslint: 10.14.0 + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.72.1(typescript@6.0.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.72.1(typescript@6.0.3) + '@typescript-eslint/types': 8.72.1 + debug: 4.4.3 + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.72.1': + dependencies: + '@typescript-eslint/types': 8.72.1 + '@typescript-eslint/visitor-keys': 8.72.1 + + '@typescript-eslint/tsconfig-utils@8.72.1(typescript@6.0.3)': + dependencies: + typescript: 6.0.3 + + '@typescript-eslint/type-utils@8.72.1(eslint@10.14.0)(typescript@6.0.3)': + dependencies: + '@typescript-eslint/types': 8.72.1 + '@typescript-eslint/typescript-estree': 8.72.1(typescript@6.0.3) + '@typescript-eslint/utils': 8.72.1(eslint@10.14.0)(typescript@6.0.3) + debug: 4.4.3 + eslint: 10.14.0 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.72.1': {} + + '@typescript-eslint/typescript-estree@8.72.1(typescript@6.0.3)': + dependencies: + '@typescript-eslint/project-service': 8.72.1(typescript@6.0.3) + '@typescript-eslint/tsconfig-utils': 8.72.1(typescript@6.0.3) + '@typescript-eslint/types': 8.72.1 + '@typescript-eslint/visitor-keys': 8.72.1 + debug: 4.4.3 + minimatch: 10.2.6 + semver: 7.8.5 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.72.1(eslint@10.14.0)(typescript@6.0.3)': + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@10.14.0) + '@typescript-eslint/scope-manager': 8.72.1 + '@typescript-eslint/types': 8.72.1 + '@typescript-eslint/typescript-estree': 8.72.1(typescript@6.0.3) + eslint: 10.14.0 + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.72.1': + dependencies: + '@typescript-eslint/types': 8.72.1 + eslint-visitor-keys: 5.0.1 + + '@vitejs/plugin-react@6.2.1(vite@8.3.5(@types/node@24.19.2))': + dependencies: + '@rolldown/pluginutils': 1.0.1 + vite: 8.3.5(@types/node@24.19.2) + + '@vitest/mocker@5.0.5(vite@8.3.5(@types/node@24.19.2))': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.0.5 + estree-walker: 3.0.3 + magic-string: 1.4.5 + optionalDependencies: + vite: 8.3.5(@types/node@24.19.2) + + '@vitest/spy@5.0.5': {} + + acorn-jsx@5.3.2(acorn@8.19.0): + dependencies: + acorn: 8.19.0 + + acorn@8.19.0: {} + + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-regex@5.0.1: {} + + ansi-styles@5.2.0: {} + + aria-query@5.3.0: + dependencies: + dequal: 2.0.3 + + assertion-error@2.0.1: {} + + balanced-match@4.0.4: {} + + baseline-browser-mapping@2.11.34: {} + + bidi-js@1.1.0: + dependencies: + require-from-string: 2.0.2 + + brace-expansion@5.0.12: + dependencies: + balanced-match: 4.0.4 + + browserslist@4.29.5: + dependencies: + baseline-browser-mapping: 2.11.34 + caniuse-lite: 1.0.30001820 + electron-to-chromium: 1.5.472 + node-releases: 2.0.63 + update-browserslist-db: 1.3.4(browserslist@4.29.5) + + cacheable@2.5.0: + dependencies: + '@cacheable/memory': 2.2.0 + '@cacheable/utils': 2.5.0 + hookified: 1.15.1 + keyv: 5.6.0 + qified: 0.10.1 + + caniuse-lite@1.0.30001820: {} + + chai@6.3.0: {} + + convert-source-map@2.0.0: {} + + cookie-es@3.1.1: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + css-tree@3.2.1: + dependencies: + mdn-data: 2.27.1 + source-map-js: 1.2.2 + + csstype@3.2.3: {} + + data-urls@8.0.0: + dependencies: + whatwg-mimetype: 5.0.0 + whatwg-url: 17.3.0 + transitivePeerDependencies: + - '@noble/hashes' + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + decimal.js@10.6.0: {} + + deep-is@0.1.4: {} + + dequal@2.0.3: {} + + detect-libc@2.1.2: {} + + dom-accessibility-api@0.5.16: {} + + electron-to-chromium@1.5.472: {} + + entities@8.1.0: {} + + es-module-lexer@2.3.2: {} + + escalade@3.2.0: {} + + escape-string-regexp@4.0.0: {} + + eslint-config-prettier@10.1.8(eslint@10.14.0): + dependencies: + eslint: 10.14.0 + + eslint-plugin-react-hooks@7.1.1(eslint@10.14.0): + dependencies: + '@babel/core': 7.29.7 + '@babel/parser': 7.29.12 + eslint: 10.14.0 + hermes-parser: 0.25.1 + zod: 4.6.7 + zod-validation-error: 4.0.2(zod@4.6.7) + transitivePeerDependencies: + - supports-color + + eslint-plugin-react-refresh@0.5.7(eslint@10.14.0): + dependencies: + eslint: 10.14.0 + + eslint-scope@9.1.2: + dependencies: + '@types/esrecurse': 4.3.1 + '@types/estree': 1.0.10 + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@5.0.1: {} + + eslint@10.14.0: + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@10.14.0) + '@eslint-community/regexpp': 4.12.2 + '@eslint/config-array': 0.23.5 + '@eslint/config-helpers': 0.7.0 + '@eslint/core': 1.2.1 + '@eslint/plugin-kit': 0.7.3 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.10 + ajv: 6.15.0 + cross-spawn: 7.0.6 + debug: 4.4.3 + escape-string-regexp: 4.0.0 + eslint-scope: 9.1.2 + eslint-visitor-keys: 5.0.1 + espree: 11.2.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 11.1.5 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + minimatch: 10.2.6 + natural-compare: 1.4.0 + optionator: 0.9.4 + transitivePeerDependencies: + - supports-color + + espree@11.2.0: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 5.0.1 + + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.10 + + esutils@2.0.3: {} + + expect-type@1.4.0: {} + + fast-deep-equal@3.1.3: {} + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fdir@6.5.0(picomatch@4.0.7): + optionalDependencies: + picomatch: 4.0.7 + + file-entry-cache@11.1.5: + dependencies: + flat-cache: 6.1.23 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@6.1.23: + dependencies: + cacheable: 2.5.0 + flatted: 3.4.4 + hookified: 1.15.1 + + flatted@3.4.4: {} + + fsevents@2.3.3: + optional: true + + gensync@1.0.0-beta.2: {} + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + globals@17.14.0: {} + + hashery@1.5.1: + dependencies: + hookified: 1.15.1 + + hermes-estree@0.25.1: {} + + hermes-parser@0.25.1: + dependencies: + hermes-estree: 0.25.1 + + hookified@1.15.1: {} + + hookified@2.2.0: {} + + html-encoding-sniffer@7.0.0: + dependencies: + '@exodus/bytes': 1.16.0 + transitivePeerDependencies: + - '@noble/hashes' + + ignore@5.3.2: {} + + ignore@7.0.14: {} + + imurmurhash@0.1.4: {} + + is-extglob@2.1.1: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-potential-custom-element-name@1.0.1: {} + + isexe@2.0.0: {} + + js-tokens@4.0.0: {} + + jsdom@30.1.3: + dependencies: + '@asamuzakjp/css-color': 7.1.9 + '@asamuzakjp/dom-selector': 10.0.5 + '@bramus/specificity': 2.4.3 + '@csstools/css-syntax-patches-for-csstree': 1.1.16(css-tree@3.2.1) + '@exodus/bytes': 1.16.0 + css-tree: 3.2.1 + data-urls: 8.0.0 + decimal.js: 10.6.0 + html-encoding-sniffer: 7.0.0 + is-potential-custom-element-name: 1.0.1 + lru-cache: 11.5.3 + parse5: 8.0.1 + saxes: 6.0.0 + tough-cookie: 6.0.2 + undici: 8.12.3 + w3c-xmlserializer: 6.0.0 + webidl-conversions: 8.0.1 + whatwg-mimetype: 5.0.0 + whatwg-url: 17.3.0 + xml-name-validator: 5.0.0 + transitivePeerDependencies: + - '@noble/hashes' + + jsesc@3.1.0: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + json5@2.2.3: {} + + keyv@5.6.0: + dependencies: + '@keyv/serialize': 1.1.1 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lru-cache@11.5.3: {} + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + lz-string@1.5.0: {} + + magic-string@1.4.5: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + mdn-data@2.27.1: {} + + minimatch@10.2.6: + dependencies: + brace-expansion: 5.0.12 + + ms@2.1.3: {} + + nanoid@3.3.20: {} + + natural-compare@1.4.0: {} + + node-releases@2.0.63: {} + + obug@3.0.0: {} + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + parse5@8.0.1: + dependencies: + entities: 8.1.0 + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + picocolors@1.1.1: {} + + picomatch@4.0.7: {} + + postcss@8.5.32: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.2.2 + + prelude-ls@1.2.1: {} + + prettier@3.9.10: {} + + pretty-format@27.5.1: + dependencies: + ansi-regex: 5.0.1 + ansi-styles: 5.2.0 + react-is: 17.0.2 + + punycode@2.3.1: {} + + qified@0.10.1: + dependencies: + hookified: 2.2.0 + + react-dom@19.3.1(react@19.3.1): + dependencies: + react: 19.3.1 + scheduler: 0.28.0 + + react-is@17.0.2: {} + + react-router@8.5.1(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1): + dependencies: + '@remix-run/route-pattern': 0.22.1 + cookie-es: 3.1.1 + react: 19.3.1 + optionalDependencies: + '@types/react': 19.3.0 + '@types/react-dom': 19.3.0(@types/react@19.3.0) + react-dom: 19.3.1(react@19.3.1) + + react@19.3.1: {} + + require-from-string@2.0.2: {} + + rolldown@1.2.16: + dependencies: + '@oxc-project/types': 0.156.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm-eabi': 1.2.16 + '@rolldown/binding-android-arm64': 1.2.16 + '@rolldown/binding-darwin-arm64': 1.2.16 + '@rolldown/binding-darwin-x64': 1.2.16 + '@rolldown/binding-freebsd-x64': 1.2.16 + '@rolldown/binding-linux-arm-gnueabihf': 1.2.16 + '@rolldown/binding-linux-arm64-gnu': 1.2.16 + '@rolldown/binding-linux-arm64-musl': 1.2.16 + '@rolldown/binding-linux-ppc64-gnu': 1.2.16 + '@rolldown/binding-linux-s390x-gnu': 1.2.16 + '@rolldown/binding-linux-x64-gnu': 1.2.16 + '@rolldown/binding-linux-x64-musl': 1.2.16 + '@rolldown/binding-openharmony-arm64': 1.2.16 + '@rolldown/binding-win32-arm64-msvc': 1.2.16 + '@rolldown/binding-win32-x64-msvc': 1.2.16 + + saxes@6.0.0: + dependencies: + xmlchars: 2.2.0 + + scheduler@0.28.0: {} + + semver@6.3.1: {} + + semver@7.8.5: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + source-map-js@1.2.2: {} + + std-env@4.3.0: {} + + tinybench@6.2.2: {} + + tinyexec@1.3.1: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + + tldts-core@7.4.20: {} + + tldts@7.4.19: + dependencies: + tldts-core: 7.4.20 + + tough-cookie@6.0.2: + dependencies: + tldts: 7.4.19 + + tr46@7.0.0: + dependencies: + punycode: 2.3.1 + + ts-api-utils@2.5.0(typescript@6.0.3): + dependencies: + typescript: 6.0.3 + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + typescript-eslint@8.72.1(eslint@10.14.0)(typescript@6.0.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.72.1(@typescript-eslint/parser@8.72.1(eslint@10.14.0)(typescript@6.0.3))(eslint@10.14.0)(typescript@6.0.3) + '@typescript-eslint/parser': 8.72.1(eslint@10.14.0)(typescript@6.0.3) + '@typescript-eslint/typescript-estree': 8.72.1(typescript@6.0.3) + '@typescript-eslint/utils': 8.72.1(eslint@10.14.0)(typescript@6.0.3) + eslint: 10.14.0 + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + typescript@6.0.3: {} + + undici-types@7.24.6: {} + + undici@8.12.3: {} + + update-browserslist-db@1.3.4(browserslist@4.29.5): + dependencies: + browserslist: 4.29.5 + escalade: 3.2.0 + picocolors: 1.1.1 + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + vite@8.3.5(@types/node@24.19.2): + dependencies: + lightningcss: 1.33.0 + picomatch: 4.0.7 + postcss: 8.5.32 + rolldown: 1.2.16 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 24.19.2 + fsevents: 2.3.3 + + vitest@5.0.5(@types/node@24.19.2)(jsdom@30.1.3)(vite@8.3.5(@types/node@24.19.2)): + dependencies: + '@types/chai': 5.2.3 + '@vitest/mocker': 5.0.5(vite@8.3.5(@types/node@24.19.2)) + chai: 6.3.0 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 1.4.5 + obug: 3.0.0 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 6.2.2 + tinyexec: 1.3.1 + tinyglobby: 0.2.17 + vite: 8.3.5(@types/node@24.19.2) + why-is-node-running: 3.2.1 + optionalDependencies: + '@types/node': 24.19.2 + jsdom: 30.1.3 + transitivePeerDependencies: + - msw + + w3c-xmlserializer@6.0.0: + dependencies: + xml-name-validator: 5.0.0 + + webidl-conversions@8.0.1: {} + + whatwg-mimetype@5.0.0: {} + + whatwg-url@17.3.0: + dependencies: + '@exodus/bytes': 1.16.0 + tr46: 7.0.0 + webidl-conversions: 8.0.1 + transitivePeerDependencies: + - '@noble/hashes' + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + why-is-node-running@3.2.1: {} + + word-wrap@1.2.5: {} + + xml-name-validator@5.0.0: {} + + xmlchars@2.2.0: {} + + yallist@3.1.1: {} + + yocto-queue@0.1.0: {} + + zod-validation-error@4.0.2(zod@4.6.7): + dependencies: + zod: 4.6.7 + + zod@4.6.7: {} diff --git a/apps/web/pnpm-workspace.yaml b/apps/web/pnpm-workspace.yaml new file mode 100644 index 0000000..1c0c8d9 --- /dev/null +++ b/apps/web/pnpm-workspace.yaml @@ -0,0 +1,5 @@ +# pnpm 12는 갓 배포된 패키지 설치를 보류한다(minimumReleaseAge). +# 2026-11-02 세팅 시점에 @vitejs/plugin-react 6.2.1이 막 나와서 예외로 넣었다. +# 며칠 지나면 이 파일은 지워도 된다. +minimumReleaseAgeExclude: + - '@vitejs/plugin-react@6.2.1' diff --git a/apps/web/src/app/env.ts b/apps/web/src/app/env.ts new file mode 100644 index 0000000..501f0d9 --- /dev/null +++ b/apps/web/src/app/env.ts @@ -0,0 +1,19 @@ +export type Flavor = 'dev' | 'prod'; + +function parseEnv(values: ImportMetaEnv) { + const flavor = values.VITE_FLAVOR; + const apiBaseUrl = values.VITE_API_BASE_URL; + + if (flavor !== 'dev' && flavor !== 'prod') { + throw new Error('VITE_FLAVOR must be dev or prod'); + } + if (!apiBaseUrl?.trim()) { + throw new Error('VITE_API_BASE_URL must not be empty'); + } + + return { flavor, apiBaseUrl, isDev: flavor === 'dev' } as const; +} + +export const env: { flavor: Flavor; apiBaseUrl: string; isDev: boolean } = parseEnv( + import.meta.env, +); diff --git a/apps/web/src/app/router.test.tsx b/apps/web/src/app/router.test.tsx new file mode 100644 index 0000000..cedef60 --- /dev/null +++ b/apps/web/src/app/router.test.tsx @@ -0,0 +1,20 @@ +import { cleanup, render, screen } from '@testing-library/react'; +import { createMemoryRouter, RouterProvider } from 'react-router'; +import { afterEach, describe, expect, it } from 'vitest'; +import { appRoutes } from './router'; +import { routes } from './routes'; + +afterEach(cleanup); + +describe('app router', () => { + it('/ 는 /notices 로 보내고 h1 제목을 그린다', async () => { + const router = createMemoryRouter(appRoutes, { initialEntries: [routes.home] }); + + render(); + + await screen.findByRole('heading'); + expect(router.state.location.pathname).toBe(routes.notices); + expect(screen.getByRole('heading', { level: 1 })).toBeDefined(); + router.dispose(); + }); +}); diff --git a/apps/web/src/app/router.tsx b/apps/web/src/app/router.tsx new file mode 100644 index 0000000..3ef819a --- /dev/null +++ b/apps/web/src/app/router.tsx @@ -0,0 +1,10 @@ +import { createBrowserRouter, Navigate, type RouteObject } from 'react-router'; +import { NoticeListPage } from '../features/notices/pages/NoticeListPage'; +import { routes } from './routes'; + +export const appRoutes: RouteObject[] = [ + { path: routes.home, element: }, + { path: routes.notices, element: }, +]; + +export const router = createBrowserRouter(appRoutes); diff --git a/apps/web/src/app/routes.ts b/apps/web/src/app/routes.ts new file mode 100644 index 0000000..57fce7f --- /dev/null +++ b/apps/web/src/app/routes.ts @@ -0,0 +1 @@ +export const routes = { home: '/', notices: '/notices' } as const; diff --git a/apps/web/src/features/notices/pages/NoticeListPage.module.css b/apps/web/src/features/notices/pages/NoticeListPage.module.css new file mode 100644 index 0000000..1dab541 --- /dev/null +++ b/apps/web/src/features/notices/pages/NoticeListPage.module.css @@ -0,0 +1,5 @@ +.page { + padding: var(--space-4); + max-width: 480px; /* 레이아웃 폭은 토큰이 아니다 (web-architecture.md 4절) */ + margin: 0 auto; +} diff --git a/apps/web/src/features/notices/pages/NoticeListPage.tsx b/apps/web/src/features/notices/pages/NoticeListPage.tsx new file mode 100644 index 0000000..9fdaa81 --- /dev/null +++ b/apps/web/src/features/notices/pages/NoticeListPage.tsx @@ -0,0 +1,10 @@ +import styles from './NoticeListPage.module.css'; + +export function NoticeListPage() { + return ( +
+

공지사항

+

첫 공개 페이지. 내용은 notices 기능을 구현할 때 채운다.

+
+ ); +} diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx new file mode 100644 index 0000000..e83e90a --- /dev/null +++ b/apps/web/src/main.tsx @@ -0,0 +1,15 @@ +import { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import { RouterProvider } from 'react-router'; +import './app/env'; +import { router } from './app/router'; +import './shared/styles/global.css'; + +const root = document.getElementById('root'); +if (!root) throw new Error('Root element is missing'); + +createRoot(root).render( + + + , +); diff --git a/apps/web/src/shared/api/http.ts b/apps/web/src/shared/api/http.ts new file mode 100644 index 0000000..0a6bc1b --- /dev/null +++ b/apps/web/src/shared/api/http.ts @@ -0,0 +1,32 @@ +import { env } from '../../app/env'; + +export class HttpError extends Error { + public readonly status: number; + public readonly body: unknown; + + constructor(status: number, body: unknown) { + super(`HTTP ${status}`); + this.name = 'HttpError'; + this.status = status; + this.body = body; + } +} + +async function request(path: string, init?: RequestInit): Promise { + const res = await fetch(`${env.apiBaseUrl}${path}`, { + ...init, + headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, + }); + const body = await res.json(); + if (!res.ok) throw new HttpError(res.status, body); + return body; +} + +export const http = { + get(path: string): Promise { + return request(path); + }, + post(path: string, body: unknown): Promise { + return request(path, { method: 'POST', body: JSON.stringify(body) }); + }, +}; diff --git a/apps/web/src/shared/styles/global.css b/apps/web/src/shared/styles/global.css new file mode 100644 index 0000000..a2f1c51 --- /dev/null +++ b/apps/web/src/shared/styles/global.css @@ -0,0 +1,27 @@ +@import './tokens.css'; + +*, +*::before, +*::after { + box-sizing: border-box; +} + +* { + margin: 0; +} + +body { + font-family: + system-ui, + -apple-system, + 'Apple SD Gothic Neo', + 'Noto Sans KR', + sans-serif; + font-size: var(--font-size-md); + color: var(--color-text-primary); + background: var(--color-background); +} + +#root { + min-height: 100dvh; +} diff --git a/apps/web/src/shared/styles/tokens.css b/apps/web/src/shared/styles/tokens.css new file mode 100644 index 0000000..168dbdb --- /dev/null +++ b/apps/web/src/shared/styles/tokens.css @@ -0,0 +1,35 @@ +:root { + /* primitive — use only inside this file */ + --brand-500: #4f46e5; + --brand-600: #4338ca; + --gray-50: #f9fafb; + --gray-200: #e5e7eb; + --gray-600: #4b5563; + --gray-900: #111827; + --red-500: #ef4444; + --white: #ffffff; + + /* semantic — components use only these */ + --color-primary: var(--brand-500); + --color-primary-pressed: var(--brand-600); + --color-on-primary: var(--white); + --color-background: var(--gray-50); + --color-surface: var(--white); + --color-text-primary: var(--gray-900); + --color-text-secondary: var(--gray-600); + --color-border: var(--gray-200); + --color-danger: var(--red-500); + --space-1: 4px; + --space-2: 8px; + --space-3: 12px; + --space-4: 16px; + --space-6: 24px; + --space-8: 32px; + --radius-sm: 8px; + --radius-md: 12px; + --radius-lg: 16px; + --font-size-sm: 14px; + --font-size-md: 16px; + --font-size-lg: 20px; + --font-size-xl: 24px; +} diff --git a/apps/web/src/vite-env.d.ts b/apps/web/src/vite-env.d.ts new file mode 100644 index 0000000..5769380 --- /dev/null +++ b/apps/web/src/vite-env.d.ts @@ -0,0 +1,10 @@ +/// + +interface ImportMetaEnv { + readonly VITE_FLAVOR: string; + readonly VITE_API_BASE_URL: string; +} + +interface ImportMeta { + readonly env: ImportMetaEnv; +} diff --git a/apps/web/tsconfig.app.json b/apps/web/tsconfig.app.json new file mode 100644 index 0000000..4fc48da --- /dev/null +++ b/apps/web/tsconfig.app.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023", "DOM"], + "module": "esnext", + "types": ["vite/client"], + "allowArbitraryExtensions": true, + "skipLibCheck": true, + "strict": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json new file mode 100644 index 0000000..d32ff68 --- /dev/null +++ b/apps/web/tsconfig.json @@ -0,0 +1,4 @@ +{ + "files": [], + "references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }] +} diff --git a/apps/web/tsconfig.node.json b/apps/web/tsconfig.node.json new file mode 100644 index 0000000..0ddc5bc --- /dev/null +++ b/apps/web/tsconfig.node.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023"], + "types": ["node"], + "skipLibCheck": true, + "strict": true, + + /* Bundler mode */ + "module": "nodenext", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["vite.config.ts"] +} diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts new file mode 100644 index 0000000..183a58e --- /dev/null +++ b/apps/web/vite.config.ts @@ -0,0 +1,10 @@ +/// + +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react()], + test: { environment: 'jsdom' }, +}); From 6438ad374767c9ce421ab96c8124e324d539b7be Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 22:39:37 +0900 Subject: [PATCH 05/23] =?UTF-8?q?docs:=20=EC=9E=91=EC=97=85=20=ED=9D=90?= =?UTF-8?q?=EB=A6=84=C2=B7=EC=95=B1/=EC=9B=B9=20=EA=B5=AC=EC=A1=B0=C2=B7?= =?UTF-8?q?=EB=94=94=EC=9E=90=EC=9D=B8=20=ED=86=A0=ED=81=B0=20=EA=B7=9C?= =?UTF-8?q?=EC=B9=99=20=EB=AC=B8=EC=84=9C=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 두 사람이 같은 기준으로 일하도록 구현 순서, 폴더별 파일, import 방향, 금지 사항, 토큰 변경 절차를 docs/에 두고, AGENTS.md는 항상 지킬 것과 문서 지도만 남긴다. PR 템플릿을 추가한다. --- .github/PULL_REQUEST_TEMPLATE.md | 21 +++ AGENTS.md | 160 ++++++------------ README.md | 27 +++- docs/design-tokens.md | 129 +++++++++++++++ docs/mobile-architecture.md | 270 +++++++++++++++++++++++++++++++ docs/web-architecture.md | 129 +++++++++++++++ docs/workflow.md | 100 ++++++++++++ 7 files changed, 718 insertions(+), 118 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 docs/design-tokens.md create mode 100644 docs/mobile-architecture.md create mode 100644 docs/web-architecture.md create mode 100644 docs/workflow.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..962288e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,21 @@ +## 변경 + + + +## 검증 + +- [ ] 앱: `fvm dart format` / `fvm flutter analyze` / `fvm flutter test` 통과 +- [ ] 웹: `pnpm format:check` / `lint` / `typecheck` / `test` / `build` 통과 +- [ ] 수동 확인: + +## UI 캡처 + + + +## 호환성·주의 + + + +## 리뷰 순서 + + diff --git a/AGENTS.md b/AGENTS.md index 171987c..d284972 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,129 +1,66 @@ # highfive-5th-Client 작업 규칙 -사람과 코딩 에이전트가 같이 보는 규칙이다. 설계 결정의 배경은 팀 아키텍처 문서를 따르고, 여기에는 코드를 쓸 때 지킬 것만 적는다. +사람과 코딩 에이전트가 같이 보는 규칙이다. 이 파일은 "항상 지킬 것"만 짧게 담고, 자세한 내용은 `docs/`에 있다. + +| 알고 싶은 것 | 문서 | +| --- | --- | +| 일을 어떤 순서로 하나 (Jira → 브랜치 → 구현 순서 → 검증 → PR → 리뷰 → 릴리스) | [docs/workflow.md](./docs/workflow.md) | +| 앱 폴더에 어떤 파일이 들어가고 누가 누구를 import하나 | [docs/mobile-architecture.md](./docs/mobile-architecture.md) | +| 웹 폴더 구조·의존성·bridge·환경 | [docs/web-architecture.md](./docs/web-architecture.md) | +| 색·간격·글자 크기 값과 바꾸는 절차 | [docs/design-tokens.md](./docs/design-tokens.md) | ## 저장소 ``` -apps/mobile/ Flutter 앱. flutter 명령은 이 폴더에서 `fvm flutter ...`로 실행 -apps/web/ React + TypeScript + Vite (아직 없음) -docs/ API·앱↔웹 계약·배포 절차 (아직 없음) +apps/mobile/ Flutter 앱. 명령은 이 폴더에서 `fvm flutter ...` +apps/web/ React + TypeScript + Vite. 명령은 이 폴더에서 `pnpm ...` +docs/ 규칙·계약·배포 기록. BE API 명세는 docs/api/ 에 둔다 +.github/ PR 템플릿 (CI는 아직 없음) ``` -- Flutter 버전은 `apps/mobile/.fvmrc`로 고정한다. `fvm install` 후 `fvm flutter`, `fvm dart`만 쓴다. SDK 업그레이드는 PR로 합의한다. -- 앱에만 영향 있는 변경은 웹을, 웹에만 영향 있는 변경은 앱을 건드리지 않는다. 앱↔웹 공통 계약은 양쪽을 검증한다. - -## 명령 (apps/mobile 에서) - -| 할 일 | 명령 | -| --- | --- | -| 의존성 | `fvm flutter pub get` | -| 실행 | `fvm flutter run --dart-define=FLAVOR=dev` (`prod`도 가능, 생략 시 dev) | -| 테스트 | `fvm flutter test` | -| 분석 | `fvm flutter analyze` | -| 포맷 | `fvm dart format lib test` | -| 코드 생성 | `fvm dart run build_runner build --delete-conflicting-outputs` | - -PR 전에 포맷·분석·테스트가 모두 통과해야 한다. 경로에 한글이 있으면 `flutter analyze`가 크래시할 수 있다(analysis server 버그). 그럴 때는 영문 경로에 복사해서 돌린다. - -## 폴더 (apps/mobile/lib) +- Flutter 버전은 `apps/mobile/.fvmrc`, Node는 `apps/web/.nvmrc`·`packageManager`로 고정한다. `fvm flutter`/`fvm dart`, `pnpm`만 쓴다. SDK·메이저 버전 업그레이드는 PR로 합의한다. +- 앱에만 영향 있는 변경은 웹을, 웹에만 영향 있는 변경은 앱을 건드리지 않는다. 앱↔웹 공통 계약(bridge·토큰)은 양쪽을 같이 바꾸고 양쪽 검증을 한다. -``` -main.dart 진입. AppEnv 결정 → setupDi → ProviderScope로 앱 시작 -app/ 초기화·DI·환경·라우팅 - app.dart MaterialApp.router, dev 배너 - di.dart get_it 등록 (setupDi) - env.dart Flavor, AppEnv - providers.dart get_it → Riverpod 연결 Provider - router.dart AppRoutes 경로 상수 + routerProvider -core/ 기술 기반: 네트워크·오류·저장소·SDK·WebView - network/dio_client.dart -shared/ 공통 UI·디자인 토큰 - theme/app_theme.dart -features// 기능 단위 - models/ 도메인 모델 (freezed) - data/ dto/ services/ repositories/ - presentation/ providers/ view_models/ views/ widgets/ -``` +## 명령 -기능 이름: `auth`, `bands`, `performances`, `recruitments`, `venues`, `ticketing`, `payments`, `settlements`, `chat`. +| | 앱 (`apps/mobile`) | 웹 (`apps/web`) | +| --- | --- | --- | +| 설치 | `fvm install && fvm flutter pub get` | `corepack enable && pnpm install` | +| 실행 | `fvm flutter run --dart-define=FLAVOR=dev` | `pnpm dev` | +| 포맷 | `fvm dart format lib test` | `pnpm format` | +| 분석·린트 | `fvm flutter analyze` | `pnpm lint && pnpm typecheck` | +| 테스트 | `fvm flutter test` | `pnpm test` | +| 빌드 | `fvm flutter build apk\|ipa --dart-define=FLAVOR=prod` | `pnpm build` (prod) / `pnpm build:dev` | +| 코드 생성 | `fvm dart run build_runner build --delete-conflicting-outputs` | - | -- 실제 구현하는 기능부터 만든다. 빈 폴더·UseCase·인터페이스를 미리 만들지 않는다. 지금은 `features/auth`에 로그인 화면 자리만 있다. -- 기능 안의 하위 폴더도 필요한 것만 만든다. -- 여러 기능에서 쓴다는 이유만으로 core/shared로 옮기지 않는다. core는 기술 기반, shared는 공통 UI. -- 다른 기능의 View·ViewModel을 import하지 않는다. 기능 간 데이터는 Repository·모델 계약으로만 주고받고 순환 의존을 만들지 않는다. -- 협업 단위(페이지·API Task)와 코드 배치는 별개다. 페이지 단위로 나눠 작업해도 폴더는 feature-first를 유지한다. +PR 전에 포맷·분석·테스트(웹은 빌드까지)가 전부 통과해야 한다. 한글 경로에서 `flutter analyze`가 크래시하면 영문 경로에 복사해서 돌린다. -## 계층 책임 +## 항상 지킬 것 -``` -View ── 사용자 명령 ──→ ViewModel ──→ Repository ──→ Service ──→ 서버/SDK - ↑ │ - └── Riverpod 상태 구독 ──┘ -``` +구조 -| 역할 | 담당 | 하지 않는 것 | -| --- | --- | --- | -| View | 표시·입력·화면 이동 | HTTP 호출, 권한·재고·상태 판단 | -| ViewModel | 상태·사용자 명령. Riverpod `Notifier`/`AsyncNotifier` | 위젯 import, getIt 직접 조회 | -| Repository | 모델 변환·저장·캐시·데이터 처리 | 위젯·Riverpod 의존 | -| Service | HTTP(Dio)·소켓·SDK 호출 | 모델 변환, 캐시 | -| get_it | Service·Repository 등 공유 객체 생성·연결 | ViewModel 등록 | - -권한·재고·가격·마감은 서버가 최종 판단한다. 화면에서 버튼을 숨기는 것으로 확정하지 않는다. - -## DI와 상태 - -- `getIt`은 `app/di.dart`(등록)와 `app/providers.dart`(연결 Provider)에서만 조회한다. 그 외 코드는 연결 Provider를 `ref.watch/read` 한다. -- ViewModel은 Riverpod만 관리한다. get_it에 중복 등록하지 않는다. -- 상태 범위: 입력값은 위젯 로컬 상태, 로그인 세션은 앱 공통 Provider, 상세 조회는 `.family`로 ID별 상태. -- 신청·예매·결제처럼 결과가 남는 명령은 Provider의 `build()`에서 실행하지 않는다. 버튼 → ViewModel 메서드로 명시적으로 실행하고 ViewModel에서 중복 실행을 막는다. 서버 멱등성 키 계약이 있으면 따르고, 타임아웃은 실패 확정이 아니므로 기존 결과를 먼저 조회한다. -- 로그아웃·계정 전환 시 사용자 상태·Repository 캐시·소켓·보안 저장소를 정리한다. Riverpod 초기화만으로 Repository 캐시가 정리됐다고 가정하지 않는다. 이전 세션 요청의 늦은 응답은 버린다. -- 테스트는 `ProviderScope(overrides: [...])`로 연결 Provider를 바꿔 끼운다. 전역 getIt 등록에 기대지 않는다. `test/app/app_test.dart`가 예다. - -연결 Provider와 ViewModel 모양: - -```dart -// app/providers.dart -final authRepositoryProvider = - Provider((ref) => getIt()); - -// features/auth/presentation/view_models/login_view_model.dart -class LoginViewModel extends AsyncNotifier { - @override - Future build() async {} - - Future login(String email, String password) async { - if (state.isLoading) return; // 중복 실행 방지 - state = const AsyncLoading(); - state = await AsyncValue.guard( - () => ref.read(authRepositoryProvider).login(email, password), - ); - } -} - -final loginViewModelProvider = - AsyncNotifierProvider(LoginViewModel.new); -``` +- feature-first. `features//`에 모델·데이터·화면을 모은다. 실제 구현하는 기능부터 만들고 빈 폴더·UseCase·인터페이스를 미리 만들지 않는다. +- 의존성은 `app → features → core/shared` 한 방향. features는 app을 import하지 않고(웹은 `app/routes.ts`만 예외), 다른 기능의 화면·ViewModel·훅을 import하지 않는다. core·shared는 도메인을 모른다. +- 여러 기능에서 쓴다는 이유만으로 기능 코드를 core/shared로 옮기지 않는다. -## 환경과 저장 +앱 계층 -- `--dart-define=FLAVOR=dev|prod`로 `AppEnv`를 만든다. 생략하면 dev. API 주소 등 환경값은 `app/env.dart`에만 둔다. -- dev 빌드는 release 모드로도 배포하므로 화면 왼쪽 위에 `DEV` 배너가 붙는다. -- 네이티브 flavor(앱 ID·이름 분리, 두 앱 동시 설치)는 아직 없다. 추가할 때 Android `productFlavors`와 iOS scheme·xcconfig를 같이 만든다. -- 인증 정보는 `FlutterSecureStorage`에만 저장한다. `SharedPreferencesAsync`·로그·URL·분석 이벤트에 넣지 않는다. 디버그 로그 인터셉터는 헤더를 남기지 않는다. +- View는 표시·입력·이동만, ViewModel(Riverpod Notifier/AsyncNotifier)은 상태·명령, Repository는 변환·캐시·저장, Service는 HTTP·SDK 호출만. +- `getIt`은 `app/di.dart`(등록)와 `presentation/providers/`(연결 Provider)에서만. ViewModel은 get_it에 등록하지 않는다. +- 신청·예매·결제 같은 쓰기 명령은 Provider `build()`가 아니라 버튼 → ViewModel 메서드로 실행하고 중복 실행을 막는다. 권한·재고·가격은 서버가 최종 판단한다. +- 로그아웃·계정 전환 시 세션·Repository 캐시·소켓·보안 저장소를 정리하고 이전 세션의 늦은 응답은 버린다. +- 인증 정보는 `FlutterSecureStorage`에만. 토큰을 SharedPreferences·로그·URL·분석 이벤트에 넣지 않는다. -## 모델과 코드 생성 +디자인 -- 모델은 `freezed` + `json_serializable`. DTO(서버 응답)와 도메인 모델을 구분하고 변환은 Repository에서 한다. -- `*.freezed.dart`, `*.g.dart`는 직접 수정하지 않는다. 모델을 바꾸면 build_runner를 돌리고 생성 파일도 함께 커밋한다(CI가 build_runner 없이 분석·테스트). -- `pubspec.yaml`의 SDK 제약과 패키지 메이저 버전 변경은 PR에서 따로 알린다. +- 색·간격·모서리·글자 크기는 토큰만 쓴다 (앱 `context.colors`·`AppSpacing`·`AppRadius`·`textTheme`, 웹 `var(--color-*)` 등). hex·`Colors.*`·숫자 직접 사용 금지. 토큰은 앱·웹·문서를 한 PR에서 같이 바꾼다. -## 이름 +코드·테스트 -- 파일은 snake_case, 접미사로 역할을 드러낸다: `login_view.dart`, `login_view_model.dart`, `auth_repository.dart`, `auth_service.dart`, `login_request_dto.dart`. -- Provider 변수는 `xxxProvider`. 라우트 경로 문자열은 `AppRoutes`에만 둔다. -- 테스트는 `test/`에 `lib/`와 같은 경로. 순수 로직은 단위 테스트, 화면은 위젯 테스트. 문구를 고정하는 테스트는 만들지 않는다. +- 모델은 freezed + json_serializable. `*.g.dart`·`*.freezed.dart`는 직접 수정하지 않고 생성 파일도 커밋한다. +- 환경값은 앱 `app/env.dart`, 웹 `app/env.ts`에서만 읽는다. 라우트 경로는 앱 `AppRoutes`, 웹 `routes.ts`에만. +- 테스트는 앱은 `test/`에 `lib/`와 같은 경로, 웹은 파일 옆 `*.test.tsx`. 연결 Provider를 바꿔 끼우고 전역 getIt에 기대지 않는다. 문구를 고정하는 테스트, 고정 sleep으로 기다리는 테스트는 만들지 않는다. +- `any`, `// ignore:`, `eslint-disable`로 오류를 숨기지 않는다. ## Git·Jira @@ -131,16 +68,17 @@ final loginViewModelProvider = | --- | --- | | 브랜치 | `feat/JECT-123-login`, `fix/JECT-124-login-error` (type: feat / fix / chore / refactor / docs) | | 커밋 | `feat(JECT-123): 로그인 기능 구현`. 본문은 "왜"만, 파일 나열 금지 | -| PR | `[JECT-123] 로그인 기능 구현`. 본문: 변경 / 검증 / UI 캡처 / 호환성 | +| PR | `[JECT-123] 로그인 기능 구현`. 본문은 `.github/PULL_REQUEST_TEMPLATE.md` | | 기능 머지 | 기능 브랜치 → `develop`, 상대 1명 리뷰 후 squash | | 릴리스 | `develop` → `main`, 이력 유지하는 merge | | 긴급 수정 | `main`에서 fix 브랜치 → PR로 main 반영 → develop에도 반영 | -| 공통 변경 | DI·모델·라우팅·네이티브·bridge는 사전 공유 후 상대 리뷰 | +| 사전 공유 | DI·공유 모델·라우팅·네이티브·bridge·토큰·pubspec/package.json 변경은 PR 전에 한 줄 알림 | `JECT-123`은 예시다. `develop` 브랜치는 아직 없으므로 첫 기능 작업 전에 만든다. ## 아직 안 한 것 -- 네이티브 flavor, Shorebird, Fastlane, GitHub Actions -- 토큰 갱신(동시 401은 한 번만 갱신)·세션 복원·WebView bridge -- `develop` 브랜치, `apps/web`, `docs/` +- 네이티브 flavor(앱 ID·이름 분리), Shorebird, Fastlane, GitHub Actions +- 토큰 갱신·세션 복원·WebView bridge, `shared/widgets`(Loading/Error/Empty), `core/error` +- 웹 서버 데이터 라이브러리(TanStack Query) 도입 여부, 웹 호스팅 +- `develop` 브랜치, `docs/api/`, `docs/releases.md` diff --git a/README.md b/README.md index 692b3ca..df33e3c 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,17 @@ # highfive-5th-Client -highfive 5기 클라이언트 저장소. 앱(Flutter)과 웹(React, 예정)을 같은 저장소에서 관리한다. +highfive 5기 클라이언트 저장소. 앱(Flutter)과 웹(React + TypeScript + Vite)을 같은 저장소에서 관리한다. ``` -apps/mobile Flutter 앱 -apps/web React + TypeScript + Vite (예정) -docs/ API·앱↔웹 계약·배포 절차 (예정) +apps/mobile Flutter 앱 (Flutter 3.47.9, fvm) +apps/web 공개 웹·관객용 모바일 웹 (Node 24, pnpm) +docs/ 작업 흐름·구조·디자인 토큰 규칙 ``` -작업 규칙은 [AGENTS.md](./AGENTS.md)를 본다. +작업 규칙은 [AGENTS.md](./AGENTS.md)에서 시작한다. ## 앱 실행 -Flutter 버전은 `apps/mobile/.fvmrc`에 고정한다(현재 3.47.9). - ```bash cd apps/mobile fvm install # .fvmrc 버전 설치 @@ -28,3 +26,18 @@ fvm dart format --set-exit-if-changed lib test fvm flutter analyze fvm flutter test ``` + +## 웹 실행 + +```bash +cd apps/web +corepack enable # pnpm 버전은 package.json의 packageManager를 따른다 +pnpm install +pnpm dev +``` + +PR 전 검증: + +```bash +pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build +``` diff --git a/docs/design-tokens.md b/docs/design-tokens.md new file mode 100644 index 0000000..9dfa65c --- /dev/null +++ b/docs/design-tokens.md @@ -0,0 +1,129 @@ +# 디자인 토큰 + +색·간격·모서리·글자 크기 값을 한 곳에서 정하고, 앱과 웹이 같은 이름·같은 값을 쓰게 하는 규칙이다. + +## 1. 원칙 + +- **기준은 이 문서의 표**다. Figma 변수가 생기면 그 이름을 그대로 따라 표를 고친다. +- **두 단계**: 원시(primitive) 토큰(`brand.500`, `gray.200`)은 팔레트, 의미(semantic) 토큰(`color.primary`, `color.border`)은 쓰임새. 화면 코드는 **의미 토큰만** 쓴다. 원시 토큰은 토큰 파일 안에서만 참조한다. 디자인이 바뀌면 의미 토큰이 가리키는 원시 값만 바꾸면 되고 화면 코드는 그대로다. +- **앱과 웹은 각자 파일에 손으로 같은 값을 둔다.** 토큰이 수십 개 수준이라 생성 도구(Style Dictionary 등)보다 손 동기화가 단순하다. 토큰이 100개를 넘거나 다크 모드가 들어오면 그때 생성 도구를 검토한다. + +| 위치 | 파일 | +| --- | --- | +| 기준 | `docs/design-tokens.md` (이 문서) | +| 앱 | `apps/mobile/lib/shared/theme/app_colors.dart`, `app_spacing.dart`, `app_radius.dart`, `app_typography.dart` | +| 웹 | `apps/web/src/shared/styles/tokens.css` | + +## 2. 바꾸는 절차 + +1. 디자이너와 값·이름 확정 +2. 이 문서의 표 수정 +3. 앱 파일과 웹 파일을 같이 수정 +4. 한 PR에 셋 다 넣고, 바뀐 화면 캡처(앱·웹) 첨부 +5. 상대 리뷰 (토큰은 "사전 공유" 대상) + +한쪽만 바꾸지 않는다. 새 토큰이 필요하면 먼저 기존 토큰으로 안 되는지 본다. 한 화면에서만 쓰는 값은 토큰이 아니다 — 그 컴포넌트 CSS·위젯에 두되, 두 번째 쓰임이 생기면 토큰으로 올린다. + +## 3. 토큰 표 + +현재 값은 **디자인 확정 전 임시값**이다. 이름과 구조만 믿고, 값은 디자인이 나오면 바뀐다. + +### 색 — 원시 (토큰 파일 안에서만) + +| 이름 | 값 | +| --- | --- | +| brand.500 | `#4F46E5` | +| brand.600 | `#4338CA` | +| gray.50 | `#F9FAFB` | +| gray.200 | `#E5E7EB` | +| gray.600 | `#4B5563` | +| gray.900 | `#111827` | +| red.500 | `#EF4444` | +| white | `#FFFFFF` | + +### 색 — 의미 (화면 코드가 쓰는 것) + +| 이름 | 가리킴 | 앱 | 웹 | 쓰임 | +| --- | --- | --- | --- | --- | +| color.primary | brand.500 | `context.colors.primary` | `var(--color-primary)` | 주 버튼, 강조 | +| color.primaryPressed | brand.600 | `.primaryPressed` | `--color-primary-pressed` | 눌림 상태 | +| color.onPrimary | white | `.onPrimary` | `--color-on-primary` | primary 위 글자 | +| color.background | gray.50 | `.background` | `--color-background` | 화면 바탕 | +| color.surface | white | `.surface` | `--color-surface` | 카드·시트 | +| color.textPrimary | gray.900 | `.textPrimary` | `--color-text-primary` | 본문 | +| color.textSecondary | gray.600 | `.textSecondary` | `--color-text-secondary` | 보조 설명 | +| color.border | gray.200 | `.border` | `--color-border` | 구분선·테두리 | +| color.danger | red.500 | `.danger` | `--color-danger` | 오류·삭제 | + +### 간격 (4 배수) + +| 이름 | 값 | 앱 | 웹 | +| --- | --- | --- | --- | +| space.1 | 4 | `AppSpacing.x1` | `--space-1` | +| space.2 | 8 | `AppSpacing.x2` | `--space-2` | +| space.3 | 12 | `AppSpacing.x3` | `--space-3` | +| space.4 | 16 | `AppSpacing.x4` | `--space-4` | +| space.6 | 24 | `AppSpacing.x6` | `--space-6` | +| space.8 | 32 | `AppSpacing.x8` | `--space-8` | + +### 모서리 + +| 이름 | 값 | 앱 | 웹 | +| --- | --- | --- | --- | +| radius.sm | 8 | `AppRadius.sm` | `--radius-sm` | +| radius.md | 12 | `AppRadius.md` | `--radius-md` | +| radius.lg | 16 | `AppRadius.lg` | `--radius-lg` | + +### 글자 크기 + +| 이름 | 값 | 앱 | 웹 | +| --- | --- | --- | --- | +| fontSize.sm | 14 | `textTheme.bodySmall` | `--font-size-sm` | +| fontSize.md | 16 | `textTheme.bodyMedium` | `--font-size-md` | +| fontSize.lg | 20 | `textTheme.titleLarge` | `--font-size-lg` | +| fontSize.xl | 24 | `textTheme.headlineSmall` | `--font-size-xl` | + +앱은 크기를 `AppFontSize`에 두고 `AppTypography.textTheme`가 Material `TextTheme`에 매핑한다. 위젯은 `Theme.of(context).textTheme.*`만 쓴다. + +## 4. 쓰는 법 + +앱: + +```dart +Container( + padding: const EdgeInsets.all(AppSpacing.x4), + decoration: BoxDecoration( + color: context.colors.surface, + border: Border.all(color: context.colors.border), + borderRadius: BorderRadius.circular(AppRadius.md), + ), + child: Text(title, style: Theme.of(context).textTheme.titleLarge), +) +``` + +웹 (`NoticeCard.module.css`): + +```css +.card { + padding: var(--space-4); + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: var(--radius-md); + font-size: var(--font-size-md); +} +``` + +## 5. 하면 안 되는 것 + +- 위젯·컴포넌트에서 hex, `Colors.*`, 숫자 px·dp 직접 사용 +- 원시 토큰(`_Palette.*`, `--gray-200`)을 토큰 파일 밖에서 참조 +- 앱·웹 중 한쪽만 바꾸기 +- 한 화면용 값을 토큰에 올리기 +- 토큰 파일에 색·크기 외의 로직 넣기 + +## 6. 아직 없는 것 (필요해질 때 같은 절차로 추가) + +- 다크 모드 (`AppColors.dark`, `@media (prefers-color-scheme: dark)`) +- 폰트 패밀리·행간·자간 +- 그림자, 애니메이션 시간 +- 컴포넌트 토큰 (버튼 높이, 입력창 높이 등) diff --git a/docs/mobile-architecture.md b/docs/mobile-architecture.md new file mode 100644 index 0000000..701e3fa --- /dev/null +++ b/docs/mobile-architecture.md @@ -0,0 +1,270 @@ +# 앱 구조 (apps/mobile) + +feature-first + 가벼운 MVVM + Riverpod. 이 문서는 "어떤 파일이 어디에 들어가고, 누가 누구를 import할 수 있는가"를 정한다. +작업 순서는 [workflow.md](./workflow.md), 토큰 값은 [design-tokens.md](./design-tokens.md). + +## 1. 폴더와 들어가는 파일 + +`(있음)`은 지금 존재하는 파일, 나머지는 해당 기능을 만들 때 생긴다. 빈 폴더를 미리 만들지 않는다. + +``` +lib/ +├── main.dart (있음) AppEnv 결정 → setupDi → ProviderScope(HighfiveApp) +│ +├── app/ 앱 전체를 묶는 것만. 기능 로직 금지 +│ ├── app.dart (있음) MaterialApp.router, 테마, dev 배너 +│ ├── di.dart (있음) setupDi: get_it 등록. Service·Repository는 여기에 추가 +│ ├── env.dart (있음) Flavor, AppEnv(apiBaseUrl 등 환경값) +│ ├── providers.dart (있음) 앱 전역 연결 Provider (appEnvProvider) +│ └── router.dart (있음) AppRoutes 경로 상수 + routerProvider. 인증 redirect는 여기 +│ +├── core/ 기술 기반. 도메인(공연·예매)을 모른다 +│ ├── di/locator.dart (있음) getIt 인스턴스 +│ ├── network/ +│ │ ├── dio_client.dart (있음) createDio: baseUrl·timeout·디버그 로그 +│ │ ├── auth_interceptor.dart 토큰 첨부, 401 → 한 번만 갱신 후 재시도 +│ │ └── api_error_mapper.dart DioException → AppException 변환 +│ ├── error/app_exception.dart sealed class: network / unauthorized / notFound / conflict / server / unknown +│ ├── storage/ +│ │ ├── secure_store.dart FlutterSecureStorage 래퍼 + 키 상수 (토큰) +│ │ └── prefs_store.dart SharedPreferencesAsync 래퍼 + 키 상수 (설정) +│ ├── sdk/ 소셜 로그인·지도·푸시·QR 스캔 SDK 래퍼 (각 1파일) +│ └── webview/app_bridge.dart 웹 → 앱 명령 수신·검증 (출처·명령·버전) +│ +├── shared/ 공통 UI. 도메인을 모른다 +│ ├── theme/ +│ │ ├── app_colors.dart (있음) 색 토큰 (ThemeExtension), context.colors +│ │ ├── app_spacing.dart (있음) 간격 토큰 +│ │ ├── app_radius.dart (있음) 모서리 토큰 +│ │ ├── app_typography.dart (있음) 글자 크기 토큰 → TextTheme +│ │ └── app_theme.dart (있음) 토큰을 ThemeData로 묶음 +│ ├── widgets/ app_button.dart, app_text_field.dart, +│ │ loading_view.dart, error_view.dart, empty_view.dart +│ ├── utils/ date_format.dart, money_format.dart 같은 순수 함수 +│ └── extensions/ context_extensions.dart 등 +│ +└── features/ + └── / auth · bands · performances · recruitments · venues + │ · ticketing · payments · settlements · chat + ├── models/ 도메인 모델. 화면이 쓰는 모양 + │ ├── performance.dart freezed 클래스 + │ └── performance_status.dart enum + ├── data/ + │ ├── dto/ 서버 응답·요청 모양 (json_serializable) + toModel() + │ │ └── performance_dto.dart + │ ├── services/ Dio 호출만. DTO를 돌려준다 + │ │ └── performance_service.dart + │ └── repositories/ DTO→모델, 캐시, 저장. 다른 기능이 쓰는 계약 + │ └── performance_repository.dart + └── presentation/ + ├── providers/ 연결 Provider (getIt → Riverpod), family 조회 Provider + │ └── performance_providers.dart + ├── view_models/ Notifier / AsyncNotifier + │ └── performance_detail_view_model.dart + ├── views/ 라우트 단위 화면 (Scaffold 하나) + │ └── performance_detail_view.dart + └── widgets/ 이 기능 안에서만 쓰는 조각 위젯 + └── performance_poster.dart +``` + +- 파일 하나면 폴더를 만들지 않아도 된다. 둘 이상 되면 위 구조대로 나눈다. +- `core`와 `shared`의 차이: core는 "어떻게 통신·저장하는가", shared는 "어떻게 보이는가". 둘 다 공연·예매 같은 도메인 단어를 모른다. +- 여러 기능에서 쓴다는 이유만으로 기능 코드를 core/shared로 옮기지 않는다. 다른 기능이 필요하면 그 기능의 Repository·모델을 import한다. + +## 2. 의존성 방향 + +``` +main.dart ─► app ─► features ─► core + │ │ + └──────► shared ──(드물게)──► core +``` + +| import 하는 쪽 \ 되는 쪽 | app | features | core | shared | +| --- | --- | --- | --- | --- | +| **app** | - | O (router가 View, di가 Service·Repository) | O | O | +| **features** | **X** | 같은 기능 안 O / 다른 기능은 `data/repositories`·`models`만 | O | O | +| **core** | X | X | - | X | +| **shared** | X | X | 드물게 (오류 타입 표시 등) | - | + +기능 안에서는 아래로만 간다: + +``` +presentation/views ──► widgets, view_models, providers, models +presentation/view_models ──► providers(연결), data/repositories, models +data/repositories ──► data/services, data/dto, models, core +data/services ──► data/dto, core/network +models ──► 패키지만 (flutter 포함 안 함) +``` + +왜: 아래층이 위층을 모르면 아래층만 따로 테스트하고 교체할 수 있다. `features → app`을 막는 이유는 순환(app이 features를 import하므로)과, 기능이 앱 전체 설정에 기대는 것을 막기 위해서다. 기능이 환경값이 필요하면 Service·Repository가 생성자로 받는다. + +## 3. 계층 책임 + +``` +View ── 사용자 명령 ──► ViewModel ──► Repository ──► Service ──► 서버/SDK + ▲ │ + └── Riverpod 상태 구독 ─┘ +``` + +| 역할 | 한다 | 하지 않는다 | +| --- | --- | --- | +| View | 표시, 입력 받기, `context.go`, ViewModel 메서드 호출 | HTTP 호출, 권한·재고·가격 판단, 비즈니스 분기 | +| ViewModel | 상태 보유, 사용자 명령 실행, 중복 실행 방지, 오류를 상태로 변환 | 위젯·BuildContext import, getIt 조회 | +| Repository | DTO→모델, 메모리 캐시, 저장소 읽기·쓰기, 세션 정리 | 위젯·Riverpod 의존 | +| Service | Dio·소켓·SDK 호출, DTO 반환 | 모델 변환, 캐시, 재시도 정책 | +| get_it | Service·Repository 생성과 연결 | ViewModel 등록 | + +권한·재고·가격·마감은 서버가 최종 판단한다. 버튼을 숨기는 것으로 확정하지 않는다. + +## 4. 상태를 어디에 두는가 + +| 상태 | 위치 | 예 | +| --- | --- | --- | +| 입력 중인 값 | 위젯 로컬 (`TextEditingController`, `StatefulWidget`) | 로그인 폼, 검색어 | +| 화면 하나의 비동기 상태 | `AsyncNotifier`, `autoDispose` | 공연 상세 로딩·실패 | +| ID별 상태 | `.family` | 공연 ID별 상세 | +| 앱 공통 | `keepAlive` Provider | 세션(로그인 사용자) | +| 서버 데이터 캐시 | Repository 메모리 | 공연 목록 | +| 영속 | `core/storage` (인증은 secure, 설정은 prefs) | 토큰, 마지막 본 탭 | + +- 결과가 남는 명령(신청·예매·결제·입금 확인)은 Provider `build()`에서 실행하지 않는다. 버튼 → ViewModel 메서드. ViewModel은 `state.isLoading`이면 무시한다. 서버 멱등성 키가 있으면 같은 작업에 같은 키를 쓴다. 타임아웃은 실패 확정이 아니므로 결과를 먼저 조회한다. +- 로그아웃·계정 전환: 세션 Provider 초기화 → Repository 캐시·소켓 정리 → secure storage 삭제. 이전 세션 요청의 늦은 응답은 세션 ID를 비교해 버린다. Riverpod 초기화만으로 Repository 캐시가 사라졌다고 가정하지 않는다. + +## 5. 흐름 예시: 공연 상세 + +```dart +// features/performances/models/performance.dart +@freezed +abstract class Performance with _$Performance { + const factory Performance({ + required String id, + required String title, + required DateTime startsAt, + required PerformanceStatus status, + String? posterUrl, + }) = _Performance; +} + +// features/performances/data/dto/performance_dto.dart +@JsonSerializable() +class PerformanceDto { + // ...fromJson / toJson + Performance toModel() => Performance(id: id, title: title, ...); +} + +// features/performances/data/services/performance_service.dart +class PerformanceService { + PerformanceService(this._dio); + final Dio _dio; + + Future fetch(String id) async { + final res = await _dio.get>('/performances/$id'); + return PerformanceDto.fromJson(res.data!); + } +} + +// features/performances/data/repositories/performance_repository.dart +class PerformanceRepository { + PerformanceRepository(this._service); + final PerformanceService _service; + final _cache = {}; + + Future get(String id) async { + final model = (await _service.fetch(id)).toModel(); + _cache[id] = model; + return model; + } + + void clear() => _cache.clear(); // 로그아웃 시 호출 +} + +// app/di.dart (등록) +getIt + ..registerLazySingleton(() => PerformanceService(getIt())) + ..registerLazySingleton(() => PerformanceRepository(getIt())); + +// features/performances/presentation/providers/performance_providers.dart (연결) +final performanceRepositoryProvider = + Provider((ref) => getIt()); + +// features/performances/presentation/view_models/performance_detail_view_model.dart +final performanceDetailProvider = AsyncNotifierProvider.autoDispose + .family(PerformanceDetailViewModel.new); + +class PerformanceDetailViewModel extends AsyncNotifier { + PerformanceDetailViewModel(this.id); + final String id; + + @override + Future build() => ref.read(performanceRepositoryProvider).get(id); +} + +// features/performances/presentation/views/performance_detail_view.dart +class PerformanceDetailView extends ConsumerWidget { + const PerformanceDetailView({super.key, required this.id}); + final String id; + + @override + Widget build(BuildContext context, WidgetRef ref) { + final state = ref.watch(performanceDetailProvider(id)); + return Scaffold( + body: state.when( + loading: () => const LoadingView(), + error: (e, _) => ErrorView(error: e, onRetry: () => ref.invalidate(performanceDetailProvider(id))), + data: (p) => _Body(performance: p), + ), + ); + } +} +``` + +테스트에서는 `ProviderScope(overrides: [performanceRepositoryProvider.overrideWithValue(fakeRepo)])`로 바꿔 끼운다. getIt에는 아무것도 등록하지 않는다. + +## 6. 오류 처리 + +``` +Service(DioException) ─► core/network/api_error_mapper ─► AppException + ─► Repository(통과) ─► ViewModel(AsyncValue.guard → AsyncError) ─► View(ErrorView) +``` + +- `AppException`은 `core/error/app_exception.dart`의 sealed class. 화면은 종류별로 문구·행동(재시도, 로그인 이동)을 정한다. +- View는 `AsyncValue.when`으로 로딩·오류·빈 결과를 반드시 그린다. `shared/widgets`의 `LoadingView`·`ErrorView`·`EmptyView`를 쓴다(첫 화면 만들 때 생성). +- 네트워크 단절·5xx로 로그아웃하지 않는다. `unauthorized`(갱신 실패)만 세션을 정리한다. + +## 7. 하면 안 되는 것 + +- View에서 Dio·Repository·getIt 직접 호출 +- ViewModel에서 `BuildContext`·위젯·`Navigator` 사용 +- `getIt<...>()`을 `app/di.dart`와 `presentation/providers/` 밖에서 호출 +- ViewModel을 get_it에 등록 +- Provider `build()`에서 신청·예매·결제 같은 쓰기 요청 +- 다른 기능의 `presentation/` import (View·ViewModel·widgets·providers) +- `Colors.*`, hex, 숫자 패딩·폰트 크기 직접 사용 — 토큰만 (`context.colors`, `AppSpacing`, `textTheme`) +- `*.g.dart`·`*.freezed.dart` 수정 +- 토큰·개인정보를 SharedPreferences·로그·URL·분석 이벤트에 넣기 +- 문구를 고정하는 테스트, 생성 파일 테스트 +- 빈 폴더·미래용 인터페이스·UseCase 미리 만들기 +- "공통이니까" 기능 코드를 core/shared로 옮기기 + +## 8. 테스트 배치 + +`test/`는 `lib/`와 같은 경로. `lib/features/performances/data/repositories/performance_repository.dart` → `test/features/performances/data/repositories/performance_repository_test.dart`. + +| 대상 | 방법 | 꼭 넣는 경우 | +| --- | --- | --- | +| DTO | `fromJson` 샘플 JSON | 선택값·enum·날짜 | +| Repository | Fake Service 주입 | 변환, 캐시, 정리 | +| ViewModel | `ProviderContainer` + overrides | 로딩·성공·실패·중복 실행 | +| View | `ProviderScope` overrides + `pumpWidget` | 로딩·빈 결과·실패·정상 | + +비동기는 완료 신호를 기다린다(`pumpAndSettle`, `await future`). 고정 `sleep`으로 기다리지 않는다. + +## 9. 이름 + +| 대상 | 규칙 | 예 | +| --- | --- | --- | +| 파일 | snake_case + 역할 접미사 | `login_view.dart`, `login_view_model.dart`, `auth_repository.dart`, `auth_service.dart`, `login_request_dto.dart` | +| 클래스 | 파일명의 PascalCase | `LoginViewModel` | +| Provider | `xxxProvider` | `sessionProvider`, `performanceDetailProvider` | +| 라우트 경로 | `AppRoutes`에만 | `AppRoutes.performanceDetail` | +| 테스트 | `<파일>_test.dart`, 테스트명은 한국어 문장 | `'중복 탭은 한 번만 요청한다'` | diff --git a/docs/web-architecture.md b/docs/web-architecture.md new file mode 100644 index 0000000..576aa77 --- /dev/null +++ b/docs/web-architecture.md @@ -0,0 +1,129 @@ +# 웹 구조 (apps/web) + +React + TypeScript + Vite. 이벤트·공지·FAQ 같은 공개 페이지와, 관객용 모바일 웹(공연 안내·비로그인 예매·조회·e-티켓, 팀 합의 필요)을 담당한다. +앱 WebView 안에서도 열리고 일반 브라우저에서도 열린다. 모바일 폭을 기준으로 만든다. + +## 1. 폴더와 들어가는 파일 + +``` +src/ +├── main.tsx (있음) createRoot + RouterProvider. global.css import +├── vite-env.d.ts (있음) VITE_* 타입 +│ +├── app/ 앱 전체를 묶는 것만 +│ ├── env.ts (있음) VITE_FLAVOR, VITE_API_BASE_URL 읽기·검증 +│ ├── routes.ts (있음) 경로 문자열 상수. 여기 말고는 경로를 쓰지 않는다 +│ ├── router.tsx (있음) appRoutes(RouteObject[]) + createBrowserRouter +│ ├── router.test.tsx (있음) +│ ├── providers.tsx QueryClientProvider 등 전역 Provider (필요해지면) +│ └── NotFoundPage.tsx 잘못된 경로 (첫 공개 페이지 만들 때) +│ +├── shared/ 도메인을 모르는 공통 코드 +│ ├── styles/ +│ │ ├── tokens.css (있음) 디자인 토큰 (CSS 변수) +│ │ └── global.css (있음) 리셋, body 기본 +│ ├── ui/ Button.tsx + Button.module.css, TextField, Spinner, ErrorMessage +│ ├── api/ +│ │ ├── http.ts (있음) fetch 래퍼, HttpError +│ │ └── errors.ts HttpError → 화면용 오류 변환 (필요해지면) +│ ├── bridge/ +│ │ └── appBridge.ts 웹 → 앱 명령 전송, 앱 버전·지원 명령 확인 +│ └── utils/ formatDate.ts, formatMoney.ts 같은 순수 함수 +│ +└── features/ + └── / notices · events · help · performances · reservations · tickets + ├── api/ http 호출 + 요청·응답 타입 + │ └── noticesApi.ts + ├── hooks/ 데이터 상태 (useNotices, useReservation) + ├── components/ 이 기능 안에서만 쓰는 조각 + │ └── NoticeCard.tsx (+ .module.css) + └── pages/ 라우트 단위 화면 + ├── NoticeListPage.tsx (있음, 자리만) + └── NoticeListPage.module.css +``` + +- 파일 하나면 폴더를 만들지 않아도 된다. 빈 폴더·미래용 파일을 미리 만들지 않는다. +- 테스트는 파일 옆에 `*.test.tsx`로 둔다(앱과 달리 같은 폴더). 라우트·훅·변환 함수가 우선, 단순 표시 컴포넌트는 선택. + +## 2. 의존성 방향 + +``` +main.tsx ─► app ─► features ─► shared + └──────────────► shared +``` + +| import 하는 쪽 \ 되는 쪽 | app | features | shared | +| --- | --- | --- | --- | +| **app** | - | O (router가 pages) | O | +| **features** | **X** (경로는 `app/routes.ts`만 예외) | 다른 기능 **X** | O | +| **shared** | X | X | - | + +기능 안에서는 `pages → components, hooks → api`. `api`가 `hooks`나 컴포넌트를 모른다. + +`features → app/routes.ts`만 허용하는 이유: 링크를 만들려면 경로 상수가 필요한데, 경로를 기능마다 복사하면 바뀔 때 깨진다. `routes.ts`는 상수만 있고 아무것도 import하지 않으므로 순환이 생기지 않는다. + +## 3. 상태 + +| 상태 | 위치 | +| --- | --- | +| 입력값·열림/닫힘 | 컴포넌트 `useState` | +| 필터·페이지 번호 | URL search params (새로고침·공유에 살아남아야 하는 것) | +| 서버 데이터 | `features//hooks`. 첫 API 연동 기능에서 TanStack Query 도입 여부를 정한다. 그 전까지는 `useEffect` + `useState`로 작게 | +| 앱 전역 | 없음. 비로그인 웹이라 세션을 두지 않는다 | + +비로그인 예매 조회는 추측 불가능한 조회 수단(서버 발급)을 쓰고, 그 값을 URL 외의 곳(로그·분석 이벤트·localStorage)에 남기지 않는다. 앱 세션 토큰은 어떤 경우에도 웹 URL에 넣지 않는다. + +## 4. 스타일 + +- CSS Modules(`*.module.css`) + `tokens.css` 변수. 전역 클래스는 `global.css`의 리셋뿐. +- 컴포넌트 CSS에서는 `var(--color-*)`, `var(--space-*)`, `var(--radius-*)`, `var(--font-size-*)`만 쓴다. hex·px 직접 사용 금지(토큰 파일 제외). +- 모바일 우선. 본문 최대 폭 480px 가운데 정렬. 데스크톱 전용 레이아웃은 만들지 않는다. +- 레이아웃 폭(`max-width`, breakpoint)과 `1px` 테두리 두께는 토큰이 아니다. 숫자를 그대로 쓴다. +- 인라인 `style={{ }}`는 동적 값(진행률 등)에만. + +## 5. 앱 ↔ 웹 bridge (만들 때 지킬 것) + +- bridge 코드는 `shared/bridge/appBridge.ts` 한 곳. 페이지는 `appBridge.open({ kind: 'performance', id })`처럼 함수만 호출한다. +- 웹은 허용된 명령과 ID만 보낸다. 라우팅·권한 판단은 앱과 서버가 한다. +- 앱 버전·지원 명령을 먼저 확인하고, 미지원이면 웹 안에서 대체 동작(안내 문구·브라우저 링크)을 한다. +- 일반 브라우저(bridge 없음)에서도 모든 페이지가 깨지지 않아야 한다. +- 외부 HTTPS 링크는 브라우저로, 외부 앱 scheme은 허용 목록으로. + +## 6. 환경 + +| 파일 | 용도 | 로드되는 때 | +| --- | --- | --- | +| `.env` | dev 값 (기본) | `pnpm dev`, `pnpm build:dev` | +| `.env.production` | prod 값 | `pnpm build` | + +- `VITE_*`는 번들에 그대로 들어간다. 비밀값을 넣지 않는다. +- 환경값은 `app/env.ts`로만 읽는다. `import.meta.env`를 다른 파일에서 직접 쓰지 않는다. 잘못된 값이면 시작 시 바로 실패한다. +- dev 배포는 `pnpm build:dev`(mode `dev`, NODE_ENV는 production). `--mode development`로 배포 빌드를 만들지 않는다(React 개발 빌드가 들어간다). + +## 7. 도구 버전 + +- Node 24 (`.nvmrc`), pnpm 12 (`packageManager`, `corepack enable`). TypeScript는 `~6.0.x`로 고정 — Vite 템플릿은 7.0을 깔지만 `typescript-eslint`가 아직 7을 지원하지 않는다. 지원되면 같이 올린다. +- `pnpm-workspace.yaml`은 pnpm 12의 "갓 배포된 패키지 설치 보류" 예외 목록이다. 세팅 당시 막 나온 `@vitejs/plugin-react`만 들어 있고, 며칠 지나면 지워도 된다. + +## 8. 하면 안 되는 것 + +- 컴포넌트에서 `fetch`·`http` 직접 호출 (→ `features//api`) +- `import.meta.env`를 `app/env.ts` 밖에서 읽기 +- 경로 문자열을 `app/routes.ts` 밖에 쓰기 +- 다른 기능의 `components`·`hooks`·`pages` import +- `shared`에서 `features`·`app` import +- CSS에 hex·px 직접 쓰기 (토큰 파일 제외) +- bridge 호출을 `shared/bridge` 밖에서 하기, 토큰·조회용 비밀값을 URL·로그에 남기기 +- `any`, `// @ts-ignore`, `eslint-disable`로 오류 숨기기 +- 문구를 고정하는 테스트 + +## 9. 이름 + +| 대상 | 규칙 | 예 | +| --- | --- | --- | +| 컴포넌트·페이지 파일 | PascalCase, 페이지는 `Page` 접미사 | `NoticeListPage.tsx`, `NoticeCard.tsx` | +| 훅 | `useXxx.ts` | `useNotices.ts` | +| api 파일 | `Api.ts`, 함수는 동사 | `noticesApi.ts` → `fetchNotices()` | +| 그 외 ts | camelCase | `formatDate.ts`, `appBridge.ts` | +| CSS Module | 컴포넌트와 같은 이름 | `NoticeCard.module.css` | +| 테스트 | 파일 옆 `*.test.tsx`, 테스트명은 한국어 문장 | `'/ 는 /notices 로 보낸다'` | diff --git a/docs/workflow.md b/docs/workflow.md new file mode 100644 index 0000000..e4bae00 --- /dev/null +++ b/docs/workflow.md @@ -0,0 +1,100 @@ +# 작업 흐름 + +두 명의 FE가 기능 단위로 나눠 개발한다. 이 문서는 "일을 어떤 순서로 하는가"만 다룬다. +코드 배치는 [mobile-architecture.md](./mobile-architecture.md), [web-architecture.md](./web-architecture.md), +색·간격 값은 [design-tokens.md](./design-tokens.md)를 본다. + +## 1. 작업 단위 + +| Jira | 뜻 | 예 | +| --- | --- | --- | +| Epic | 기능 | 티켓팅 | +| Story | 사용자 흐름 | 관객이 공유 링크로 예매하고 예매번호를 받는다 | +| Task / Sub-task | 구현·검증 단위 | 예매 폼 화면, 예매 API 연동, 예매 완료 위젯 테스트 | + +- Task 하나 = PR 하나가 기본. 이틀 안에 끝나지 않으면 Task를 쪼갠다. +- Task를 시작하기 전에 확인한다: 수락 기준(무엇이 되면 끝인가), 필요한 API 계약이 있는가(`docs/api/`, BE가 주는 명세를 여기 둔다), 상대의 공통 변경과 겹치지 않는가. +- 기능 담당자는 그 기능의 통합 책임자다. 페이지·API Task를 나눠 맡아도 머지 순서와 충돌 해결은 담당자가 본다. 영구 소유권은 아니다. + +## 2. 브랜치에서 머지까지 + +``` +develop ──┬── feat/JECT-123-reservation-form ──(PR, squash)──► develop + └── fix/JECT-130-ticket-qr-blank ────(PR, squash)──► develop +develop ──(merge 커밋, 이력 유지)──► main ──► 스토어·웹 배포 +main ──── fix/JECT-140-hotfix ──(PR)──► main ──(merge)──► develop +``` + +1. `develop`에서 분기: `git switch -c feat/JECT-123-reservation-form develop` +2. 구현 (3절 순서) +3. 로컬 검증 (4절) +4. PR: 제목 `[JECT-123] 예매 폼 화면`, 본문은 `.github/PULL_REQUEST_TEMPLATE.md` +5. 상대 리뷰 → 수정 → 승인 → squash merge +6. 머지 후 브랜치 삭제 + +`develop` 브랜치는 아직 없다. 첫 기능 작업 전에 `main`에서 만든다. + +## 3. 기능 하나를 구현하는 순서 + +계약 → 모델 → 데이터 → 상태 → 화면 순서로 간다. 아래층이 먼저 있어야 위층을 테스트할 수 있다. + +### 앱 + +| 순서 | 만드는 것 | 위치 (`lib/features//`) | 끝나는 기준 | +| --- | --- | --- | --- | +| 1 | API 계약 확인 | `docs/api/` | 요청·응답·오류 코드·멱등성 키·상태 전이가 적혀 있다 | +| 2 | 도메인 모델 | `models/` | freezed 클래스, 상태 enum. 화면이 쓰는 모양 | +| 3 | DTO + Service | `data/dto/`, `data/services/` | DTO `fromJson` 단위 테스트. Service는 Dio 호출만 | +| 4 | Repository | `data/repositories/` | DTO→모델 변환, 캐시. Fake Service로 단위 테스트 | +| 5 | 연결 Provider + ViewModel | `presentation/providers/`, `view_models/` | `ProviderContainer` 테스트: 로딩·성공·실패·중복 실행 | +| 6 | View + widgets | `presentation/views/`, `widgets/` | 위젯 테스트: 로딩·빈 결과·실패·정상 각 1개 | +| 7 | 라우트 등록 | `app/router.dart` | 딥링크·뒤로가기 수동 확인 | +| 8 | 수동 확인 | 시뮬레이터·실기기 | 수락 기준대로 동작, 캡처를 PR에 첨부 | + +### 웹 + +`features//api/` → `hooks/` → `components/`·`pages/` → `app/router.tsx` 순서. 끝나는 기준은 앱과 같다. + +### 서버가 아직 없을 때 + +Service를 인터페이스 없이 만들되 생성자 주입으로 받아 테스트에서 Fake로 바꿔 끼운다. +서버가 늦으면 고정 JSON을 돌려주는 임시 Service를 같은 자리에 두고, 실제 서버가 붙으면 그 파일만 지운다. 임시 Service를 기준으로 화면을 완성하지 않는다. 계약이 바뀌면 DTO부터 다시 맞춘다. + +## 4. 로컬 검증 (PR 전 필수) + +앱 (`apps/mobile`): + +```bash +fvm dart format --set-exit-if-changed lib test +fvm flutter analyze +fvm flutter test +``` + +웹 (`apps/web`): + +```bash +pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build +``` + +- 하나라도 실패한 채로 PR을 올리지 않는다. CI가 생기면 같은 명령을 돌린다. +- 화면을 바꿨으면 캡처(앱: 바꾼 플랫폼, 웹: 모바일 폭)를 PR에 넣는다. +- 경로에 한글이 있으면 `flutter analyze`가 크래시한다(analysis server 버그). 영문 경로에 복사해서 돌린다. + +## 5. 리뷰 + +- 리뷰어는 상대 1명. 하루 안에 첫 응답. +- 읽는 순서: 진입점(라우트·버튼) → 상태·요청 → 실패 방어(중복 실행·오류·빈 결과·늦은 응답) → 테스트. PR 본문에 이 순서로 읽을 파일을 적는다. +- 사전 공유가 필요한 변경: DI 등록, 공유 모델, 라우팅, 네이티브 설정, bridge, 디자인 토큰, `pubspec.yaml`·`package.json`. PR 전에 메시지로 한 줄 알린다. +- "승인 + 사소한 수정"은 작성자가 고치고 바로 머지한다. 설계가 갈리면 PR 댓글로 길게 가지 말고 짧게 통화한 뒤 결론을 PR에 적는다. + +## 6. 릴리스·긴급 수정 + +- `develop` → `main`은 merge 커밋(이력 유지). 머지 전 `develop`에서 검증 통과 + 수동 확인. +- 긴급 수정은 `main`에서 `fix/...` 분기 → `main`에 PR → 머지 후 `main`을 `develop`에 merge. +- Dart만 바뀐 긴급 수정은 Shorebird patch 대상(설정 후). 네이티브·권한·SDK·에셋 변경은 새 스토어 release. +- 배포하면 소스 커밋, 검증 결과, (patch면) 환경·플랫폼·대상 release·patch 번호를 `docs/releases.md`에 한 줄 남긴다. 파일은 첫 배포 때 만든다. + +## 7. 장애가 나면 보는 순서 + +- 앱: 세션 상태 → Provider 상태 → Repository 캐시 → HTTP 응답·토큰 갱신 → 라우팅 +- 웹: 라우트·환경값(`app/env.ts`) → API 응답 → bridge 명령·버전·출처 From 839da26075ce3db9175efdcfa05434a4d8587dac Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 22:45:55 +0900 Subject: [PATCH 06/23] =?UTF-8?q?docs:=20PR=20=EC=B2=B4=ED=81=AC=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=EC=99=80=20=ED=85=9C=ED=94=8C=EB=A6=BF=20?= =?UTF-8?q?=EC=B2=B4=ED=81=AC=EB=B0=95=EC=8A=A4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 두 사람이 번갈아 만들어도 같은 결과가 나오도록, 각 검사 항목이 어떤 일관성을 지키는지와 확인 방법을 docs/pr-checklist.md에 두고 PR 템플릿은 그 요약 체크박스만 갖는다. --- .github/PULL_REQUEST_TEMPLATE.md | 35 +++++- AGENTS.md | 3 +- docs/pr-checklist.md | 206 +++++++++++++++++++++++++++++++ docs/workflow.md | 4 +- 4 files changed, 241 insertions(+), 7 deletions(-) create mode 100644 docs/pr-checklist.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 962288e..a044073 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,18 +4,43 @@ ## 검증 -- [ ] 앱: `fvm dart format` / `fvm flutter analyze` / `fvm flutter test` 통과 -- [ ] 웹: `pnpm format:check` / `lint` / `typecheck` / `test` / `build` 통과 -- [ ] 수동 확인: + ## UI 캡처 - + ## 호환성·주의 - + ## 리뷰 순서 + +## 새 문구 + + + +## 작성자 체크 (docs/pr-checklist.md A절) + +- [ ] A1 형식: 브랜치·커밋·PR 제목 규칙, PR 하나 = Task 하나 +- [ ] A2 자동 검증: 앱 format·analyze·test / 웹 format·lint·typecheck·test·build 전부 통과 +- [ ] A3 구조: 파일이 규칙 위치에 있고, features→app·다른 기능 내부 import 없음, 미래용 코드 없음 +- [ ] A4 명령: 쓰기 요청은 버튼→ViewModel, 중복 실행 방지, 서버 판단을 화면에서 확정하지 않음 (해당 시) +- [ ] A5 화면 상태: 로딩·빈·실패·정상 전부 있고 공통 위젯 사용 (해당 시) +- [ ] A6 토큰: hex·`Colors.*`·숫자 크기 없음. 토큰 변경은 앱·웹·문서 함께 +- [ ] A7 재사용: 공통 위젯이 있으면 그것을 씀 +- [ ] A8 문구: 오류 문구 "무엇이+어떻게", 버튼은 동사, 용어 통일, 탭 영역 44 +- [ ] A9 데이터: 토큰·개인정보가 로그·URL·분석·prefs에 없음. env·routes 한 곳 +- [ ] A10 테스트: 같은 경로, 4케이스, 뒤집으면 실패, 문구 고정·고정 sleep 없음 +- [ ] A11 생성 파일·lock 같이 커밋 (해당 시) +- [ ] A12 수동 확인: 시나리오 실행, 캡처 첨부 +- [ ] A13 사전 공유 (공통 변경 시) + +## 리뷰어 체크 (docs/pr-checklist.md B절) + +- [ ] B1 진입점 → B2 상태·요청 → B3 실패 방어 → B4 테스트 순으로 읽음 +- [ ] B5 일관성: 기존 비슷한 화면과 여백·빈 화면·문구 톤이 같음 +- [ ] B6 범위: 관계없는 변경이 섞이지 않음 +- [ ] 코멘트는 `[must]`/`[nit]` 접두사와 근거 절 번호 diff --git a/AGENTS.md b/AGENTS.md index d284972..039fbec 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,6 +8,7 @@ | 앱 폴더에 어떤 파일이 들어가고 누가 누구를 import하나 | [docs/mobile-architecture.md](./docs/mobile-architecture.md) | | 웹 폴더 구조·의존성·bridge·환경 | [docs/web-architecture.md](./docs/web-architecture.md) | | 색·간격·글자 크기 값과 바꾸는 절차 | [docs/design-tokens.md](./docs/design-tokens.md) | +| PR 올리기 전·리뷰할 때 무엇을 왜 보나 ("누가 만들어도 같은 느낌"의 검사 항목) | [docs/pr-checklist.md](./docs/pr-checklist.md) | ## 저장소 @@ -68,7 +69,7 @@ PR 전에 포맷·분석·테스트(웹은 빌드까지)가 전부 통과해야 | --- | --- | | 브랜치 | `feat/JECT-123-login`, `fix/JECT-124-login-error` (type: feat / fix / chore / refactor / docs) | | 커밋 | `feat(JECT-123): 로그인 기능 구현`. 본문은 "왜"만, 파일 나열 금지 | -| PR | `[JECT-123] 로그인 기능 구현`. 본문은 `.github/PULL_REQUEST_TEMPLATE.md` | +| PR | `[JECT-123] 로그인 기능 구현`. 본문은 `.github/PULL_REQUEST_TEMPLATE.md`, 체크 항목은 `docs/pr-checklist.md` | | 기능 머지 | 기능 브랜치 → `develop`, 상대 1명 리뷰 후 squash | | 릴리스 | `develop` → `main`, 이력 유지하는 merge | | 긴급 수정 | `main`에서 fix 브랜치 → PR로 main 반영 → develop에도 반영 | diff --git a/docs/pr-checklist.md b/docs/pr-checklist.md new file mode 100644 index 0000000..fab6f44 --- /dev/null +++ b/docs/pr-checklist.md @@ -0,0 +1,206 @@ +# PR 체크리스트 — 누가 만들어도 같은 결과가 나오게 + +두 사람이 번갈아 만들어도 사용자는 한 사람이 만든 것처럼 느껴야 하고, 어느 기능 폴더를 열어도 같은 자리에 같은 것이 있어야 한다. +"같은 느낌"은 취향이 아니라 **검사할 수 있는 항목**으로 바꿔야 지켜진다. 이 문서는 그 항목과, 각 항목이 어떤 일관성을 지키는지(왜 보는지), 어떻게 확인하는지를 적는다. + +PR 템플릿(`.github/PULL_REQUEST_TEMPLATE.md`)의 체크박스는 이 문서의 요약이다. 체크박스가 왜 있는지 모르겠으면 여기서 같은 번호를 찾는다. + +## 0. 쓰는 법 + +- **작성자**는 PR을 올리기 전에 A를 위에서부터 돌린다. 해당 없는 항목은 템플릿에서 "해당 없음"이라고 쓰고 지운다. 체크 안 한 채로 두지 않는다. +- **리뷰어**는 B 순서로 읽는다. 작성자가 체크했다고 믿지 않고, B3(실패 방어)과 B5(일관성)는 직접 본다. +- 항목이 많아 보이면 항목을 빼지 말고 **자동화로 옮긴다**(D절). 사람이 보는 항목은 자동화가 안 되는 것만 남긴다. +- 항목을 늘리는 기준: 같은 지적이 PR 두 번 나오면 체크 항목으로 올린다. 세 번 나오면 린트·테스트·공통 위젯으로 옮긴다. + +## 1. "같은 느낌"은 무엇으로 만들어지나 + +사용자가 느끼는 일관성과 개발자가 느끼는 일관성을 나눠서, 각각 어느 항목이 지키는지 표로 둔다. 항목을 추가·삭제할 때 이 표가 비는 칸이 없는지 본다. + +| 사용자가 느끼는 것 | 구체적으로 | 지키는 항목 | +| --- | --- | --- | +| 화면 리듬이 같다 | 여백·모서리·글자 크기가 화면마다 같은 단계 | A6 토큰 | +| 기다리는 모양이 같다 | 로딩·빈 결과·실패 화면이 어느 화면에서나 같은 위젯 | A5 화면 상태 4종, A7 공통 위젯 | +| 실패해도 당황하지 않는다 | 오류 문구가 "무엇이, 어떻게 하면"으로 끝나고 재시도가 있다 | A5, A8 문구 | +| 두 번 눌러도 사고가 안 난다 | 신청·예매·결제 버튼 연타, 느린 네트워크 | A4 명령 처리 | +| 로그아웃·계정 전환이 깨끗하다 | 이전 계정 데이터가 비치지 않는다 | A4, A9 데이터 | +| 앱과 웹이 한 제품이다 | 같은 색·간격·문구 톤, bridge로 자연스럽게 이동 | A6, A8, A12 수동 확인 | + +| 개발자가 느끼는 것 | 구체적으로 | 지키는 항목 | +| --- | --- | --- | +| 어느 기능을 열어도 같은 자리에 있다 | `models/ data/ presentation/` 배치, 파일 접미사 | A3 구조 | +| 어디서 무엇을 import해도 되는지 고민 안 한다 | `app → features → core/shared` 한 방향 | A3 | +| 테스트가 어디 있고 무엇을 지키는지 안다 | 같은 경로, 4케이스, 문구 고정 없음 | A10 테스트 | +| 환경·경로·비밀이 흩어지지 않는다 | `env`, `routes` 한 곳, 토큰은 보안 저장소 | A9 | +| 이력을 검색할 수 있다 | 브랜치·커밋·PR 제목 형식 | A1 형식 | + +## A. 작성자 체크 (PR 올리기 전) + +각 항목: **본다** → **왜** → **확인 방법**. 확인 방법의 `grep`은 도우미일 뿐 통과 조건이 아니다. 결과를 보고 사람이 판단한다. + +### A1. 형식 + +- 본다: 브랜치 `feat/JECT-123-...`, 커밋 `feat(JECT-123): 한글 요약`, PR 제목 `[JECT-123] 요약`, 템플릿 섹션이 비어 있지 않음, PR 하나 = Task 하나. +- 왜: 나중에 "이 화면 언제 왜 바뀌었지"를 사람 기억이 아니라 `git log`로 찾기 위해. +- 확인: `git log --oneline main..HEAD`로 커밋 제목을 본다. 관계없는 변경(리팩터링, 포맷만)이 섞였으면 PR을 나눈다. + +### A2. 자동 검증 + +- 본다: 앱 `fvm dart format --set-exit-if-changed lib test` / `fvm flutter analyze` / `fvm flutter test`, 웹 `pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build`. 전부 종료 코드 0. +- 왜: 가장 싸게 얻는 일관성. 사람이 보기 전에 기계가 거를 수 있는 것은 전부 기계에 맡긴다. +- 확인: 마지막 커밋 뒤에 다시 돌린다. 경고를 `// ignore:`·`eslint-disable`·`any`로 지웠으면 그 자체가 실패다. + +### A3. 구조와 의존성 + +- 본다: + - 새 파일이 `features//{models,data/{dto,services,repositories},presentation/{providers,view_models,views,widgets}}` 또는 웹 `features//{api,hooks,components,pages}` 안에 있다. + - `core`·`shared`에 공연·예매 같은 도메인 단어가 들어가지 않았다. + - `features`가 `app/`을 import하지 않는다(웹은 `app/routes.ts`만 예외). 다른 기능의 `presentation/`(웹: `components/ hooks/ pages/`)을 import하지 않는다. + - 빈 폴더, "나중에 쓸" 인터페이스·UseCase·추상 클래스가 없다. +- 왜: 구조가 같아야 상대가 내 기능을 고칠 때 찾는 시간이 0에 가깝다. 의존성 방향이 지켜져야 아래층을 따로 테스트하고 바꿀 수 있다. +- 확인: + ```bash + # 앱: features가 app을 import하는가 + grep -rn "import '.*\/app\/" apps/mobile/lib/features + # 앱: 다른 기능의 presentation을 import하는가 (자기 기능 이름은 결과에서 눈으로 제외) + grep -rn "features/.*/presentation" apps/mobile/lib/features + # 웹: features가 app(routes 제외)이나 다른 기능 내부를 import하는가 + grep -rn "from '.*\/app\/" apps/web/src/features | grep -v routes + grep -rnE "from '\.\./\.\./[a-z]+/(components|hooks|pages)" apps/web/src/features + ``` + 자세한 허용표: [mobile-architecture.md 2절](./mobile-architecture.md#2-의존성-방향), [web-architecture.md 2절](./web-architecture.md#2-의존성-방향). + +### A4. 명령 처리 (쓰기 요청이 있을 때) + +- 본다: + - 신청·예매·결제·입금 확인·취소는 버튼 → ViewModel 메서드. Provider `build()`나 `initState`에서 쓰기 요청을 보내지 않는다. + - ViewModel이 `state.isLoading`이면 두 번째 호출을 무시한다. 버튼도 로딩 중 비활성. + - 서버 멱등성 키 계약이 있으면 같은 작업에 같은 키. 타임아웃이면 실패로 표시하지 않고 결과를 먼저 조회한다. + - 로그아웃·계정 전환이 걸리는 변경이면 Repository 캐시·소켓 정리가 호출되고, 이전 세션의 늦은 응답을 버린다. + - 권한·재고·가격·마감을 화면에서 확정하지 않는다. 버튼을 숨겨도 서버 응답으로 다시 판단한다. +- 왜: 돈·자리가 걸린 명령이 두 번 가거나 유실되면 사용자 신뢰가 한 번에 깨진다. 이건 화면마다 다르게 처리하면 안 되는 대표적인 "같은 느낌"이다. +- 확인: 시뮬레이터에서 네트워크를 느리게(Network Link Conditioner / Chrome throttling) 두고 버튼을 연타한다. 요청이 한 번만 가는지 로그로 본다. + +### A5. 화면 상태 4종 + +- 본다: 데이터를 받는 화면은 **로딩 / 빈 결과 / 실패 / 정상**이 전부 있다. 실패에는 재시도나 다음 행동(로그인으로 이동 등)이 있다. 로딩·빈·실패는 `shared/widgets`의 `LoadingView`·`EmptyView`·`ErrorView`(웹: `shared/ui`)를 쓰고 화면마다 새로 그리지 않는다. +- 왜: 사용자가 "기다리는 모양"과 "안 될 때 모양"을 한 번 배우면 모든 화면에서 통하게. +- 확인: `AsyncValue.when`(앱)의 세 분기가 모두 있는지, 웹은 `loading / error / empty / data` 분기. 시뮬레이터에서 비행기 모드로 실패 화면을 한 번 띄운다. + +### A6. 디자인 토큰 + +- 본다: 위젯·컴포넌트 코드에 hex, `Colors.*`, 숫자 패딩·폰트 크기·모서리가 없다. 전부 `context.colors.*` / `AppSpacing` / `AppRadius` / `textTheme`, 웹은 `var(--color-*)` 등. 토큰 값을 바꿨으면 앱·웹·`design-tokens.md` 셋 다 같은 PR에 있고 캡처가 있다. +- 왜: 화면 리듬(여백·모서리·글자 크기)이 같으면 디자인이 달라도 "같은 앱"으로 느낀다. 반대로 한 화면만 14px 대신 15px이면 이유 없이 어색하다. +- 확인: + ```bash + grep -rnE "Color\(0x|Colors\.|fontSize: [0-9]|EdgeInsets\.(all|symmetric|only|fromLTRB)\([0-9]|Radius\.circular\([0-9]" apps/mobile/lib/features apps/mobile/lib/app + grep -rnE "#[0-9a-fA-F]{3,8}\b|[0-9]+px" apps/web/src/features apps/web/src/shared/ui --include='*.css' + ``` + 예외: `1px` 테두리, `max-width`·breakpoint, 진행률 같은 동적 값. 예외는 그 줄에 짧게 이유를 남긴다. 토큰 자체가 없으면 [design-tokens.md 2절](./design-tokens.md#2-바꾸는-절차)대로 추가하고 "한 화면용 값"이면 추가하지 않는다. + +### A7. 공통 위젯·컴포넌트 재사용 + +- 본다: 버튼·입력창·카드·목록 아이템·바텀시트가 `shared/widgets`(웹 `shared/ui`)에 이미 있으면 그것을 쓴다. 비슷한 것을 기능 안에서 다시 만들지 않는다. 새로 만든 조각이 두 번째 기능에서도 필요해지면 그때 `shared`로 올린다(첫 번째 때 미리 올리지 않는다). +- 왜: 같은 버튼이 두 개면 반드시 한쪽만 고쳐지는 날이 온다. +- 확인: PR 안의 새 위젯 이름을 `shared/widgets` 목록과 비교. "Primary", "Button", "Card"가 이름에 들어가면 한 번 더 의심한다. + +### A8. 문구와 접근성 + +- 본다: + - 오류 문구는 "무엇이 안 됐는지 + 무엇을 하면 되는지" 두 조각. 예: "예매 정보를 불러오지 못했어요. 다시 시도해 주세요." + - 버튼은 동사로 끝난다(확인·예매하기·다시 시도). "OK", "Submit" 금지. + - 같은 뜻은 같은 단어: 공연/행사, 예매/예약, 신청/지원 중 하나로 통일(팀이 정한 용어집 — E절). + - 탭 영역 최소 44×44(앱)·44px(웹), 글자 크기는 토큰, 이미지에 대체 텍스트(웹 `alt`, 앱 `Semantics`). +- 왜: 톤이 섞이면 사용자는 "다른 사람이 만든 화면"을 바로 알아챈다. +- 확인: 새 문구를 PR 본문에 모아 적는다(리뷰어가 톤을 한 번에 본다). + +### A9. 데이터·보안·설정 위치 + +- 본다: + - 토큰·개인정보(이름·연락처·입금자명)·비회원 조회 비밀값이 로그, URL, 분석 이벤트, SharedPreferences/localStorage에 들어가지 않는다. + - 환경값은 앱 `app/env.dart`, 웹 `app/env.ts`에서만 읽는다. 경로 문자열은 `AppRoutes`/`routes.ts`에만. + - 역할별로 서버가 제한한 필드만 쓰고, 화면에서 더 보여주지 않는다(현장 담당자는 연락처 뒤 4자리만 등). + - 외부 링크는 브라우저로, 외부 앱 scheme은 허용 목록으로. bridge는 `shared/bridge` 한 곳. +- 왜: 한 번 새면 되돌릴 수 없는 것들. 사람마다 다르게 다루면 반드시 한 곳이 뚫린다. +- 확인: `grep -rn "print(\|debugPrint(\|console.log(" <변경 파일>`로 로그 줄을 보고 무엇을 찍는지 확인. URL 만드는 코드가 있으면 쿼리에 무엇이 들어가는지 본다. + +### A10. 테스트 + +- 본다: + - 위치: 앱은 `test/`에 `lib/`와 같은 경로, 웹은 파일 옆 `*.test.tsx`. + - ViewModel은 로딩·성공·실패·중복 실행 4케이스, View는 로딩·빈·실패·정상 4케이스(해당하는 것만). + - 테스트가 **실패할 수 있다**: assert를 반대로 바꾸면 빨개진다. mock이 테스트 대상까지 대신하지 않는다. + - 문구를 고정하지 않는다(`find.text('로그인')` 대신 `find.byType`·`byKey`·역할). 고정 `sleep`·`pump(Duration)`으로 성공을 기다리지 않는다. + - 생성 파일(`*.g.dart`)은 테스트하지 않는다. +- 왜: 테스트는 "같은 동작"의 증거다. 문구 테스트는 디자인 변경마다 깨져서 결국 아무도 안 믿게 된다. +- 확인: 새 테스트 파일 하나를 골라 assert 하나를 뒤집고 돌려본다. 통과하면 그 테스트는 아무것도 지키지 않는다. + +### A11. 생성 파일·의존성 + +- 본다: 모델을 바꿨으면 `build_runner`를 돌렸고 `*.freezed.dart`·`*.g.dart`가 같이 커밋됐다. `pubspec.yaml`/`package.json`을 바꿨으면 lock 파일이 같이 있다. 메이저 버전·SDK 제약 변경은 PR 본문 "호환성"에 적고 사전 공유했다. +- 왜: 생성 파일이 빠지면 상대 환경에서만 빌드가 깨진다. 의존성은 두 사람 환경이 같아야 "내 컴퓨터에선 되는데"가 없다. +- 확인: `git status`가 깨끗한 상태에서 `fvm dart run build_runner build --delete-conflicting-outputs`를 다시 돌려 diff가 없는지 본다. + +### A12. 수동 확인 + +- 본다: 수락 기준 시나리오를 실제로 한 번 돌렸다. 앱은 바꾼 플랫폼 캡처, 웹은 모바일 폭 캡처. 아래 중 해당하는 것: + - 앱: 뒤로가기, 딥링크로 직접 진입, 회전·다크 모드(지원 시), 앱 재실행 후 세션 복원 + - 웹: 새로고침, 뒤로가기, 일반 브라우저와 앱 WebView 둘 다, bridge 없는 환경에서 깨지지 않음 + - 권한이 필요한 기능: 거부 → 설정으로 안내 → 복귀 +- 왜: 자동 검증은 코드가 "맞는지"를 보고, 수동 확인은 "쓸 만한지"를 본다. 둘 다 있어야 한다. +- 확인: PR 본문 "검증"에 기기·시나리오·결과를 한 줄씩 적는다. 캡처 없는 UI 변경은 리뷰어가 돌려보낸다. + +### A13. 사전 공유 + +- 본다: DI 등록, 공유 모델, 라우팅, 네이티브 설정, bridge, 디자인 토큰, `pubspec.yaml`/`package.json` 중 하나라도 바꿨으면 PR 전에 상대에게 한 줄 알렸다. +- 왜: 이 일곱 가지는 상대의 작업과 충돌하거나 상대가 모르면 깨진다. +- 확인: PR 본문 "호환성·주의"에 알린 날짜/채널을 적는다. + +## B. 리뷰어 체크 (읽는 순서) + +리뷰는 파일 목록 순서가 아니라 **동작 순서**로 읽는다. 작성자가 PR 본문 "리뷰 순서"에 경로를 적어 두면 그대로 따라간다. + +| 순서 | 읽는 것 | 보는 것 | 근거 | +| --- | --- | --- | --- | +| B1 진입점 | `router.dart`/`router.tsx`, 버튼 `onPressed` | 어떤 메서드로 들어가는가. 경로가 상수인가 | A3, A9 | +| B2 상태·요청 | ViewModel, Repository, Service | 상태가 알맞은 범위에 있는가(로컬/화면/ID별/공통). 요청은 Service에만, 변환은 Repository에만 | A3, A4 | +| B3 실패 방어 | 같은 파일들 | 4종 UI, 중복 실행, 늦은 응답, 오류 매핑, 일시 오류로 로그아웃하지 않음 | A4, A5 | +| B4 테스트 | `test/`·`*.test.tsx` | 무엇을 지키는가, 빠진 케이스, 뒤집으면 실패하는가 | A10 | +| B5 일관성 | 캡처, 기존 비슷한 화면 | 기존 목록·상세 화면과 여백·카드·빈 화면·문구 톤이 같은가. 토큰 grep 결과 | A6, A7, A8 | +| B6 범위 | diff 전체 | PR이 Task 하나인가. 관계없는 리팩터링·포맷 변경이 섞였나 | A1 | + +리뷰 코멘트 규칙: + +- `[must]` 머지 전 고쳐야 함 / `[nit]` 고치면 좋지만 머지를 막지 않음. 접두사를 붙인다. +- 근거는 이 문서나 구조 문서의 절 번호로 쓴다("A5: 실패 화면 없음"). 취향이면 `[nit]`로 쓰고 근거를 요구하지 않는다. +- 설계가 갈리면 댓글 왕복 3회 안에 통화한다. 결론을 PR에 한 줄 남긴다. +- 승인 뒤 `[nit]`만 남았으면 작성자가 고치고 바로 머지한다. + +## C. 머지 뒤 + +- squash 커밋 제목이 PR 제목과 같은지 본다. +- 공통 변경(A13)이었으면 상대가 `develop`을 당겨 받았는지 확인한다. +- 배포에 들어갔으면 `docs/releases.md`에 한 줄(소스 커밋·검증·patch 번호). + +## D. 자동화로 옮길 것 (CI·린트가 생기면) + +사람이 보는 항목을 줄이는 순서. 위에서부터 효과가 크다. + +| 항목 | 지금 | 옮길 곳 | +| --- | --- | --- | +| A2 자동 검증 | 각자 로컬 | GitHub Actions PR 검사 (앱 Linux runner, 웹 Linux runner) | +| A3 의존성 방향 (웹) | grep | ESLint `no-restricted-imports`로 `features → app`, 기능 간 내부 import 차단 | +| A3 의존성 방향 (앱) | grep | `custom_lint` 규칙 또는 `import_lint` 패키지 | +| A6 토큰 (웹) | grep | stylelint `declaration-property-value-disallowed-list`로 hex·px 차단(예외 목록 포함) | +| A6 토큰 (앱) | grep | `custom_lint` 규칙 (`Color(0x`, `Colors.` 금지 in features) | +| A11 생성 파일 | 손으로 재실행 | CI에서 `build_runner` 돌린 뒤 `git diff --exit-code` | +| A1 형식 | 눈 | commitlint / PR 제목 정규식 검사 | + +## E. 팀이 아직 정해야 하는 것 + +이 문서의 항목 중 아래는 값이 비어 있다. 정해지면 해당 항목에 적는다. + +- 문구 톤: 존댓말("~해요" / "~합니다"), 마침표 사용, 느낌표 금지 여부 +- 용어집: 공연·행사, 예매·예약, 신청·지원, 밴드·팀, 공연장·장소 — 각각 하나로 +- 오류 문구 사전: 네트워크·인증 만료·서버 오류·찾을 수 없음 네 가지의 표준 문구 +- 공통 위젯 1차 목록: Button, TextField, LoadingView, EmptyView, ErrorView, Card — 언제 만들지 +- 캡처 기준 기기: iOS 시뮬레이터 모델, Android 에뮬레이터 API, 웹 폭(예: 390px) diff --git a/docs/workflow.md b/docs/workflow.md index e4bae00..2b0ebb4 100644 --- a/docs/workflow.md +++ b/docs/workflow.md @@ -77,13 +77,15 @@ pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build ``` - 하나라도 실패한 채로 PR을 올리지 않는다. CI가 생기면 같은 명령을 돌린다. +- 명령 통과는 시작일 뿐이다. 구조·명령 처리·화면 상태·토큰·문구·데이터·테스트는 [pr-checklist.md A절](./pr-checklist.md#a-작성자-체크-pr-올리기-전)로 한 번 더 본다. - 화면을 바꿨으면 캡처(앱: 바꾼 플랫폼, 웹: 모바일 폭)를 PR에 넣는다. - 경로에 한글이 있으면 `flutter analyze`가 크래시한다(analysis server 버그). 영문 경로에 복사해서 돌린다. ## 5. 리뷰 - 리뷰어는 상대 1명. 하루 안에 첫 응답. -- 읽는 순서: 진입점(라우트·버튼) → 상태·요청 → 실패 방어(중복 실행·오류·빈 결과·늦은 응답) → 테스트. PR 본문에 이 순서로 읽을 파일을 적는다. +- 읽는 순서: 진입점(라우트·버튼) → 상태·요청 → 실패 방어(중복 실행·오류·빈 결과·늦은 응답) → 테스트 → 일관성 → 범위. PR 본문에 이 순서로 읽을 파일을 적는다. 각 단계에서 무엇을 보는지는 [pr-checklist.md B절](./pr-checklist.md#b-리뷰어-체크-읽는-순서). +- 코멘트는 `[must]`(머지 전 수정) / `[nit]`(막지 않음) 접두사와 근거 절 번호를 붙인다. - 사전 공유가 필요한 변경: DI 등록, 공유 모델, 라우팅, 네이티브 설정, bridge, 디자인 토큰, `pubspec.yaml`·`package.json`. PR 전에 메시지로 한 줄 알린다. - "승인 + 사소한 수정"은 작성자가 고치고 바로 머지한다. 설계가 갈리면 PR 댓글로 길게 가지 말고 짧게 통화한 뒤 결론을 PR에 적는다. From 0b1b6c19416962365e5ce1514e6f9b6c639c11c0 Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 22:55:48 +0900 Subject: [PATCH 07/23] =?UTF-8?q?docs:=20=EA=B7=B8=EB=A6=BC=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=B4=EB=8A=94=20=EC=A0=84=EC=B2=B4=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=20=EB=AC=B8=EC=84=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 처음 읽는 사람이 저장소·앱·웹 구조, 데이터 흐름, 토큰, 작업 순서, PR 검사 논리를 한 문서에서 그림으로 따라갈 수 있게 한다. 다이어그램은 GitHub·VS Code·Obsidian에서 그대로 보이는 Mermaid로 둔다. --- AGENTS.md | 1 + README.md | 2 +- docs/overview.md | 401 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 403 insertions(+), 1 deletion(-) create mode 100644 docs/overview.md diff --git a/AGENTS.md b/AGENTS.md index 039fbec..277d630 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,6 +4,7 @@ | 알고 싶은 것 | 문서 | | --- | --- | +| 전체를 그림으로 한 번에 (처음 읽을 때) | [docs/overview.md](./docs/overview.md) | | 일을 어떤 순서로 하나 (Jira → 브랜치 → 구현 순서 → 검증 → PR → 리뷰 → 릴리스) | [docs/workflow.md](./docs/workflow.md) | | 앱 폴더에 어떤 파일이 들어가고 누가 누구를 import하나 | [docs/mobile-architecture.md](./docs/mobile-architecture.md) | | 웹 폴더 구조·의존성·bridge·환경 | [docs/web-architecture.md](./docs/web-architecture.md) | diff --git a/README.md b/README.md index df33e3c..dbf3686 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ apps/web 공개 웹·관객용 모바일 웹 (Node 24, pnpm) docs/ 작업 흐름·구조·디자인 토큰 규칙 ``` -작업 규칙은 [AGENTS.md](./AGENTS.md)에서 시작한다. +처음이면 [docs/overview.md](./docs/overview.md)(그림으로 보는 전체 구조)부터, 작업 규칙은 [AGENTS.md](./AGENTS.md)에서 시작한다. ## 앱 실행 diff --git a/docs/overview.md b/docs/overview.md new file mode 100644 index 0000000..1c6d7cb --- /dev/null +++ b/docs/overview.md @@ -0,0 +1,401 @@ +# 한눈에 보는 highfive 클라이언트 + +지금 저장소에 만들어진 것을 그림으로 설명한다. 규칙의 근거와 세부는 각 절 끝의 문서를 본다. +그림은 Mermaid라서 GitHub, VS Code(Markdown Preview Mermaid Support 확장), Obsidian에서 그대로 보인다. + +## 1. 저장소 지도 + +```mermaid +flowchart LR + repo["highfive-5th-Client"] + repo --> mobile["apps/mobile
Flutter 3.47.9 · fvm"] + repo --> web["apps/web
React 19 · TypeScript · Vite 8 · pnpm"] + repo --> docs["docs/
규칙 문서"] + repo --> gh[".github/
PR 템플릿"] + repo --> agents["AGENTS.md
항상 지킬 것 + 문서 지도"] +``` + +| 폴더 | 들어 있는 것 | 명령 실행 위치 | +| --- | --- | --- | +| `apps/mobile` | Flutter 앱. 로그인·공연·신청·채팅·티켓·QR | `cd apps/mobile && fvm flutter ...` | +| `apps/web` | 공개 웹(이벤트·공지·FAQ) + 관객용 모바일 웹(예정) | `cd apps/web && pnpm ...` | +| `docs` | 작업 흐름, 앱·웹 구조, 디자인 토큰, PR 체크리스트 | - | +| `.github` | PR 템플릿. CI는 아직 없음 | - | + +## 2. 전체 그림: 누가 누구와 통신하나 + +```mermaid +flowchart LR + user["관객 · 밴드 · 주최자"] + subgraph client["이 저장소"] + app["Flutter 앱
로그인 · 공연 · 신청 · 채팅 · 티켓 · QR"] + web["모바일 웹
이벤트 · 공지 · FAQ · (예정) 비로그인 예매"] + end + be["BE API
BE 팀 담당"] + user --> app + user -->|"공유 링크 · QR"| web + app -->|"WebView + bridge
명령과 ID만"| web + app -->|"HTTPS · Dio"| be + web -->|"HTTPS · fetch"| be +``` + +- 앱과 웹은 서로 데이터를 직접 주고받지 않는다. 웹은 "이 공연으로 이동해" 같은 **명령과 ID만** bridge로 앱에 보내고, 앱이 라우팅한다. +- 권한·재고·가격·마감은 항상 BE가 판단한다. 앱·웹은 받은 결과를 보여주기만 한다. +- 앱 세션 토큰은 웹 URL에 절대 넣지 않는다. + +## 3. 앱 구조 + +### 3-1. 폴더와 역할 + +``` +lib/ +├── main.dart 앱 시작: 환경 결정 → DI 등록 → 화면 +├── app/ 앱 전체를 묶는 것. app.dart · di.dart · env.dart · providers.dart · router.dart +├── core/ 기술 기반 (통신·저장·DI 컨테이너). 공연·예매 같은 단어를 모른다 +├── shared/ 공통 UI (디자인 토큰·공통 위젯). 역시 도메인을 모른다 +└── features/<기능>/ 한 기능의 모델·데이터·화면이 전부 여기 + ├── models/ 도메인 모델 (freezed) + ├── data/ dto · services · repositories + └── presentation/ providers · view_models · views · widgets +``` + +지금 있는 기능은 `auth`(로그인 화면 자리)뿐이다. 나머지 8개(`bands` `performances` `recruitments` `venues` `ticketing` `payments` `settlements` `chat`)는 실제로 만들 때 생긴다. + +### 3-2. import 방향 — 화살표 방향으로만 갈 수 있다 + +```mermaid +flowchart TB + main["main.dart"] --> app + subgraph app["app/ — 묶기"] + direction LR + a1["app.dart"] ~~~ a2["di.dart"] ~~~ a3["env.dart"] ~~~ a4["router.dart"] ~~~ a5["providers.dart"] + end + subgraph features["features/ — 기능"] + direction LR + f1["auth"] ~~~ f2["performances"] ~~~ f3["ticketing"] ~~~ f4["..."] + end + subgraph lower[" "] + direction LR + subgraph core["core/ — 기술 기반"] + direction LR + c1["di/locator.dart"] ~~~ c2["network/"] ~~~ c3["storage/ (예정)"] + end + subgraph shared["shared/ — 공통 UI"] + direction LR + s1["theme/ (토큰)"] ~~~ s2["widgets/ (예정)"] + end + end + app --> features + features --> lower + app --> lower + shared -.->|"드물게"| core +``` + +| 할 수 있다 | 할 수 없다 | +| --- | --- | +| `app` → 모든 곳 | `features` → `app` (순환이 생기고, 기능이 앱 설정에 기대게 됨) | +| `features` → 같은 기능 안, `core`, `shared` | `features/A` → `features/B`의 `presentation/` (화면·ViewModel·위젯) | +| `features/A` → `features/B`의 `data/repositories`, `models` (명시적 계약) | `core` → 어디든 (core는 맨 아래) | +| `shared` → 드물게 `core` | `shared` → `features`, `app` | + +왜 이렇게 하나: **아래층이 위층을 모르면 아래층만 따로 테스트하고 바꿀 수 있다.** `getIt`을 `core/di/locator.dart`에 둔 이유도 features가 `app`을 import하지 않고 연결 Provider를 만들게 하려는 것이다. + +### 3-3. 기능 하나의 안쪽 + +```mermaid +flowchart TB + subgraph pres["presentation/"] + views["views/
화면 하나 = Scaffold 하나"] + widgets["widgets/
이 기능 전용 조각"] + vm["view_models/
Notifier · AsyncNotifier"] + prov["providers/
getIt → Riverpod 연결"] + end + subgraph data["data/"] + repo["repositories/
DTO→모델 · 캐시 · 저장"] + svc["services/
Dio 호출만"] + dto["dto/
서버 응답 모양"] + end + models["models/
도메인 모델 (freezed)"] + views --> widgets + views --> vm + vm --> prov + prov --> repo + vm --> repo + repo --> svc + svc --> dto + dto -->|"toModel()"| models + repo --> models + views --> models +``` + +| 층 | 한다 | 하지 않는다 | +| --- | --- | --- | +| View | 표시, 입력, 화면 이동, ViewModel 메서드 호출 | HTTP 호출, 비즈니스 판단 | +| ViewModel | 상태 보유, 사용자 명령, 중복 실행 방지 | 위젯·BuildContext 사용, getIt 조회 | +| Repository | DTO→모델, 메모리 캐시, 저장소 읽기·쓰기 | 위젯·Riverpod 의존 | +| Service | Dio·SDK 호출, DTO 반환 | 모델 변환, 캐시 | + +### 3-4. 데이터가 흐르는 순서 — 공연 상세를 열 때 + +```mermaid +sequenceDiagram + actor U as 사용자 + participant V as View + participant VM as ViewModel + participant R as Repository + participant S as Service + participant BE as 서버 + U->>V: 공연 카드 탭 + V->>VM: watch(performanceDetailProvider(id)) + Note over V: 그동안 AsyncLoading → LoadingView + VM->>R: get(id) + R->>S: fetch(id) + S->>BE: GET /performances/{id} + BE-->>S: JSON + S-->>R: PerformanceDto + R-->>VM: Performance (모델, 캐시에 저장) + VM-->>V: AsyncData(Performance) + V-->>U: 상세 화면 + Note over S,V: 실패하면 AppException → AsyncError → ErrorView(재시도) +``` + +### 3-5. 쓰기 명령 — 두 번 눌러도 한 번만 간다 + +```mermaid +sequenceDiagram + actor U as 사용자 + participant V as View + participant VM as ViewModel + participant R as Repository + participant BE as 서버 + U->>V: 예매하기 탭 + V->>VM: reserve() + alt 이미 진행 중 (state.isLoading) + VM-->>V: 무시 + else 처음 호출 + VM->>VM: state = AsyncLoading + VM->>R: reserve(요청, 멱등성 키) + R->>BE: POST /reservations + BE-->>R: 결과 + R-->>VM: Reservation + VM-->>V: AsyncData → 완료 화면 + end + U->>V: 연타 + V->>VM: reserve() + VM-->>V: 무시 (아직 로딩 중) +``` + +- 쓰기 명령은 Provider가 만들어질 때(`build()`)가 아니라 **버튼 → ViewModel 메서드**로만 실행한다. +- 타임아웃은 실패 확정이 아니다. 같은 멱등성 키로 결과를 먼저 조회한다. + +### 3-6. 앱이 켜질 때 + +```mermaid +flowchart TB + m["main()"] --> e["AppEnv.fromEnvironment()
--dart-define=FLAVOR 읽기"] + e --> d["setupDi(env)
Dio · SecureStorage · Prefs 등록"] + d --> p["ProviderScope"] + p --> a["HighfiveApp
테마 · 라우터 · dev면 DEV 배너"] + a --> r["routerProvider → /login"] + r --> l["LoginView (자리만 있음)"] +``` + +### 3-7. 상태는 어디에 두나 + +| 이런 상태는 | 여기에 | 예 | +| --- | --- | --- | +| 입력 중인 값 | 위젯 로컬 | 로그인 폼, 검색어 | +| 화면 하나의 비동기 결과 | `AsyncNotifier` (autoDispose) | 공연 상세 로딩·실패 | +| ID마다 다른 것 | `.family` | 공연 ID별 상세 | +| 앱 어디서나 | keepAlive Provider | 로그인 세션 | +| 서버에서 받은 데이터 캐시 | Repository 메모리 | 공연 목록 | +| 앱을 껐다 켜도 남아야 하는 것 | 인증은 SecureStorage, 설정은 Prefs | 토큰, 마지막 본 탭 | + +자세히: [mobile-architecture.md](./mobile-architecture.md) + +## 4. 웹 구조 + +### 4-1. import 방향 + +```mermaid +flowchart TB + main["main.tsx"] --> app + subgraph app["app/ — 묶기"] + direction LR + env["env.ts
VITE_* 읽기·검증"] ~~~ routes["routes.ts
경로 상수"] ~~~ router["router.tsx"] + end + subgraph features["features/ — 기능"] + direction LR + notices["notices/
api · hooks · components · pages"] ~~~ more["..."] + end + subgraph shared["shared/ — 공통"] + direction LR + styles["styles/
tokens.css · global.css"] ~~~ api["api/http.ts"] ~~~ bridge["bridge/ (예정)"] ~~~ ui["ui/ (예정)"] + end + app --> features + features --> shared + app --> shared +``` + +앱과 같은 원칙이다. 차이는 `features`가 `app/routes.ts` 하나만 import할 수 있다는 것(링크를 만들려면 경로 상수가 필요한데, `routes.ts`는 아무것도 import하지 않아 순환이 없다). + +### 4-2. 지금 라우트와 환경 + +```mermaid +flowchart LR + slash["/"] -->|"redirect"| notices["/notices
NoticeListPage (자리만)"] +``` + +| 파일 | 값 | 쓰이는 때 | +| --- | --- | --- | +| `.env` | `VITE_FLAVOR=dev`, dev API 주소 | `pnpm dev`, `pnpm build:dev` | +| `.env.production` | `VITE_FLAVOR=prod`, prod API 주소 | `pnpm build` | + +`VITE_*`는 번들에 그대로 들어가므로 비밀값을 넣지 않는다. 환경값은 `app/env.ts`로만 읽는다. + +자세히: [web-architecture.md](./web-architecture.md) + +## 5. 디자인 토큰이 흐르는 길 + +```mermaid +flowchart LR + figma["Figma 변수
(디자인 확정 후)"] --> doc["docs/design-tokens.md
기준 표 (단일 출처)"] + doc --> dart["앱 토큰 파일
lib/shared/theme/app_*.dart"] + doc --> css["웹 토큰 파일
src/shared/styles/tokens.css"] + dart --> theme["app_theme.dart
ThemeData로 묶기"] + theme --> w["위젯
context.colors · AppSpacing · textTheme"] + css --> comp["컴포넌트 CSS
var(--color-*) · var(--space-*)"] +``` + +두 단계로 나눈 이유: + +```mermaid +flowchart LR + subgraph prim["원시 토큰 — 토큰 파일 안에서만"] + b500["brand.500"] + b600["brand.600"] + g200["gray.200"] + end + subgraph sem["의미 토큰 — 화면 코드가 쓰는 것"] + primary["color.primary"] + pressed["color.primaryPressed"] + border["color.border"] + end + b500 --> primary --> btn["주 버튼 배경"] + b600 --> pressed --> btn2["눌림 상태"] + g200 --> border --> card["카드 테두리"] +``` + +디자인이 바뀌면 **의미 토큰이 가리키는 원시 값만** 바꾼다. 화면 코드는 그대로다. 앱·웹 파일과 문서는 항상 한 PR에서 같이 바뀐다. + +자세히: [design-tokens.md](./design-tokens.md) + +## 6. 일하는 순서 + +### 6-1. 브랜치 + +```mermaid +gitGraph + commit id: "초기 세팅" + branch develop + checkout develop + commit id: "develop 생성" + branch feat-JECT-123-login + checkout feat-JECT-123-login + commit id: "모델·DTO" + commit id: "ViewModel·View" + checkout develop + merge feat-JECT-123-login id: "squash: [JECT-123] 로그인" + checkout main + merge develop id: "릴리스 (merge 커밋)" +``` + +- 기능 브랜치 → `develop`은 squash, `develop` → `main`은 이력을 남기는 merge. +- `develop`은 아직 없다. 첫 기능 작업 전에 만든다. + +### 6-2. 기능 하나를 만드는 순서 — 아래층부터 + +```mermaid +flowchart TB + c["1 계약 확인 — docs/api"] --> m["2 모델 — models/"] + m --> d["3 DTO · Service — data/"] + d --> r["4 Repository — 변환 · 캐시"] + r --> v["5 Provider · ViewModel — 상태"] + v --> ui["6 View · widgets — 화면"] + ui --> rt["7 라우트 등록"] + rt --> q["8 수동 확인 · 캡처"] +``` + +각 단계마다 "끝나는 기준"이 있다(DTO는 `fromJson` 테스트, ViewModel은 로딩·성공·실패·중복 4케이스 등). 아래층이 먼저 있어야 위층을 테스트할 수 있어서 이 순서다. + +### 6-3. PR이 머지되기까지 + +```mermaid +flowchart TB + impl["구현 끝"] --> local["로컬 검증
format · analyze/lint · test · (웹) build"] + local -->|"실패"| impl + local -->|"통과"| self["작성자 체크 A1~A13
docs/pr-checklist.md"] + self --> pr["PR 생성
템플릿: 변경 · 검증 · 캡처 · 호환성 · 리뷰 순서 · 새 문구"] + pr --> share{"공통 변경?"} + share -->|"예"| notify["상대에게 한 줄 사전 공유
DI · 모델 · 라우팅 · 네이티브 · bridge · 토큰 · 의존성"] + notify --> review + share -->|"아니오"| review["리뷰 B1→B6
진입점 → 상태·요청 → 실패 방어 → 테스트 → 일관성 → 범위"] + review -->|"must 있음"| impl + review -->|"승인"| merge["squash → develop"] +``` + +자세히: [workflow.md](./workflow.md), [pr-checklist.md](./pr-checklist.md) + +## 7. "누가 만들어도 같은 느낌"은 어떻게 지키나 + +느낌을 검사 가능한 항목으로 바꾸고, 사람이 보던 항목을 차례로 자동화로 옮긴다. + +```mermaid +flowchart LR + subgraph feel["사용자가 느끼는 것"] + f1["화면 리듬이 같다"] + f2["기다리는 · 실패 모양이 같다"] + f3["두 번 눌러도 사고 없음"] + f4["문구 톤이 같다"] + end + subgraph check["PR 체크 항목 (사람)"] + a6["A6 토큰만 사용"] + a5["A5 화면 상태 4종"] + a7["A7 공통 위젯 재사용"] + a4["A4 명령 처리"] + a8["A8 문구 규칙"] + end + subgraph auto["자동화 (예정)"] + l1["stylelint · custom_lint"] + l2["GitHub Actions"] + l3["ESLint no-restricted-imports"] + end + f1 --> a6 --> l1 + f2 --> a5 --> l2 + f2 --> a7 + f3 --> a4 --> l2 + f4 --> a8 + a6 --> l3 +``` + +운영 규칙: 같은 지적이 PR에서 **2번** 나오면 체크 항목으로 올리고, **3번** 나오면 린트·테스트·공통 위젯으로 옮긴다. 체크리스트는 길어지지 않고 자동화만 늘어난다. + +## 8. 아직 없는 것 — 다음에 할 일 + +| 영역 | 없는 것 | 언제 | +| --- | --- | --- | +| 앱 | 네이티브 flavor(앱 ID·이름 분리), `shared/widgets`(Loading·Error·Empty), `core/error`, 토큰 갱신·세션 복원 | 첫 기능(로그인) 만들 때 | +| 웹 | `shared/ui`, `shared/bridge`, 서버 데이터 라이브러리 결정, 호스팅 | 첫 API 연동 때 | +| 배포 | Shorebird, Fastlane, GitHub Actions | CI 세팅 작업 | +| 팀 합의 | `develop` 브랜치, 문구 톤·용어집, 공통 위젯 1차 목록, 캡처 기준 기기 | 첫 PR 전 | + +## 9. 문서 지도 + +| 알고 싶은 것 | 문서 | +| --- | --- | +| 항상 지킬 것 (짧게) | [AGENTS.md](../AGENTS.md) | +| 일하는 순서 | [workflow.md](./workflow.md) | +| 앱 폴더·의존성·금지 | [mobile-architecture.md](./mobile-architecture.md) | +| 웹 폴더·의존성·bridge·환경 | [web-architecture.md](./web-architecture.md) | +| 색·간격·글자 크기 값 | [design-tokens.md](./design-tokens.md) | +| PR 체크 항목과 그 이유 | [pr-checklist.md](./pr-checklist.md) | From ec71c73370e9581001a89def778ccca42f5e96d6 Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 23:16:37 +0900 Subject: [PATCH 08/23] =?UTF-8?q?fix:=20=EC=9B=B9=20env=EB=A5=BC=20shared/?= =?UTF-8?q?config=EB=A1=9C=20=EC=98=AE=EA=B8=B0=EA=B3=A0=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=20=EC=8B=9C=20=ED=99=98=EA=B2=BD=EA=B0=92=EC=9D=84=20?= =?UTF-8?q?=EA=B2=80=EC=82=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 리뷰에서 shared/api/http.ts가 app/env를 import해 문서의 shared→app 금지 규칙을 뼈대 스스로 어기는 것이 확인됐다. env는 아무것도 import하지 않으므로 shared/config로 내린다. 잘못된 VITE_FLAVOR로도 빌드가 성공해 빈 화면이 배포될 수 있어 vite.config.ts에서 먼저 거른다. HTTP 래퍼는 빈 본문·HTML 오류 응답에서도 HttpError를 유지하게 하고, Dio 디버그 로그는 본문을 기본으로 남기지 않는다. --- .gitignore | 1 + apps/mobile/lib/core/network/dio_client.dart | 10 +++------- apps/web/src/main.tsx | 2 +- apps/web/src/shared/api/http.ts | 15 ++++++++++++--- apps/web/src/{app => shared/config}/env.ts | 0 apps/web/vite.config.ts | 20 +++++++++++++++----- 6 files changed, 32 insertions(+), 16 deletions(-) rename apps/web/src/{app => shared/config}/env.ts (100%) diff --git a/.gitignore b/.gitignore index 3a9a139..9546ee9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store .idea/ *.iml +.omo/ diff --git a/apps/mobile/lib/core/network/dio_client.dart b/apps/mobile/lib/core/network/dio_client.dart index cb6e302..f4fdd56 100644 --- a/apps/mobile/lib/core/network/dio_client.dart +++ b/apps/mobile/lib/core/network/dio_client.dart @@ -11,14 +11,10 @@ Dio createDio({required String baseUrl}) { ), ); if (kDebugMode) { - // 헤더에는 토큰이 섞이므로 남기지 않는다. 디버그 실행에서만 켠다. + // 헤더와 본문에는 토큰·개인정보가 섞이므로 기본으로 남기지 않는다. + // 본문이 필요하면 로컬에서만 잠시 켜고 커밋하지 않는다. dio.interceptors.add( - LogInterceptor( - requestHeader: false, - responseHeader: false, - requestBody: true, - responseBody: true, - ), + LogInterceptor(requestHeader: false, responseHeader: false), ); } return dio; diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx index e83e90a..5c12be8 100644 --- a/apps/web/src/main.tsx +++ b/apps/web/src/main.tsx @@ -1,7 +1,7 @@ import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import { RouterProvider } from 'react-router'; -import './app/env'; +import './shared/config/env'; import { router } from './app/router'; import './shared/styles/global.css'; diff --git a/apps/web/src/shared/api/http.ts b/apps/web/src/shared/api/http.ts index 0a6bc1b..314d465 100644 --- a/apps/web/src/shared/api/http.ts +++ b/apps/web/src/shared/api/http.ts @@ -1,4 +1,4 @@ -import { env } from '../../app/env'; +import { env } from '../config/env'; export class HttpError extends Error { public readonly status: number; @@ -12,14 +12,23 @@ export class HttpError extends Error { } } +function parseBody(text: string): unknown { + if (!text) return null; + try { + return JSON.parse(text); + } catch { + return text; + } +} + async function request(path: string, init?: RequestInit): Promise { const res = await fetch(`${env.apiBaseUrl}${path}`, { ...init, headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, }); - const body = await res.json(); + const body = parseBody(await res.text()); if (!res.ok) throw new HttpError(res.status, body); - return body; + return body as T; } export const http = { diff --git a/apps/web/src/app/env.ts b/apps/web/src/shared/config/env.ts similarity index 100% rename from apps/web/src/app/env.ts rename to apps/web/src/shared/config/env.ts diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 183a58e..61df0a4 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -1,10 +1,20 @@ /// import react from '@vitejs/plugin-react'; -import { defineConfig } from 'vite'; +import { defineConfig, loadEnv } from 'vite'; -// https://vite.dev/config/ -export default defineConfig({ - plugins: [react()], - test: { environment: 'jsdom' }, +const flavors = ['dev', 'prod']; + +export default defineConfig(({ mode }) => { + const env = loadEnv(mode, process.cwd(), 'VITE_'); + if (!flavors.includes(env.VITE_FLAVOR)) { + throw new Error(`VITE_FLAVOR must be one of ${flavors.join(', ')} (mode: ${mode})`); + } + if (!env.VITE_API_BASE_URL?.trim()) { + throw new Error('VITE_API_BASE_URL must not be empty'); + } + return { + plugins: [react()], + test: { environment: 'jsdom' }, + }; }); From e24e5e3ca269190b9d378ea6fc280ce6ab251eda Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 23:16:37 +0900 Subject: [PATCH 09/23] =?UTF-8?q?docs:=20squash=20=EC=A0=9C=EB=AA=A9=20?= =?UTF-8?q?=EA=B7=9C=EC=B9=99=EA=B3=BC=20getIt=20=EC=9C=84=EC=B9=98=C2=B7?= =?UTF-8?q?=ED=86=A0=ED=81=B0=20=EC=98=88=EC=99=B8=C2=B7=EC=82=AC=EC=A0=84?= =?UTF-8?q?=20=EA=B3=B5=EC=9C=A0=20=EC=88=9C=EC=84=9C=20=EC=A0=95=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit squash 커밋 제목을 PR 제목과 같게 하라는 체크 항목이 커밋 규칙과 충돌했다. app/providers.dart의 전역 연결 Provider, 토큰이 아닌 값의 범위, 사전 공유가 PR 전이라는 순서, env 파일 위치를 코드와 맞춘다. --- AGENTS.md | 6 +++--- docs/design-tokens.md | 4 +++- docs/mobile-architecture.md | 2 +- docs/overview.md | 18 +++++++++--------- docs/pr-checklist.md | 4 ++-- docs/web-architecture.md | 7 ++++--- docs/workflow.md | 4 ++-- 7 files changed, 24 insertions(+), 21 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 277d630..9c9e461 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -48,7 +48,7 @@ PR 전에 포맷·분석·테스트(웹은 빌드까지)가 전부 통과해야 앱 계층 - View는 표시·입력·이동만, ViewModel(Riverpod Notifier/AsyncNotifier)은 상태·명령, Repository는 변환·캐시·저장, Service는 HTTP·SDK 호출만. -- `getIt`은 `app/di.dart`(등록)와 `presentation/providers/`(연결 Provider)에서만. ViewModel은 get_it에 등록하지 않는다. +- `getIt`은 `app/di.dart`(등록), `app/providers.dart`(앱 전역 연결 Provider), `presentation/providers/`(기능 연결 Provider)에서만. ViewModel은 get_it에 등록하지 않는다. - 신청·예매·결제 같은 쓰기 명령은 Provider `build()`가 아니라 버튼 → ViewModel 메서드로 실행하고 중복 실행을 막는다. 권한·재고·가격은 서버가 최종 판단한다. - 로그아웃·계정 전환 시 세션·Repository 캐시·소켓·보안 저장소를 정리하고 이전 세션의 늦은 응답은 버린다. - 인증 정보는 `FlutterSecureStorage`에만. 토큰을 SharedPreferences·로그·URL·분석 이벤트에 넣지 않는다. @@ -60,7 +60,7 @@ PR 전에 포맷·분석·테스트(웹은 빌드까지)가 전부 통과해야 코드·테스트 - 모델은 freezed + json_serializable. `*.g.dart`·`*.freezed.dart`는 직접 수정하지 않고 생성 파일도 커밋한다. -- 환경값은 앱 `app/env.dart`, 웹 `app/env.ts`에서만 읽는다. 라우트 경로는 앱 `AppRoutes`, 웹 `routes.ts`에만. +- 환경값은 앱 `app/env.dart`, 웹 `shared/config/env.ts`에서만 읽는다. 라우트 경로는 앱 `AppRoutes`, 웹 `routes.ts`에만. - 테스트는 앱은 `test/`에 `lib/`와 같은 경로, 웹은 파일 옆 `*.test.tsx`. 연결 Provider를 바꿔 끼우고 전역 getIt에 기대지 않는다. 문구를 고정하는 테스트, 고정 sleep으로 기다리는 테스트는 만들지 않는다. - `any`, `// ignore:`, `eslint-disable`로 오류를 숨기지 않는다. @@ -71,7 +71,7 @@ PR 전에 포맷·분석·테스트(웹은 빌드까지)가 전부 통과해야 | 브랜치 | `feat/JECT-123-login`, `fix/JECT-124-login-error` (type: feat / fix / chore / refactor / docs) | | 커밋 | `feat(JECT-123): 로그인 기능 구현`. 본문은 "왜"만, 파일 나열 금지 | | PR | `[JECT-123] 로그인 기능 구현`. 본문은 `.github/PULL_REQUEST_TEMPLATE.md`, 체크 항목은 `docs/pr-checklist.md` | -| 기능 머지 | 기능 브랜치 → `develop`, 상대 1명 리뷰 후 squash | +| 기능 머지 | 기능 브랜치 → `develop`, 상대 1명 리뷰 후 squash. squash 커밋 제목은 커밋 규칙으로 고친다 | | 릴리스 | `develop` → `main`, 이력 유지하는 merge | | 긴급 수정 | `main`에서 fix 브랜치 → PR로 main 반영 → develop에도 반영 | | 사전 공유 | DI·공유 모델·라우팅·네이티브·bridge·토큰·pubspec/package.json 변경은 PR 전에 한 줄 알림 | diff --git a/docs/design-tokens.md b/docs/design-tokens.md index 9dfa65c..b68b746 100644 --- a/docs/design-tokens.md +++ b/docs/design-tokens.md @@ -22,7 +22,9 @@ 4. 한 PR에 셋 다 넣고, 바뀐 화면 캡처(앱·웹) 첨부 5. 상대 리뷰 (토큰은 "사전 공유" 대상) -한쪽만 바꾸지 않는다. 새 토큰이 필요하면 먼저 기존 토큰으로 안 되는지 본다. 한 화면에서만 쓰는 값은 토큰이 아니다 — 그 컴포넌트 CSS·위젯에 두되, 두 번째 쓰임이 생기면 토큰으로 올린다. +한쪽만 바꾸지 않는다. 새 토큰이 필요하면 먼저 기존 토큰으로 안 되는지 본다. + +토큰이 아닌 값도 있다: 레이아웃 폭(`max-width`, breakpoint), `1px` 테두리, 진행률 같은 동적 값, 특정 일러스트 크기. 이건 그 컴포넌트 CSS·위젯 안에 두고 그 줄에 짧게 이유를 남긴다. 반대로 **색·간격·모서리·글자 크기는 한 화면용이라도 기존 토큰 단계 중에서 고른다.** 단계에 없는 값이 정말 필요하면 디자이너와 새 단계를 토큰으로 추가한다. 예외가 두 번째 쓰임을 얻으면 토큰으로 올린다. ## 3. 토큰 표 diff --git a/docs/mobile-architecture.md b/docs/mobile-architecture.md index 701e3fa..4262548 100644 --- a/docs/mobile-architecture.md +++ b/docs/mobile-architecture.md @@ -235,7 +235,7 @@ Service(DioException) ─► core/network/api_error_mapper ─► AppException - View에서 Dio·Repository·getIt 직접 호출 - ViewModel에서 `BuildContext`·위젯·`Navigator` 사용 -- `getIt<...>()`을 `app/di.dart`와 `presentation/providers/` 밖에서 호출 +- `getIt<...>()`을 `app/di.dart`, `app/providers.dart`, `presentation/providers/` 밖에서 호출 - ViewModel을 get_it에 등록 - Provider `build()`에서 신청·예매·결제 같은 쓰기 요청 - 다른 기능의 `presentation/` import (View·ViewModel·widgets·providers) diff --git a/docs/overview.md b/docs/overview.md index 1c6d7cb..a0f302b 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -222,7 +222,7 @@ flowchart TB main["main.tsx"] --> app subgraph app["app/ — 묶기"] direction LR - env["env.ts
VITE_* 읽기·검증"] ~~~ routes["routes.ts
경로 상수"] ~~~ router["router.tsx"] + routes["routes.ts
경로 상수"] ~~~ router["router.tsx"] end subgraph features["features/ — 기능"] direction LR @@ -230,7 +230,7 @@ flowchart TB end subgraph shared["shared/ — 공통"] direction LR - styles["styles/
tokens.css · global.css"] ~~~ api["api/http.ts"] ~~~ bridge["bridge/ (예정)"] ~~~ ui["ui/ (예정)"] + config["config/env.ts
VITE_* 읽기·검증"] ~~~ styles["styles/
tokens.css · global.css"] ~~~ api["api/http.ts"] ~~~ bridge["bridge/ (예정)"] ~~~ ui["ui/ (예정)"] end app --> features features --> shared @@ -251,7 +251,7 @@ flowchart LR | `.env` | `VITE_FLAVOR=dev`, dev API 주소 | `pnpm dev`, `pnpm build:dev` | | `.env.production` | `VITE_FLAVOR=prod`, prod API 주소 | `pnpm build` | -`VITE_*`는 번들에 그대로 들어가므로 비밀값을 넣지 않는다. 환경값은 `app/env.ts`로만 읽는다. +`VITE_*`는 번들에 그대로 들어가므로 비밀값을 넣지 않는다. 환경값은 `shared/config/env.ts`로만 읽고, 잘못된 값은 빌드 때(`vite.config.ts`)와 시작 때 두 번 걸린다. 자세히: [web-architecture.md](./web-architecture.md) @@ -305,12 +305,12 @@ gitGraph commit id: "모델·DTO" commit id: "ViewModel·View" checkout develop - merge feat-JECT-123-login id: "squash: [JECT-123] 로그인" + merge feat-JECT-123-login id: "feat(JECT-123): 로그인" checkout main merge develop id: "릴리스 (merge 커밋)" ``` -- 기능 브랜치 → `develop`은 squash, `develop` → `main`은 이력을 남기는 merge. +- 기능 브랜치 → `develop`은 squash(커밋 제목은 `feat(JECT-123): 요약` 규칙으로 고친다), `develop` → `main`은 이력을 남기는 merge. - `develop`은 아직 없다. 첫 기능 작업 전에 만든다. ### 6-2. 기능 하나를 만드는 순서 — 아래층부터 @@ -335,11 +335,11 @@ flowchart TB impl["구현 끝"] --> local["로컬 검증
format · analyze/lint · test · (웹) build"] local -->|"실패"| impl local -->|"통과"| self["작성자 체크 A1~A13
docs/pr-checklist.md"] - self --> pr["PR 생성
템플릿: 변경 · 검증 · 캡처 · 호환성 · 리뷰 순서 · 새 문구"] - pr --> share{"공통 변경?"} + self --> share{"공통 변경?"} share -->|"예"| notify["상대에게 한 줄 사전 공유
DI · 모델 · 라우팅 · 네이티브 · bridge · 토큰 · 의존성"] - notify --> review - share -->|"아니오"| review["리뷰 B1→B6
진입점 → 상태·요청 → 실패 방어 → 테스트 → 일관성 → 범위"] + notify --> pr + share -->|"아니오"| pr["PR 생성
템플릿: 변경 · 검증 · 캡처 · 호환성 · 리뷰 순서 · 새 문구"] + pr --> review["리뷰 B1→B6
진입점 → 상태·요청 → 실패 방어 → 테스트 → 일관성 → 범위"] review -->|"must 있음"| impl review -->|"승인"| merge["squash → develop"] ``` diff --git a/docs/pr-checklist.md b/docs/pr-checklist.md index fab6f44..447d654 100644 --- a/docs/pr-checklist.md +++ b/docs/pr-checklist.md @@ -117,7 +117,7 @@ PR 템플릿(`.github/PULL_REQUEST_TEMPLATE.md`)의 체크박스는 이 문서 - 본다: - 토큰·개인정보(이름·연락처·입금자명)·비회원 조회 비밀값이 로그, URL, 분석 이벤트, SharedPreferences/localStorage에 들어가지 않는다. - - 환경값은 앱 `app/env.dart`, 웹 `app/env.ts`에서만 읽는다. 경로 문자열은 `AppRoutes`/`routes.ts`에만. + - 환경값은 앱 `app/env.dart`, 웹 `shared/config/env.ts`에서만 읽는다. 경로 문자열은 `AppRoutes`/`routes.ts`에만. - 역할별로 서버가 제한한 필드만 쓰고, 화면에서 더 보여주지 않는다(현장 담당자는 연락처 뒤 4자리만 등). - 외부 링크는 브라우저로, 외부 앱 scheme은 허용 목록으로. bridge는 `shared/bridge` 한 곳. - 왜: 한 번 새면 되돌릴 수 없는 것들. 사람마다 다르게 다루면 반드시 한 곳이 뚫린다. @@ -177,7 +177,7 @@ PR 템플릿(`.github/PULL_REQUEST_TEMPLATE.md`)의 체크박스는 이 문서 ## C. 머지 뒤 -- squash 커밋 제목이 PR 제목과 같은지 본다. +- squash 커밋 제목이 커밋 규칙 `type(JECT-123): 요약`인지 본다. GitHub 기본값은 PR 제목(`[JECT-123] 요약`)이므로 머지할 때 고친다. - 공통 변경(A13)이었으면 상대가 `develop`을 당겨 받았는지 확인한다. - 배포에 들어갔으면 `docs/releases.md`에 한 줄(소스 커밋·검증·patch 번호). diff --git a/docs/web-architecture.md b/docs/web-architecture.md index 576aa77..0c41434 100644 --- a/docs/web-architecture.md +++ b/docs/web-architecture.md @@ -11,7 +11,6 @@ src/ ├── vite-env.d.ts (있음) VITE_* 타입 │ ├── app/ 앱 전체를 묶는 것만 -│ ├── env.ts (있음) VITE_FLAVOR, VITE_API_BASE_URL 읽기·검증 │ ├── routes.ts (있음) 경로 문자열 상수. 여기 말고는 경로를 쓰지 않는다 │ ├── router.tsx (있음) appRoutes(RouteObject[]) + createBrowserRouter │ ├── router.test.tsx (있음) @@ -19,6 +18,7 @@ src/ │ └── NotFoundPage.tsx 잘못된 경로 (첫 공개 페이지 만들 때) │ ├── shared/ 도메인을 모르는 공통 코드 +│ ├── config/env.ts (있음) VITE_FLAVOR, VITE_API_BASE_URL 읽기·검증. 아무것도 import하지 않는다 │ ├── styles/ │ │ ├── tokens.css (있음) 디자인 토큰 (CSS 변수) │ │ └── global.css (있음) 리셋, body 기본 @@ -97,7 +97,8 @@ main.tsx ─► app ─► features ─► shared | `.env.production` | prod 값 | `pnpm build` | - `VITE_*`는 번들에 그대로 들어간다. 비밀값을 넣지 않는다. -- 환경값은 `app/env.ts`로만 읽는다. `import.meta.env`를 다른 파일에서 직접 쓰지 않는다. 잘못된 값이면 시작 시 바로 실패한다. +- 환경값은 `shared/config/env.ts`로만 읽는다. `import.meta.env`를 다른 파일에서 직접 쓰지 않는다. `shared`에 두는 이유: `shared/api`가 쓰는데 `shared`는 `app`을 import할 수 없기 때문이다. +- 잘못된 값은 두 번 걸린다: `vite.config.ts`가 빌드·dev 서버 시작 때 검사해 실패시키고(잘못된 산출물이 배포되지 않게), `env.ts`가 실행 시작 때 한 번 더 검사한다. - dev 배포는 `pnpm build:dev`(mode `dev`, NODE_ENV는 production). `--mode development`로 배포 빌드를 만들지 않는다(React 개발 빌드가 들어간다). ## 7. 도구 버전 @@ -108,7 +109,7 @@ main.tsx ─► app ─► features ─► shared ## 8. 하면 안 되는 것 - 컴포넌트에서 `fetch`·`http` 직접 호출 (→ `features//api`) -- `import.meta.env`를 `app/env.ts` 밖에서 읽기 +- `import.meta.env`를 `shared/config/env.ts` 밖에서 읽기 - 경로 문자열을 `app/routes.ts` 밖에 쓰기 - 다른 기능의 `components`·`hooks`·`pages` import - `shared`에서 `features`·`app` import diff --git a/docs/workflow.md b/docs/workflow.md index 2b0ebb4..e7cd4f0 100644 --- a/docs/workflow.md +++ b/docs/workflow.md @@ -29,7 +29,7 @@ main ──── fix/JECT-140-hotfix ──(PR)──► main ──(merge)─ 2. 구현 (3절 순서) 3. 로컬 검증 (4절) 4. PR: 제목 `[JECT-123] 예매 폼 화면`, 본문은 `.github/PULL_REQUEST_TEMPLATE.md` -5. 상대 리뷰 → 수정 → 승인 → squash merge +5. 상대 리뷰 → 수정 → 승인 → squash merge. squash 커밋 제목은 커밋 규칙(`feat(JECT-123): 요약`)으로 고친다 — GitHub 기본값은 PR 제목(`[JECT-123] 요약`)이라 그대로 두면 규칙에 어긋난다 6. 머지 후 브랜치 삭제 `develop` 브랜치는 아직 없다. 첫 기능 작업 전에 `main`에서 만든다. @@ -99,4 +99,4 @@ pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build ## 7. 장애가 나면 보는 순서 - 앱: 세션 상태 → Provider 상태 → Repository 캐시 → HTTP 응답·토큰 갱신 → 라우팅 -- 웹: 라우트·환경값(`app/env.ts`) → API 응답 → bridge 명령·버전·출처 +- 웹: 라우트·환경값(`shared/config/env.ts`) → API 응답 → bridge 명령·버전·출처 From 009de13e0c20597ecac60e19a15e1e6509144578 Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 23:35:30 +0900 Subject: [PATCH 10/23] =?UTF-8?q?feat:=20Android=C2=B7iOS=20dev/prod=20?= =?UTF-8?q?=EB=84=A4=EC=9D=B4=ED=8B=B0=EB=B8=8C=20flavor=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dev와 prod 앱을 한 기기에 나란히 설치하고 테스터가 구분할 수 있게 앱 ID(.dev 접미사)와 표시 이름(highfive DEV)을 flavor로 나눈다. Dart 쪽은 --flavor가 넣어 주는 FLUTTER_APP_FLAVOR를 먼저 읽어 플래그를 두 번 줄 필요가 없게 한다. AGP 9는 resValues가 기본으로 꺼져 있어 app 모듈에서 켠다. --- apps/mobile/android/app/build.gradle.kts | 19 + .../android/app/src/main/AndroidManifest.xml | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 731 ++++++++++++++++-- .../xcshareddata/xcschemes/dev.xcscheme | 119 +++ .../xcshareddata/xcschemes/prod.xcscheme | 119 +++ apps/mobile/ios/Runner/Info.plist | 2 +- apps/mobile/lib/app/env.dart | 13 +- apps/mobile/test/app/env_test.dart | 11 + 8 files changed, 938 insertions(+), 78 deletions(-) create mode 100644 apps/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/dev.xcscheme create mode 100644 apps/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/prod.xcscheme create mode 100644 apps/mobile/test/app/env_test.dart diff --git a/apps/mobile/android/app/build.gradle.kts b/apps/mobile/android/app/build.gradle.kts index aa7f36c..83ea45d 100644 --- a/apps/mobile/android/app/build.gradle.kts +++ b/apps/mobile/android/app/build.gradle.kts @@ -29,6 +29,25 @@ android { versionName = flutter.versionName } + // AGP 9부터 resValues 기본값이 꺼져 있어 flavor별 app_name 생성에 필요하다. + buildFeatures { + resValues = true + } + + flavorDimensions += "env" + productFlavors { + create("dev") { + dimension = "env" + applicationIdSuffix = ".dev" + versionNameSuffix = "-dev" + resValue("string", "app_name", "highfive DEV") + } + create("prod") { + dimension = "env" + resValue("string", "app_name", "highfive") + } + } + buildTypes { release { // TODO: Add your own signing config for the release build. diff --git a/apps/mobile/android/app/src/main/AndroidManifest.xml b/apps/mobile/android/app/src/main/AndroidManifest.xml index 9cece72..4bff20e 100644 --- a/apps/mobile/android/app/src/main/AndroidManifest.xml +++ b/apps/mobile/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/prod.xcscheme b/apps/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/prod.xcscheme new file mode 100644 index 0000000..ca6858e --- /dev/null +++ b/apps/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/prod.xcscheme @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/mobile/ios/Runner/Info.plist b/apps/mobile/ios/Runner/Info.plist index a6fc519..4e81871 100644 --- a/apps/mobile/ios/Runner/Info.plist +++ b/apps/mobile/ios/Runner/Info.plist @@ -7,7 +7,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Highfive + $(APP_DISPLAY_NAME) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier diff --git a/apps/mobile/lib/app/env.dart b/apps/mobile/lib/app/env.dart index 192eb66..2e4c880 100644 --- a/apps/mobile/lib/app/env.dart +++ b/apps/mobile/lib/app/env.dart @@ -1,15 +1,20 @@ -/// 빌드 환경. `--dart-define=FLAVOR=dev|prod` 로 정한다. +/// 빌드 환경. 보통 `--flavor dev|prod`(네이티브 flavor)로 정한다. enum Flavor { dev, prod } /// 환경별 설정값. 앱 시작 시 한 번 만들어 get_it에 등록한다. /// -/// 네이티브 flavor(앱 ID·이름 분리)는 아직 없다. 지금은 Dart 쪽 분기만 한다. +/// 네이티브 flavor(dev/prod)가 앱 ID·이름을 분리한다. `--flavor`를 주면 Flutter가 +/// `FLUTTER_APP_FLAVOR`를 넣어 주므로 그 값을 먼저 읽는다. +/// `--dart-define=FLAVOR`는 flavor 없이 도는 테스트·도구용으로만 남겨 둔다. class AppEnv { const AppEnv({required this.flavor, required this.apiBaseUrl}); - /// `FLAVOR`를 지정하지 않으면 dev. 모르는 값이면 앱 시작 시 바로 실패한다. + /// `FLUTTER_APP_FLAVOR` → `FLAVOR` 순서로 읽고, 둘 다 없으면 dev. + /// 모르는 값이면 앱 시작 시 바로 실패한다. factory AppEnv.fromEnvironment() { - const name = String.fromEnvironment('FLAVOR', defaultValue: 'dev'); + const name = bool.hasEnvironment('FLUTTER_APP_FLAVOR') + ? String.fromEnvironment('FLUTTER_APP_FLAVOR') + : String.fromEnvironment('FLAVOR', defaultValue: 'dev'); return switch (Flavor.values.byName(name)) { Flavor.dev => const AppEnv( flavor: Flavor.dev, diff --git a/apps/mobile/test/app/env_test.dart b/apps/mobile/test/app/env_test.dart new file mode 100644 index 0000000..d92655c --- /dev/null +++ b/apps/mobile/test/app/env_test.dart @@ -0,0 +1,11 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:highfive/app/env.dart'; + +void main() { + test('fromEnvironment resolves dev when no flavor is defined', () { + final env = AppEnv.fromEnvironment(); + + expect(env.flavor, Flavor.dev); + expect(env.isDev, isTrue); + }); +} From bb21a29c3c2d1c4caad1e0b83e0460ed71d0d291 Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 23:35:30 +0900 Subject: [PATCH 11/23] =?UTF-8?q?chore:=20import=20=EB=B0=A9=ED=96=A5=20?= =?UTF-8?q?=EA=B7=9C=EC=B9=99=EC=9D=84=20=EB=A6=B0=ED=8A=B8=EB=A1=9C=20?= =?UTF-8?q?=EA=B0=95=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문서로만 있던 app → features → core/shared 규칙을 사람이 grep으로 보던 것을 자동화한다. 웹은 eslint-plugin-import-x의 no-restricted-paths로 features→app(routes 제외)·shared→app/features·기능 간 import를 막고, 기능 목록은 src/features를 읽어 자동 생성한다. 앱은 의존성 없는 tool/check_imports.dart가 같은 규칙을 검사한다. 두 쪽 다 고의 위반 파일로 검출을 확인했다. --- apps/mobile/tool/check_imports.dart | 129 +++++++++++++ apps/web/eslint.config.js | 46 +++++ apps/web/package.json | 1 + apps/web/pnpm-lock.yaml | 287 ++++++++++++++++++++++++++++ 4 files changed, 463 insertions(+) create mode 100644 apps/mobile/tool/check_imports.dart diff --git a/apps/mobile/tool/check_imports.dart b/apps/mobile/tool/check_imports.dart new file mode 100644 index 0000000..14846f6 --- /dev/null +++ b/apps/mobile/tool/check_imports.dart @@ -0,0 +1,129 @@ +// lib/ 안 import가 docs/mobile-architecture.md 2절의 방향 규칙을 지키는지 검사한다. +// 실행: fvm dart run tool/check_imports.dart (위반이 있으면 종료 코드 1) +import 'dart:io'; + +final _importPattern = RegExp(r'''^\s*(?:import|export)\s+['"]([^'"]+)['"]'''); + +void main() { + final libDir = Directory('lib'); + if (!libDir.existsSync()) { + stderr.writeln('lib/ 폴더가 없다. apps/mobile 에서 실행한다.'); + exit(2); + } + final files = libDir + .listSync(recursive: true) + .whereType() + .where((f) => f.path.endsWith('.dart')) + .toList(); + + final violations = []; + for (final file in files) { + final from = _libRelative(file.path); + for (final (lineNo, line) in file.readAsLinesSync().indexed) { + final match = _importPattern.firstMatch(line); + if (match == null) continue; + final to = _resolve(from, match.group(1)!); + if (to == null) continue; + final reason = _violation(from, to); + if (reason != null) { + violations.add('${file.path}:${lineNo + 1} → $to\n $reason'); + } + } + } + + if (violations.isEmpty) { + stdout.writeln('import 방향 OK (${files.length} files)'); + return; + } + stderr.writeln( + 'import 방향 위반 ${violations.length}건 (docs/mobile-architecture.md 2절)', + ); + violations.forEach(stderr.writeln); + exit(1); +} + +String _libRelative(String path) { + final idx = path.indexOf('lib/'); + return path.substring(idx + 4).replaceAll(r'\', '/'); +} + +/// `package:highfive/...` 와 상대 경로만 lib 기준 경로로 바꾼다. 그 외(dart:, 다른 패키지)는 무시. +String? _resolve(String from, String uri) { + const pkg = 'package:highfive/'; + if (uri.startsWith(pkg)) return uri.substring(pkg.length); + if (uri.contains(':')) return null; + final parts = from.split('/')..removeLast(); + for (final seg in uri.split('/')) { + if (seg == '..') { + if (parts.isEmpty) return null; + parts.removeLast(); + } else if (seg != '.') { + parts.add(seg); + } + } + return parts.join('/'); +} + +String? _violation(String from, String to) { + final f = _Layer.of(from); + final t = _Layer.of(to); + if (f == null || t == null) return null; + + return switch (f.name) { + 'core' when t.name != 'core' => + 'core는 ${t.name}을 import하지 않는다 (core는 맨 아래층)', + 'shared' when t.name == 'app' || t.name == 'features' => + 'shared는 ${t.name}을 import하지 않는다', + 'features' => _featureViolation(f, t), + _ => null, + }; +} + +String? _featureViolation(_Layer f, _Layer t) { + if (t.name == 'app') { + return 'features는 app을 import하지 않는다 (연결 Provider는 presentation/providers 에)'; + } + if (t.name != 'features') return null; + if (f.feature != t.feature) { + if (t.sub == 'presentation') { + return '다른 기능의 presentation을 import하지 않는다 (data/repositories·models 계약만)'; + } + return null; + } + if (f.sub.startsWith('data') && t.sub == 'presentation') { + return 'data는 presentation을 모른다'; + } + if (f.sub == 'models' && t.sub != 'models') { + return 'models는 패키지만 import한다'; + } + if (f.sub == 'data/services' && t.sub == 'data/repositories') { + return 'services는 repositories를 import하지 않는다'; + } + return null; +} + +class _Layer { + const _Layer(this.name, {this.feature = '', this.sub = ''}); + + final String name; + final String feature; + final String sub; + + static _Layer? of(String path) { + final parts = path.split('/'); + switch (parts.first) { + case 'app': + case 'core': + case 'shared': + return _Layer(parts.first); + case 'features': + if (parts.length < 3) return null; + final sub = parts[2] == 'data' && parts.length > 4 + ? 'data/${parts[3]}' + : parts[2]; + return _Layer('features', feature: parts[1], sub: sub); + default: + return null; + } + } +} diff --git a/apps/web/eslint.config.js b/apps/web/eslint.config.js index 6db529d..86bec32 100644 --- a/apps/web/eslint.config.js +++ b/apps/web/eslint.config.js @@ -1,11 +1,44 @@ +import { readdirSync } from 'node:fs'; import js from '@eslint/js'; import globals from 'globals'; import reactHooks from 'eslint-plugin-react-hooks'; import reactRefresh from 'eslint-plugin-react-refresh'; +import { createNodeResolver, importX } from 'eslint-plugin-import-x'; import tseslint from 'typescript-eslint'; import { defineConfig, globalIgnores } from 'eslint/config'; import eslintConfigPrettier from 'eslint-config-prettier'; +const rulesDoc = 'docs/web-architecture.md 2절'; + +const features = readdirSync(new URL('./src/features', import.meta.url), { withFileTypes: true }) + .filter((entry) => entry.isDirectory()) + .map((entry) => entry.name); + +const importZones = [ + { + target: './src/shared', + from: './src/app', + message: `shared는 app을 import하지 않는다 (${rulesDoc})`, + }, + { + target: './src/shared', + from: './src/features', + message: `shared는 features를 import하지 않는다 (${rulesDoc})`, + }, + { + target: './src/features', + from: './src/app', + except: ['./routes.ts'], + message: `features는 app 중 routes.ts만 import할 수 있다 (${rulesDoc})`, + }, + ...features.map((feature) => ({ + target: `./src/features/${feature}`, + from: './src/features', + except: [`./${feature}`], + message: `다른 기능을 import하지 않는다. 기능 간에는 shared로 올리거나 API 계약으로 연결한다 (${rulesDoc})`, + })), +]; + export default defineConfig([ globalIgnores(['dist']), { @@ -20,5 +53,18 @@ export default defineConfig([ globals: globals.browser, }, }, + { + files: ['src/**/*.{ts,tsx}'], + plugins: { 'import-x': importX }, + settings: { + 'import-x/resolver-next': [createNodeResolver({ extensions: ['.ts', '.tsx', '.js'] })], + }, + rules: { + 'import-x/no-restricted-paths': [ + 'error', + { basePath: import.meta.dirname, zones: importZones }, + ], + }, + }, eslintConfigPrettier, ]); diff --git a/apps/web/package.json b/apps/web/package.json index 364ad83..ff9dc33 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -34,6 +34,7 @@ "@vitejs/plugin-react": "6.2.1", "eslint": "^10.13.0", "eslint-config-prettier": "^10.1.8", + "eslint-plugin-import-x": "^4.17.1", "eslint-plugin-react-hooks": "^7.1.1", "eslint-plugin-react-refresh": "^0.5.7", "globals": "^17.13.0", diff --git a/apps/web/pnpm-lock.yaml b/apps/web/pnpm-lock.yaml index d79a425..800924c 100644 --- a/apps/web/pnpm-lock.yaml +++ b/apps/web/pnpm-lock.yaml @@ -203,6 +203,9 @@ importers: eslint-config-prettier: specifier: ^10.1.8 version: 10.1.8(eslint@10.14.0) + eslint-plugin-import-x: + specifier: ^4.17.1 + version: 4.17.1(@typescript-eslint/utils@8.72.1(eslint@10.14.0)(typescript@6.0.3))(eslint@10.14.0) eslint-plugin-react-hooks: specifier: ^7.1.1 version: 7.1.1(eslint@10.14.0) @@ -663,6 +666,121 @@ packages: resolution: {integrity: sha512-SB8xqipSzZHUePCCLNeYxqnxq83X61/qzNhjQGbTfjxGZIeOEP7tBgWYX05Tcd6CgE02WdTJnh5b8kMZJ/+bnQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@unrs/resolver-binding-android-arm-eabi@1.13.0': + resolution: {integrity: sha512-60E5mvmIiW+i1E/HYeSX4iE4A8s9NJSGYPu7UM0DJght1c2tTkWwuyDyAwzsEXhKM/XbbndfnTiXdfrf27d2hw==} + cpu: [arm] + os: [android] + + '@unrs/resolver-binding-android-arm64@1.13.0': + resolution: {integrity: sha512-qlh/JR3Tuy1cJ7xtf5pR4ykvLiK6os7X7EL2+zXZbrVc/s+yB8DoFdQrCAW9/a2TOxPVbR7QVNpkPWh7UWIsEQ==} + cpu: [arm64] + os: [android] + + '@unrs/resolver-binding-darwin-arm64@1.13.0': + resolution: {integrity: sha512-yynnnnJXUC99WeD1GfvuXPKsKNfvgzGYC2eRayFnUfsHVROjqrbFOkFQLZiSx1H8+PLy5BzU8vqyPyLqbRfeBQ==} + cpu: [arm64] + os: [darwin] + + '@unrs/resolver-binding-darwin-x64@1.13.0': + resolution: {integrity: sha512-t8PXE0Ip9tmGyhRlfVsnEbzGM5iSvJIeNIXciUACjzpg0mmPs13fGv2x7W8sBa0S8zbIiohxKXS9fL/LXW/ERQ==} + cpu: [x64] + os: [darwin] + + '@unrs/resolver-binding-freebsd-x64@1.13.0': + resolution: {integrity: sha512-qdtl9GDWDoDx6rhzF4RU5SJutV3lcLOiTiyqD6nBxYfEO6lAgLNukfrA+HJ2u2OiyWvV8JW5iEWD3LoONw7lYA==} + cpu: [x64] + os: [freebsd] + + '@unrs/resolver-binding-linux-arm-gnueabihf@1.13.0': + resolution: {integrity: sha512-VrMUVwdrScTarsh4B6aUhTtziUavSlglo4Hi8XZ6CpAe4+j3nquY+XoP+tYkiSBDsXZ8386ne4pv4YYYBNi02w==} + cpu: [arm] + os: [linux] + + '@unrs/resolver-binding-linux-arm-musleabihf@1.13.0': + resolution: {integrity: sha512-zSbTVwaxiTC+zYJ9xVNTC6c+BYO/kOV/odcTI3bHuFFXa+XmjLoUkb/8UxsZeU5YF4K000m17wrXoTblNWuzOg==} + cpu: [arm] + os: [linux] + + '@unrs/resolver-binding-linux-arm64-gnu@1.13.0': + resolution: {integrity: sha512-Z/Rax87moZHsuvJ8awdfP+zrMlsCt3d7mggUPIiPe32KpeagimyzJWnZSMQoV67an9uVQghyh92Pc0VprITnYA==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@unrs/resolver-binding-linux-arm64-musl@1.13.0': + resolution: {integrity: sha512-oUzXz8hNvFLNEAag8lBKJe1euiV2dmGHAR+eQ5fNpsZO0F1K7IMRb4J6pqYsd7uLMRQNPiu5A1WKUJHbFLWbbw==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@unrs/resolver-binding-linux-loong64-gnu@1.13.0': + resolution: {integrity: sha512-BxhGYvZBg0YrvNOeSEGR3eNklwXYy0mUJk7oeGJvZoQMKM68zYvbbf52+fQI3Le4X0fW276FTKIoTwjpMob80A==} + cpu: [loong64] + os: [linux] + libc: [glibc] + + '@unrs/resolver-binding-linux-loong64-musl@1.13.0': + resolution: {integrity: sha512-nZcIuup9Ar3gAlqoZfX/KW6x83TMI11tLpCjldZG5M1KeY8qNUPNJJ71+sPvG8HMBpoh+ix1pAm5gkMFvcSAcQ==} + cpu: [loong64] + os: [linux] + libc: [musl] + + '@unrs/resolver-binding-linux-ppc64-gnu@1.13.0': + resolution: {integrity: sha512-AG6AgdDrkRNjAPwD/cftFJGgZUWCiJX+E8vpYCDEnwFHLTHZ7ppBiU6/vyPPwrfjcPUPQCDbbxE/eZUXsx49jQ==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@unrs/resolver-binding-linux-riscv64-gnu@1.13.0': + resolution: {integrity: sha512-6vOqYGcAmzpRWpUURWutzvpf1qJ6eOu5cfYObdtPJnzZ0+Kw4cw+ZkZJqIYEh8fPuTBwSYDL/FwlUhma1G/JVQ==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@unrs/resolver-binding-linux-riscv64-musl@1.13.0': + resolution: {integrity: sha512-4HeIn0S2KVUowK0A+EweXrDvZ8CKHEfTtif0kx9vt3ORNsqcXNFFIFnHE0tizma3/Gt5OGrU2ovYNuj+D/bN4g==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@unrs/resolver-binding-linux-s390x-gnu@1.13.0': + resolution: {integrity: sha512-JfkvqY7NZbxyhexLE+g6Z8Hsx4utHOGaVazAVghPiBn8Upw2iERZPpKYnW1FBVU4WStv/BiIsoK/Muke0E7asA==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@unrs/resolver-binding-linux-x64-gnu@1.13.0': + resolution: {integrity: sha512-iwjLeVdZo/8v5OKAeRIC+4VQV045t1EPZr5B/AVLgUQ04IdtNthWzg6not2cNjZgH2gHpSf4fOXMmN83aLO1FA==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@unrs/resolver-binding-linux-x64-musl@1.13.0': + resolution: {integrity: sha512-TOh1fqOjyq1OPoht3BDLd7Y+HeMJRwd5g2VNmCQclknEbjp4py5GFRmT4L/rOybF5Af8q0LT9zHs2WGkwlqtrw==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@unrs/resolver-binding-openharmony-arm64@1.13.0': + resolution: {integrity: sha512-3T2MNtF2dd1yjaXCVqrsi+/3VZeksEzU1hygPzqqkBLVVjn+2iJzXEkxxCKIVFrWnpmEbazeHJp/ruYD0RUVWA==} + cpu: [arm64] + os: [openharmony] + + '@unrs/resolver-binding-win32-arm64-msvc@1.13.0': + resolution: {integrity: sha512-hKWfSLiN3L4cIxg0jrpyP/66AXLTcyD37jmSn//rGdOUYGlizYxTEFdJ+GZbp2NnaML3YS/A73nCysze8FaJdg==} + cpu: [arm64] + os: [win32] + + '@unrs/resolver-binding-win32-ia32-msvc@1.13.0': + resolution: {integrity: sha512-N4gDKkDoiyIQEcn3vTqe2ksRxUAtBvQ8c5TiT+WonSa6FHgCAY5+RggnZ134hXJoRj57JEjv4/m+i/pAKHWrTQ==} + cpu: [ia32] + os: [win32] + + '@unrs/resolver-binding-win32-x64-msvc@1.13.0': + resolution: {integrity: sha512-DpLMlAqlrk4zBVK3DiDjwKD0oq7pZNy+8BiIBRuByqb6dm5jsdoLMhIiyh/xR7+WejaW/1Ui+XgbgMNa4+zWJg==} + cpu: [x64] + os: [win32] + '@vitejs/plugin-react@6.2.1': resolution: {integrity: sha512-9KyWCij3r0+qLG3Q62vBmv0VyevmYibAtxaCIVK9o0k6CXgaajZRIe8tpfchQcdZArJ5b/7OrIz4W3b2uxVRDA==} engines: {node: ^20.19.0 || >=22.12.0} @@ -752,6 +870,10 @@ packages: resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} engines: {node: '>=18'} + comment-parser@1.4.9: + resolution: {integrity: sha512-+2AvZKjJaNq9GQljm3tr0utwrig5BL+jgJGvz5rDpGKNIp+ojcRXWUwBbh/sGIi1QCprR6PsKFakub+w1v+4hQ==} + engines: {node: '>= 12.0.0'} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -823,6 +945,28 @@ packages: peerDependencies: eslint: '>=7.0.0' + eslint-import-context@0.1.9: + resolution: {integrity: sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + peerDependencies: + unrs-resolver: ^1.0.0 + peerDependenciesMeta: + unrs-resolver: + optional: true + + eslint-plugin-import-x@4.17.1: + resolution: {integrity: sha512-4cdstYkKCyjumM2Q9NSI03K8D2a9F4Ssz33K2lv2hQa4KmR9jPLwk3uWGtNvclfqBrPGfGuMBwsGMbe6dMRbfg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/utils': ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + eslint-import-resolver-node: '*' + peerDependenciesMeta: + '@typescript-eslint/utils': + optional: true + eslint-import-resolver-node: + optional: true + eslint-plugin-react-hooks@7.1.1: resolution: {integrity: sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g==} engines: {node: '>=18'} @@ -923,6 +1067,9 @@ packages: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} + get-tsconfig@4.14.3: + resolution: {integrity: sha512-++QEw4DIY7WGoukz+/+A/8dGYPT9l9yIadnmSgZ8Rjr3YVSVDipQSO9CdnJo9ePqFqUUqh+wk9uIaoiAwsiPkA==} + glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} @@ -1119,6 +1266,11 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + napi-postinstall@0.3.7: + resolution: {integrity: sha512-jyU4cU4kVAmy/3qjP+DcoQTNXfINHc+dFw54gGqWC8nu0mpV0kOnk7kff+J+Q18SbX0k3Np8Rm7yFjd3phatNQ==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + hasBin: true + natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -1217,6 +1369,9 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + rolldown@1.2.16: resolution: {integrity: sha512-bWvlMpFKiTfDKfnK7FC2MPgPeWCf/Kpwsq49ApdW+FQaBZb6O6dZ4MAPbPUjp7hYQrw/RobqCzn64BRrQecGHw==} engines: {node: ^20.19.0 || >=22.12.0} @@ -1250,6 +1405,10 @@ packages: resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} engines: {node: '>=0.10.0'} + stable-hash-x@0.2.0: + resolution: {integrity: sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==} + engines: {node: '>=12.0.0'} + std-env@4.3.0: resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} @@ -1309,6 +1468,9 @@ packages: resolution: {integrity: sha512-+fdndUTwBP86cVjihTp21hZHo7d6oj1c/47XPA3lL8mM0XHs+C4EkcjmgRsFnFk2f/UONGDy9ItBItmXsLOQHw==} engines: {node: '>=22.19.0'} + unrs-resolver@1.13.0: + resolution: {integrity: sha512-mcPQo9Vm6kXd84d/WqMiYBi2CcA57QHBX/ev5PoUEb8b2oQzUvJ6xYsfseQblnCncgnVmCZGWiFwK7KkS5JZJA==} + update-browserslist-db@1.3.4: resolution: {integrity: sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==} hasBin: true @@ -1883,6 +2045,69 @@ snapshots: '@typescript-eslint/types': 8.72.1 eslint-visitor-keys: 5.0.1 + '@unrs/resolver-binding-android-arm-eabi@1.13.0': + optional: true + + '@unrs/resolver-binding-android-arm64@1.13.0': + optional: true + + '@unrs/resolver-binding-darwin-arm64@1.13.0': + optional: true + + '@unrs/resolver-binding-darwin-x64@1.13.0': + optional: true + + '@unrs/resolver-binding-freebsd-x64@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-arm-gnueabihf@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-arm-musleabihf@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-arm64-gnu@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-arm64-musl@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-loong64-gnu@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-loong64-musl@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-ppc64-gnu@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-riscv64-gnu@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-riscv64-musl@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-s390x-gnu@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-x64-gnu@1.13.0': + optional: true + + '@unrs/resolver-binding-linux-x64-musl@1.13.0': + optional: true + + '@unrs/resolver-binding-openharmony-arm64@1.13.0': + optional: true + + '@unrs/resolver-binding-win32-arm64-msvc@1.13.0': + optional: true + + '@unrs/resolver-binding-win32-ia32-msvc@1.13.0': + optional: true + + '@unrs/resolver-binding-win32-x64-msvc@1.13.0': + optional: true + '@vitejs/plugin-react@6.2.1(vite@8.3.5(@types/node@24.19.2))': dependencies: '@rolldown/pluginutils': 1.0.1 @@ -1954,6 +2179,8 @@ snapshots: chai@6.3.0: {} + comment-parser@1.4.9: {} + convert-source-map@2.0.0: {} cookie-es@3.1.1: {} @@ -2006,6 +2233,30 @@ snapshots: dependencies: eslint: 10.14.0 + eslint-import-context@0.1.9(unrs-resolver@1.13.0): + dependencies: + get-tsconfig: 4.14.3 + stable-hash-x: 0.2.0 + optionalDependencies: + unrs-resolver: 1.13.0 + + eslint-plugin-import-x@4.17.1(@typescript-eslint/utils@8.72.1(eslint@10.14.0)(typescript@6.0.3))(eslint@10.14.0): + dependencies: + '@typescript-eslint/types': 8.72.1 + comment-parser: 1.4.9 + debug: 4.4.3 + eslint: 10.14.0 + eslint-import-context: 0.1.9(unrs-resolver@1.13.0) + is-glob: 4.0.3 + minimatch: 10.2.6 + semver: 7.8.5 + stable-hash-x: 0.2.0 + unrs-resolver: 1.13.0 + optionalDependencies: + '@typescript-eslint/utils': 8.72.1(eslint@10.14.0)(typescript@6.0.3) + transitivePeerDependencies: + - supports-color + eslint-plugin-react-hooks@7.1.1(eslint@10.14.0): dependencies: '@babel/core': 7.29.7 @@ -2123,6 +2374,10 @@ snapshots: gensync@1.0.0-beta.2: {} + get-tsconfig@4.14.3: + dependencies: + resolve-pkg-maps: 1.0.0 + glob-parent@6.0.2: dependencies: is-glob: 4.0.3 @@ -2284,6 +2539,8 @@ snapshots: nanoid@3.3.20: {} + napi-postinstall@0.3.7: {} + natural-compare@1.4.0: {} node-releases@2.0.63: {} @@ -2362,6 +2619,8 @@ snapshots: require-from-string@2.0.2: {} + resolve-pkg-maps@1.0.0: {} + rolldown@1.2.16: dependencies: '@oxc-project/types': 0.156.0 @@ -2401,6 +2660,8 @@ snapshots: source-map-js@1.2.2: {} + stable-hash-x@0.2.0: {} + std-env@4.3.0: {} tinybench@6.2.2: {} @@ -2451,6 +2712,32 @@ snapshots: undici@8.12.3: {} + unrs-resolver@1.13.0: + dependencies: + napi-postinstall: 0.3.7 + optionalDependencies: + '@unrs/resolver-binding-android-arm-eabi': 1.13.0 + '@unrs/resolver-binding-android-arm64': 1.13.0 + '@unrs/resolver-binding-darwin-arm64': 1.13.0 + '@unrs/resolver-binding-darwin-x64': 1.13.0 + '@unrs/resolver-binding-freebsd-x64': 1.13.0 + '@unrs/resolver-binding-linux-arm-gnueabihf': 1.13.0 + '@unrs/resolver-binding-linux-arm-musleabihf': 1.13.0 + '@unrs/resolver-binding-linux-arm64-gnu': 1.13.0 + '@unrs/resolver-binding-linux-arm64-musl': 1.13.0 + '@unrs/resolver-binding-linux-loong64-gnu': 1.13.0 + '@unrs/resolver-binding-linux-loong64-musl': 1.13.0 + '@unrs/resolver-binding-linux-ppc64-gnu': 1.13.0 + '@unrs/resolver-binding-linux-riscv64-gnu': 1.13.0 + '@unrs/resolver-binding-linux-riscv64-musl': 1.13.0 + '@unrs/resolver-binding-linux-s390x-gnu': 1.13.0 + '@unrs/resolver-binding-linux-x64-gnu': 1.13.0 + '@unrs/resolver-binding-linux-x64-musl': 1.13.0 + '@unrs/resolver-binding-openharmony-arm64': 1.13.0 + '@unrs/resolver-binding-win32-arm64-msvc': 1.13.0 + '@unrs/resolver-binding-win32-ia32-msvc': 1.13.0 + '@unrs/resolver-binding-win32-x64-msvc': 1.13.0 + update-browserslist-db@1.3.4(browserslist@4.29.5): dependencies: browserslist: 4.29.5 From 0faf87ed48b070efa2a29b206cf3e8e108f554f4 Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 23:35:30 +0900 Subject: [PATCH 12/23] =?UTF-8?q?chore:=20GitHub=20Actions=20PR=20?= =?UTF-8?q?=EA=B2=80=EC=82=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR 전 로컬 검증이 약속에만 기대지 않도록 앱(format·analyze·check_imports·test·build_runner 무변경)과 웹(format·lint·typecheck·test·build·build:dev)을 PR마다 돌린다. 바뀐 쪽만 실행하도록 paths 필터를 두고, Flutter·Node 버전은 .fvmrc·.nvmrc·packageManager를 그대로 읽는다. --- .github/workflows/mobile.yml | 46 ++++++++++++++++++++++++++++++++++++ .github/workflows/web.yml | 43 +++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 .github/workflows/mobile.yml create mode 100644 .github/workflows/web.yml diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml new file mode 100644 index 0000000..cc779d9 --- /dev/null +++ b/.github/workflows/mobile.yml @@ -0,0 +1,46 @@ +name: mobile + +on: + pull_request: + paths: + - "apps/mobile/**" + - ".github/workflows/mobile.yml" + push: + branches: [main, develop] + paths: + - "apps/mobile/**" + - ".github/workflows/mobile.yml" + +concurrency: + group: mobile-${{ github.ref }} + cancel-in-progress: true + +jobs: + check: + runs-on: ubuntu-latest + defaults: + run: + working-directory: apps/mobile + steps: + - uses: actions/checkout@v5 + + - name: Flutter 버전을 .fvmrc에서 읽기 + id: fvmrc + run: echo "version=$(jq -r .flutter .fvmrc)" >> "$GITHUB_OUTPUT" + + - uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ steps.fvmrc.outputs.version }} + channel: stable + cache: true + + - run: flutter pub get + - run: dart format --set-exit-if-changed --output=none lib test tool + - run: flutter analyze + - run: dart run tool/check_imports.dart + - run: flutter test + + - name: 생성 파일이 최신인지 (build_runner 후 diff 없어야 함) + run: | + dart run build_runner build --delete-conflicting-outputs + git diff --exit-code diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml new file mode 100644 index 0000000..189782d --- /dev/null +++ b/.github/workflows/web.yml @@ -0,0 +1,43 @@ +name: web + +on: + pull_request: + paths: + - "apps/web/**" + - ".github/workflows/web.yml" + push: + branches: [main, develop] + paths: + - "apps/web/**" + - ".github/workflows/web.yml" + +concurrency: + group: web-${{ github.ref }} + cancel-in-progress: true + +jobs: + check: + runs-on: ubuntu-latest + defaults: + run: + working-directory: apps/web + steps: + - uses: actions/checkout@v5 + + - uses: pnpm/action-setup@v4 + with: + package_json_file: apps/web/package.json + + - uses: actions/setup-node@v4 + with: + node-version-file: apps/web/.nvmrc + cache: pnpm + cache-dependency-path: apps/web/pnpm-lock.yaml + + - run: pnpm install --frozen-lockfile + - run: pnpm format:check + - run: pnpm lint + - run: pnpm typecheck + - run: pnpm test + - run: pnpm build + - run: pnpm build:dev From 28ff6036c4d1259aebe1efef65d3cba9a491224c Mon Sep 17 00:00:00 2001 From: beomseok Date: Mon, 2 Nov 2026 23:35:30 +0900 Subject: [PATCH 13/23] =?UTF-8?q?docs:=20AGENTS.md=EB=A5=BC=20=EC=83=89?= =?UTF-8?q?=EC=9D=B8=EC=9C=BC=EB=A1=9C=20=EC=A4=84=EC=9D=B4=EA=B3=A0=20fla?= =?UTF-8?q?vor=C2=B7=EB=A6=B0=ED=8A=B8=C2=B7CI=EB=A5=BC=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 같은 규칙이 여러 문서에 반복되어 불일치가 생겼으므로 AGENTS.md는 항상 지킬 것 11개와 문서 지도만 남기고 본문은 docs/ 한 곳으로 모은다. 실행 명령은 --flavor, 검증 명령에 check_imports, 자동화 표의 예정 항목을 완료로 바꾼다. --- AGENTS.md | 76 ++++++++++++------------------------- README.md | 9 +++-- docs/mobile-architecture.md | 2 + docs/overview.md | 16 ++++---- docs/pr-checklist.md | 12 +++--- docs/web-architecture.md | 2 + docs/workflow.md | 5 ++- 7 files changed, 50 insertions(+), 72 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 9c9e461..bbfd725 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # highfive-5th-Client 작업 규칙 -사람과 코딩 에이전트가 같이 보는 규칙이다. 이 파일은 "항상 지킬 것"만 짧게 담고, 자세한 내용은 `docs/`에 있다. +사람과 코딩 에이전트가 같이 보는 입구다. 여기에는 **항상 지킬 것**과 문서 지도만 두고, 규칙의 본문은 `docs/` 한 곳에만 둔다. 규칙을 바꿀 때는 `docs/`를 고치고 여기는 링크만 유지한다. | 알고 싶은 것 | 문서 | | --- | --- | @@ -9,78 +9,50 @@ | 앱 폴더에 어떤 파일이 들어가고 누가 누구를 import하나 | [docs/mobile-architecture.md](./docs/mobile-architecture.md) | | 웹 폴더 구조·의존성·bridge·환경 | [docs/web-architecture.md](./docs/web-architecture.md) | | 색·간격·글자 크기 값과 바꾸는 절차 | [docs/design-tokens.md](./docs/design-tokens.md) | -| PR 올리기 전·리뷰할 때 무엇을 왜 보나 ("누가 만들어도 같은 느낌"의 검사 항목) | [docs/pr-checklist.md](./docs/pr-checklist.md) | +| PR 올리기 전·리뷰할 때 무엇을 왜 보나 | [docs/pr-checklist.md](./docs/pr-checklist.md) | -## 저장소 +## 저장소와 명령 ``` apps/mobile/ Flutter 앱. 명령은 이 폴더에서 `fvm flutter ...` apps/web/ React + TypeScript + Vite. 명령은 이 폴더에서 `pnpm ...` -docs/ 규칙·계약·배포 기록. BE API 명세는 docs/api/ 에 둔다 -.github/ PR 템플릿 (CI는 아직 없음) +docs/ 규칙 문서. BE API 명세는 docs/api/ 에 둔다 +.github/ PR 템플릿, CI (mobile.yml · web.yml — PR마다 아래 검증을 돌린다) ``` -- Flutter 버전은 `apps/mobile/.fvmrc`, Node는 `apps/web/.nvmrc`·`packageManager`로 고정한다. `fvm flutter`/`fvm dart`, `pnpm`만 쓴다. SDK·메이저 버전 업그레이드는 PR로 합의한다. -- 앱에만 영향 있는 변경은 웹을, 웹에만 영향 있는 변경은 앱을 건드리지 않는다. 앱↔웹 공통 계약(bridge·토큰)은 양쪽을 같이 바꾸고 양쪽 검증을 한다. - -## 명령 - | | 앱 (`apps/mobile`) | 웹 (`apps/web`) | | --- | --- | --- | | 설치 | `fvm install && fvm flutter pub get` | `corepack enable && pnpm install` | -| 실행 | `fvm flutter run --dart-define=FLAVOR=dev` | `pnpm dev` | -| 포맷 | `fvm dart format lib test` | `pnpm format` | -| 분석·린트 | `fvm flutter analyze` | `pnpm lint && pnpm typecheck` | +| 실행 | `fvm flutter run --flavor dev` (`prod`) | `pnpm dev` | +| 포맷 | `fvm dart format lib test tool` | `pnpm format` | +| 분석·린트 | `fvm flutter analyze && fvm dart run tool/check_imports.dart` | `pnpm lint && pnpm typecheck` | | 테스트 | `fvm flutter test` | `pnpm test` | -| 빌드 | `fvm flutter build apk\|ipa --dart-define=FLAVOR=prod` | `pnpm build` (prod) / `pnpm build:dev` | +| 빌드 | `fvm flutter build apk\|ipa --flavor prod` | `pnpm build` (prod) / `pnpm build:dev` | | 코드 생성 | `fvm dart run build_runner build --delete-conflicting-outputs` | - | -PR 전에 포맷·분석·테스트(웹은 빌드까지)가 전부 통과해야 한다. 한글 경로에서 `flutter analyze`가 크래시하면 영문 경로에 복사해서 돌린다. +Flutter 버전은 `apps/mobile/.fvmrc`, Node는 `apps/web/.nvmrc`·`packageManager`로 고정한다. CI도 같은 파일을 읽는다. 한글 경로에서 `flutter analyze`가 크래시하면 영문 경로에 복사해서 돌린다. ## 항상 지킬 것 -구조 - -- feature-first. `features//`에 모델·데이터·화면을 모은다. 실제 구현하는 기능부터 만들고 빈 폴더·UseCase·인터페이스를 미리 만들지 않는다. -- 의존성은 `app → features → core/shared` 한 방향. features는 app을 import하지 않고(웹은 `app/routes.ts`만 예외), 다른 기능의 화면·ViewModel·훅을 import하지 않는다. core·shared는 도메인을 모른다. -- 여러 기능에서 쓴다는 이유만으로 기능 코드를 core/shared로 옮기지 않는다. - -앱 계층 - -- View는 표시·입력·이동만, ViewModel(Riverpod Notifier/AsyncNotifier)은 상태·명령, Repository는 변환·캐시·저장, Service는 HTTP·SDK 호출만. -- `getIt`은 `app/di.dart`(등록), `app/providers.dart`(앱 전역 연결 Provider), `presentation/providers/`(기능 연결 Provider)에서만. ViewModel은 get_it에 등록하지 않는다. -- 신청·예매·결제 같은 쓰기 명령은 Provider `build()`가 아니라 버튼 → ViewModel 메서드로 실행하고 중복 실행을 막는다. 권한·재고·가격은 서버가 최종 판단한다. -- 로그아웃·계정 전환 시 세션·Repository 캐시·소켓·보안 저장소를 정리하고 이전 세션의 늦은 응답은 버린다. -- 인증 정보는 `FlutterSecureStorage`에만. 토큰을 SharedPreferences·로그·URL·분석 이벤트에 넣지 않는다. - -디자인 +1. feature-first. 실제 구현하는 기능부터 만들고 빈 폴더·UseCase·미래용 인터페이스를 미리 만들지 않는다. → [mobile 1절](./docs/mobile-architecture.md#1-폴더와-들어가는-파일) +2. import는 `app → features → core/shared` 한 방향. 웹은 ESLint, 앱은 `tool/check_imports.dart`가 막는다. → [mobile 2절](./docs/mobile-architecture.md#2-의존성-방향) · [web 2절](./docs/web-architecture.md#2-의존성-방향) +3. View는 표시·입력·이동, ViewModel은 상태·명령, Repository는 변환·캐시, Service는 호출만. `getIt`은 `app/di.dart`와 연결 Provider에서만. → [mobile 3절](./docs/mobile-architecture.md#3-계층-책임) +4. 신청·예매·결제 같은 쓰기 명령은 버튼 → ViewModel 메서드로만, 중복 실행을 막고, 권한·재고·가격은 서버가 최종 판단. → [mobile 4절](./docs/mobile-architecture.md#4-상태를-어디에-두는가) +5. 로그아웃·계정 전환 시 세션·캐시·소켓·보안 저장소를 정리하고 이전 세션의 늦은 응답은 버린다. → [mobile 4절](./docs/mobile-architecture.md#4-상태를-어디에-두는가) +6. 토큰·개인정보는 로그·URL·prefs·분석 이벤트에 넣지 않는다. 인증 정보는 `FlutterSecureStorage`에만. → [checklist A9](./docs/pr-checklist.md#a9-데이터보안설정-위치) +7. 색·간격·모서리·글자 크기는 토큰만 쓴다. 토큰 변경은 앱·웹·문서를 한 PR에서. → [design-tokens](./docs/design-tokens.md) +8. 환경값은 앱 `app/env.dart`, 웹 `shared/config/env.ts`에서만 읽는다. 경로 문자열은 `AppRoutes`/`routes.ts`에만. +9. 생성 파일(`*.g.dart`, `*.freezed.dart`)은 손대지 않고 커밋한다. `any`, `// ignore:`, `eslint-disable`로 오류를 숨기지 않는다. +10. 테스트는 앱 `test/`에 `lib/` 미러, 웹은 파일 옆. 문구 고정·고정 sleep 금지. → [checklist A10](./docs/pr-checklist.md#a10-테스트) +11. PR 전 로컬 검증 전부 통과 + 체크리스트. DI·모델·라우팅·네이티브·bridge·토큰·의존성 변경은 PR 전에 상대에게 한 줄 알린다. → [workflow 4·5절](./docs/workflow.md#4-로컬-검증-pr-전-필수) -- 색·간격·모서리·글자 크기는 토큰만 쓴다 (앱 `context.colors`·`AppSpacing`·`AppRadius`·`textTheme`, 웹 `var(--color-*)` 등). hex·`Colors.*`·숫자 직접 사용 금지. 토큰은 앱·웹·문서를 한 PR에서 같이 바꾼다. - -코드·테스트 - -- 모델은 freezed + json_serializable. `*.g.dart`·`*.freezed.dart`는 직접 수정하지 않고 생성 파일도 커밋한다. -- 환경값은 앱 `app/env.dart`, 웹 `shared/config/env.ts`에서만 읽는다. 라우트 경로는 앱 `AppRoutes`, 웹 `routes.ts`에만. -- 테스트는 앱은 `test/`에 `lib/`와 같은 경로, 웹은 파일 옆 `*.test.tsx`. 연결 Provider를 바꿔 끼우고 전역 getIt에 기대지 않는다. 문구를 고정하는 테스트, 고정 sleep으로 기다리는 테스트는 만들지 않는다. -- `any`, `// ignore:`, `eslint-disable`로 오류를 숨기지 않는다. - -## Git·Jira - -| 항목 | 규칙 | -| --- | --- | -| 브랜치 | `feat/JECT-123-login`, `fix/JECT-124-login-error` (type: feat / fix / chore / refactor / docs) | -| 커밋 | `feat(JECT-123): 로그인 기능 구현`. 본문은 "왜"만, 파일 나열 금지 | -| PR | `[JECT-123] 로그인 기능 구현`. 본문은 `.github/PULL_REQUEST_TEMPLATE.md`, 체크 항목은 `docs/pr-checklist.md` | -| 기능 머지 | 기능 브랜치 → `develop`, 상대 1명 리뷰 후 squash. squash 커밋 제목은 커밋 규칙으로 고친다 | -| 릴리스 | `develop` → `main`, 이력 유지하는 merge | -| 긴급 수정 | `main`에서 fix 브랜치 → PR로 main 반영 → develop에도 반영 | -| 사전 공유 | DI·공유 모델·라우팅·네이티브·bridge·토큰·pubspec/package.json 변경은 PR 전에 한 줄 알림 | +## Git -`JECT-123`은 예시다. `develop` 브랜치는 아직 없으므로 첫 기능 작업 전에 만든다. +브랜치 `feat/JECT-123-login` · 커밋 `feat(JECT-123): 한글 요약` · PR `[JECT-123] 요약` · 기능 → `develop` squash(제목은 커밋 규칙으로) · `develop` → `main` merge. 자세히 [workflow 2절](./docs/workflow.md#2-브랜치에서-머지까지). `develop` 브랜치는 아직 없다. ## 아직 안 한 것 -- 네이티브 flavor(앱 ID·이름 분리), Shorebird, Fastlane, GitHub Actions +- Shorebird, Fastlane, 스토어 배포, 실기기 서명 - 토큰 갱신·세션 복원·WebView bridge, `shared/widgets`(Loading/Error/Empty), `core/error` - 웹 서버 데이터 라이브러리(TanStack Query) 도입 여부, 웹 호스팅 - `develop` 브랜치, `docs/api/`, `docs/releases.md` diff --git a/README.md b/README.md index dbf3686..727b36b 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,15 @@ docs/ 작업 흐름·구조·디자인 토큰 규칙 cd apps/mobile fvm install # .fvmrc 버전 설치 fvm flutter pub get -fvm flutter run --dart-define=FLAVOR=dev # FLAVOR 생략 시 dev +fvm flutter run --flavor dev # dev / prod 두 앱이 나란히 설치된다 ``` -PR 전 검증: +PR 전 검증 (CI도 같은 명령): ```bash -fvm dart format --set-exit-if-changed lib test +fvm dart format --set-exit-if-changed lib test tool fvm flutter analyze +fvm dart run tool/check_imports.dart fvm flutter test ``` @@ -36,7 +37,7 @@ pnpm install pnpm dev ``` -PR 전 검증: +PR 전 검증 (CI도 같은 명령): ```bash pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build diff --git a/docs/mobile-architecture.md b/docs/mobile-architecture.md index 4262548..5c06c45 100644 --- a/docs/mobile-architecture.md +++ b/docs/mobile-architecture.md @@ -96,6 +96,8 @@ data/services ──► data/dto, core/network models ──► 패키지만 (flutter 포함 안 함) ``` +이 규칙은 `fvm dart run tool/check_imports.dart`가 검사한다(CI에서도 돌아감). 위반이면 파일·줄·이유를 출력하고 종료 코드 1로 끝난다. + 왜: 아래층이 위층을 모르면 아래층만 따로 테스트하고 교체할 수 있다. `features → app`을 막는 이유는 순환(app이 features를 import하므로)과, 기능이 앱 전체 설정에 기대는 것을 막기 위해서다. 기능이 환경값이 필요하면 Service·Repository가 생성자로 받는다. ## 3. 계층 책임 diff --git a/docs/overview.md b/docs/overview.md index a0f302b..2196936 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -192,7 +192,7 @@ sequenceDiagram ```mermaid flowchart TB - m["main()"] --> e["AppEnv.fromEnvironment()
--dart-define=FLAVOR 읽기"] + m["main()"] --> e["AppEnv.fromEnvironment()
--flavor dev|prod 읽기"] e --> d["setupDi(env)
Dio · SecureStorage · Prefs 등록"] d --> p["ProviderScope"] p --> a["HighfiveApp
테마 · 라우터 · dev면 DEV 배너"] @@ -365,17 +365,17 @@ flowchart LR a4["A4 명령 처리"] a8["A8 문구 규칙"] end - subgraph auto["자동화 (예정)"] - l1["stylelint · custom_lint"] - l2["GitHub Actions"] - l3["ESLint no-restricted-imports"] + subgraph auto["자동화"] + l1["stylelint · custom_lint (예정)"] + l2["GitHub Actions ✓"] + l3["ESLint import-x · check_imports.dart ✓"] end f1 --> a6 --> l1 f2 --> a5 --> l2 f2 --> a7 f3 --> a4 --> l2 f4 --> a8 - a6 --> l3 + a3["A3 의존성 방향"] --> l3 ``` 운영 규칙: 같은 지적이 PR에서 **2번** 나오면 체크 항목으로 올리고, **3번** 나오면 린트·테스트·공통 위젯으로 옮긴다. 체크리스트는 길어지지 않고 자동화만 늘어난다. @@ -384,9 +384,9 @@ flowchart LR | 영역 | 없는 것 | 언제 | | --- | --- | --- | -| 앱 | 네이티브 flavor(앱 ID·이름 분리), `shared/widgets`(Loading·Error·Empty), `core/error`, 토큰 갱신·세션 복원 | 첫 기능(로그인) 만들 때 | +| 앱 | `shared/widgets`(Loading·Error·Empty), `core/error`, 토큰 갱신·세션 복원 | 첫 기능(로그인) 만들 때 | | 웹 | `shared/ui`, `shared/bridge`, 서버 데이터 라이브러리 결정, 호스팅 | 첫 API 연동 때 | -| 배포 | Shorebird, Fastlane, GitHub Actions | CI 세팅 작업 | +| 배포 | Shorebird, Fastlane, 스토어 서명 (CI 검사는 있음) | 첫 내부 테스트 배포 전 | | 팀 합의 | `develop` 브랜치, 문구 톤·용어집, 공통 위젯 1차 목록, 캡처 기준 기기 | 첫 PR 전 | ## 9. 문서 지도 diff --git a/docs/pr-checklist.md b/docs/pr-checklist.md index 447d654..f70f1a4 100644 --- a/docs/pr-checklist.md +++ b/docs/pr-checklist.md @@ -45,7 +45,7 @@ PR 템플릿(`.github/PULL_REQUEST_TEMPLATE.md`)의 체크박스는 이 문서 ### A2. 자동 검증 -- 본다: 앱 `fvm dart format --set-exit-if-changed lib test` / `fvm flutter analyze` / `fvm flutter test`, 웹 `pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build`. 전부 종료 코드 0. +- 본다: 앱 `fvm dart format --set-exit-if-changed lib test tool` / `fvm flutter analyze` / `fvm dart run tool/check_imports.dart` / `fvm flutter test`, 웹 `pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build`. 전부 종료 코드 0. CI가 PR마다 같은 것을 돌린다. - 왜: 가장 싸게 얻는 일관성. 사람이 보기 전에 기계가 거를 수 있는 것은 전부 기계에 맡긴다. - 확인: 마지막 커밋 뒤에 다시 돌린다. 경고를 `// ignore:`·`eslint-disable`·`any`로 지웠으면 그 자체가 실패다. @@ -57,7 +57,7 @@ PR 템플릿(`.github/PULL_REQUEST_TEMPLATE.md`)의 체크박스는 이 문서 - `features`가 `app/`을 import하지 않는다(웹은 `app/routes.ts`만 예외). 다른 기능의 `presentation/`(웹: `components/ hooks/ pages/`)을 import하지 않는다. - 빈 폴더, "나중에 쓸" 인터페이스·UseCase·추상 클래스가 없다. - 왜: 구조가 같아야 상대가 내 기능을 고칠 때 찾는 시간이 0에 가깝다. 의존성 방향이 지켜져야 아래층을 따로 테스트하고 바꿀 수 있다. -- 확인: +- 확인: 웹은 `pnpm lint`(ESLint `import-x/no-restricted-paths`), 앱은 `fvm dart run tool/check_imports.dart`가 방향 위반을 잡는다. 아래 grep은 린트가 못 보는 것(도메인 단어가 core/shared에 들어갔는지 등)을 눈으로 볼 때 쓴다. ```bash # 앱: features가 app을 import하는가 grep -rn "import '.*\/app\/" apps/mobile/lib/features @@ -187,12 +187,12 @@ PR 템플릿(`.github/PULL_REQUEST_TEMPLATE.md`)의 체크박스는 이 문서 | 항목 | 지금 | 옮길 곳 | | --- | --- | --- | -| A2 자동 검증 | 각자 로컬 | GitHub Actions PR 검사 (앱 Linux runner, 웹 Linux runner) | -| A3 의존성 방향 (웹) | grep | ESLint `no-restricted-imports`로 `features → app`, 기능 간 내부 import 차단 | -| A3 의존성 방향 (앱) | grep | `custom_lint` 규칙 또는 `import_lint` 패키지 | +| A2 자동 검증 | **된 것**: `.github/workflows/mobile.yml`, `web.yml` | - | +| A3 의존성 방향 (웹) | **된 것**: ESLint `import-x/no-restricted-paths` | - | +| A3 의존성 방향 (앱) | **된 것**: `tool/check_imports.dart` (CI 포함) | 규칙이 늘면 `custom_lint`로 옮기는 것을 검토 | | A6 토큰 (웹) | grep | stylelint `declaration-property-value-disallowed-list`로 hex·px 차단(예외 목록 포함) | | A6 토큰 (앱) | grep | `custom_lint` 규칙 (`Color(0x`, `Colors.` 금지 in features) | -| A11 생성 파일 | 손으로 재실행 | CI에서 `build_runner` 돌린 뒤 `git diff --exit-code` | +| A11 생성 파일 | **된 것**: `mobile.yml`이 `build_runner` 후 `git diff --exit-code` | - | | A1 형식 | 눈 | commitlint / PR 제목 정규식 검사 | ## E. 팀이 아직 정해야 하는 것 diff --git a/docs/web-architecture.md b/docs/web-architecture.md index 0c41434..7134797 100644 --- a/docs/web-architecture.md +++ b/docs/web-architecture.md @@ -60,6 +60,8 @@ main.tsx ─► app ─► features ─► shared 기능 안에서는 `pages → components, hooks → api`. `api`가 `hooks`나 컴포넌트를 모른다. +표의 X는 ESLint `import-x/no-restricted-paths`(`eslint.config.js`)가 막는다. 기능 폴더 목록은 설정이 `src/features/`를 읽어 자동으로 만드므로 새 기능을 추가해도 설정을 고칠 필요가 없다. + `features → app/routes.ts`만 허용하는 이유: 링크를 만들려면 경로 상수가 필요한데, 경로를 기능마다 복사하면 바뀔 때 깨진다. `routes.ts`는 상수만 있고 아무것도 import하지 않으므로 순환이 생기지 않는다. ## 3. 상태 diff --git a/docs/workflow.md b/docs/workflow.md index e7cd4f0..61d17f9 100644 --- a/docs/workflow.md +++ b/docs/workflow.md @@ -65,8 +65,9 @@ Service를 인터페이스 없이 만들되 생성자 주입으로 받아 테스 앱 (`apps/mobile`): ```bash -fvm dart format --set-exit-if-changed lib test +fvm dart format --set-exit-if-changed lib test tool fvm flutter analyze +fvm dart run tool/check_imports.dart # import 방향 규칙 fvm flutter test ``` @@ -76,7 +77,7 @@ fvm flutter test pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build ``` -- 하나라도 실패한 채로 PR을 올리지 않는다. CI가 생기면 같은 명령을 돌린다. +- 하나라도 실패한 채로 PR을 올리지 않는다. CI(`.github/workflows/mobile.yml`, `web.yml`)가 PR마다 같은 명령을 돌리고, 바뀝 쪽 앱·웹만 실행한다. - 명령 통과는 시작일 뿐이다. 구조·명령 처리·화면 상태·토큰·문구·데이터·테스트는 [pr-checklist.md A절](./pr-checklist.md#a-작성자-체크-pr-올리기-전)로 한 번 더 본다. - 화면을 바꿨으면 캡처(앱: 바꾼 플랫폼, 웹: 모바일 폭)를 PR에 넣는다. - 경로에 한글이 있으면 `flutter analyze`가 크래시한다(analysis server 버그). 영문 경로에 복사해서 돌린다. From e07e3aaa485124c06d0e403902f363ad84a66b1f Mon Sep 17 00:00:00 2001 From: beomseok Date: Tue, 3 Nov 2026 00:39:09 +0900 Subject: [PATCH 14/23] =?UTF-8?q?docs:=20flavor=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EB=B2=95=EC=9D=84=20=EB=AC=B8=EC=84=9C=EC=97=90=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=ED=95=98=EA=B3=A0=20=EC=98=A4=EB=9E=98=EB=90=9C=20CI?= =?UTF-8?q?=20=ED=91=9C=EA=B8=B0=20=EC=A0=95=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AGENTS.md를 색인으로 줄일 때 환경 설명이 빠져서, flavor를 추가한 뒤에도 앱 ID·이름과 flavor 없는 빌드의 함정이 어디에도 적혀 있지 않았다. 새 clone 빌드와 시뮬레이터·에뮬레이터 실행으로 확인한 동작(Android는 flavor 없이 빌드 실패, iOS는 prod 앱 ID에 dev 환경)과 Xcode 직접 빌드 주의를 적는다. CI가 생긴 뒤에도 남은 "CI는 아직 없음"과 PR 템플릿에서 빠진 check_imports도 맞춘다. --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- AGENTS.md | 4 ++-- docs/mobile-architecture.md | 19 +++++++++++++++++++ docs/overview.md | 4 ++-- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a044073..7c3a055 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -25,7 +25,7 @@ ## 작성자 체크 (docs/pr-checklist.md A절) - [ ] A1 형식: 브랜치·커밋·PR 제목 규칙, PR 하나 = Task 하나 -- [ ] A2 자동 검증: 앱 format·analyze·test / 웹 format·lint·typecheck·test·build 전부 통과 +- [ ] A2 자동 검증: 앱 format·analyze·check_imports·test / 웹 format·lint·typecheck·test·build 전부 통과 (CI도 같은 검사) - [ ] A3 구조: 파일이 규칙 위치에 있고, features→app·다른 기능 내부 import 없음, 미래용 코드 없음 - [ ] A4 명령: 쓰기 요청은 버튼→ViewModel, 중복 실행 방지, 서버 판단을 화면에서 확정하지 않음 (해당 시) - [ ] A5 화면 상태: 로딩·빈·실패·정상 전부 있고 공통 위젯 사용 (해당 시) diff --git a/AGENTS.md b/AGENTS.md index bbfd725..64cea8c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ | --- | --- | | 전체를 그림으로 한 번에 (처음 읽을 때) | [docs/overview.md](./docs/overview.md) | | 일을 어떤 순서로 하나 (Jira → 브랜치 → 구현 순서 → 검증 → PR → 리뷰 → 릴리스) | [docs/workflow.md](./docs/workflow.md) | -| 앱 폴더에 어떤 파일이 들어가고 누가 누구를 import하나 | [docs/mobile-architecture.md](./docs/mobile-architecture.md) | +| 앱 폴더에 어떤 파일이 들어가고 누가 누구를 import하나, dev/prod flavor | [docs/mobile-architecture.md](./docs/mobile-architecture.md) | | 웹 폴더 구조·의존성·bridge·환경 | [docs/web-architecture.md](./docs/web-architecture.md) | | 색·간격·글자 크기 값과 바꾸는 절차 | [docs/design-tokens.md](./docs/design-tokens.md) | | PR 올리기 전·리뷰할 때 무엇을 왜 보나 | [docs/pr-checklist.md](./docs/pr-checklist.md) | @@ -41,7 +41,7 @@ Flutter 버전은 `apps/mobile/.fvmrc`, Node는 `apps/web/.nvmrc`·`packageManag 5. 로그아웃·계정 전환 시 세션·캐시·소켓·보안 저장소를 정리하고 이전 세션의 늦은 응답은 버린다. → [mobile 4절](./docs/mobile-architecture.md#4-상태를-어디에-두는가) 6. 토큰·개인정보는 로그·URL·prefs·분석 이벤트에 넣지 않는다. 인증 정보는 `FlutterSecureStorage`에만. → [checklist A9](./docs/pr-checklist.md#a9-데이터보안설정-위치) 7. 색·간격·모서리·글자 크기는 토큰만 쓴다. 토큰 변경은 앱·웹·문서를 한 PR에서. → [design-tokens](./docs/design-tokens.md) -8. 환경값은 앱 `app/env.dart`, 웹 `shared/config/env.ts`에서만 읽는다. 경로 문자열은 `AppRoutes`/`routes.ts`에만. +8. 환경값은 앱 `app/env.dart`, 웹 `shared/config/env.ts`에서만 읽는다. 경로 문자열은 `AppRoutes`/`routes.ts`에만. 앱 명령에는 항상 `--flavor dev|prod`를 붙인다. → [mobile 10절](./docs/mobile-architecture.md#10-환경flavor) 9. 생성 파일(`*.g.dart`, `*.freezed.dart`)은 손대지 않고 커밋한다. `any`, `// ignore:`, `eslint-disable`로 오류를 숨기지 않는다. 10. 테스트는 앱 `test/`에 `lib/` 미러, 웹은 파일 옆. 문구 고정·고정 sleep 금지. → [checklist A10](./docs/pr-checklist.md#a10-테스트) 11. PR 전 로컬 검증 전부 통과 + 체크리스트. DI·모델·라우팅·네이티브·bridge·토큰·의존성 변경은 PR 전에 상대에게 한 줄 알린다. → [workflow 4·5절](./docs/workflow.md#4-로컬-검증-pr-전-필수) diff --git a/docs/mobile-architecture.md b/docs/mobile-architecture.md index 5c06c45..d02d8cf 100644 --- a/docs/mobile-architecture.md +++ b/docs/mobile-architecture.md @@ -270,3 +270,22 @@ Service(DioException) ─► core/network/api_error_mapper ─► AppException | Provider | `xxxProvider` | `sessionProvider`, `performanceDetailProvider` | | 라우트 경로 | `AppRoutes`에만 | `AppRoutes.performanceDetail` | | 테스트 | `<파일>_test.dart`, 테스트명은 한국어 문장 | `'중복 탭은 한 번만 요청한다'` | + +## 10. 환경(flavor) + +dev와 prod는 네이티브 flavor로 나눈다. 앱 ID가 달라서 두 앱이 한 기기에 같이 설치된다. + +| | dev | prod | +| --- | --- | --- | +| 실행 | `fvm flutter run --flavor dev` | `fvm flutter run --flavor prod` | +| 빌드 | `fvm flutter build apk\|ipa --flavor dev` | `fvm flutter build apk\|ipa --flavor prod` | +| 앱 ID (Android `applicationId`, iOS bundle id) | `com.ject.highfive.dev` | `com.ject.highfive` | +| 홈 화면 이름 | `highfive DEV` | `highfive` | +| 환경값 (`app/env.dart`) | `Flavor.dev`: dev API 주소 | `Flavor.prod`: prod API 주소 | +| 화면 | 왼쪽 위 `DEV` 배너 | 배너 없음 | + +- 값이 정해지는 순서: `--flavor dev`를 주면 Flutter가 `FLUTTER_APP_FLAVOR=dev`를 넣고, `AppEnv.fromEnvironment()`가 그 값을 먼저 읽는다. 없으면 `--dart-define=FLAVOR`(flavor 없이 도는 테스트·도구용)를, 그것도 없으면 dev를 쓴다. 모르는 값이면 시작할 때 바로 실패한다. +- 설정 위치: Android는 `android/app/build.gradle.kts`의 `productFlavors`다. 앱 이름은 `resValue("string", "app_name", ...)`로 넣고, AGP 9는 이 기능이 기본으로 꺼져 있어 `buildFeatures.resValues = true`가 필요하다. iOS는 빌드 구성 `Debug-dev`·`Release-dev`·`Profile-dev`(prod도 같은 셋)와 공유 스킴 `dev`·`prod`다. Flutter는 스킴 이름이 flavor 이름과 같아야 찾는다. iOS 앱 이름은 빌드 설정 `APP_DISPLAY_NAME`이 `Info.plist`의 `CFBundleDisplayName`으로 들어간다. +- **명령에는 항상 `--flavor`를 붙인다.** Android는 flavor 없이 빌드하면 `Gradle build failed to produce an .apk file` 오류로 실패한다. iOS는 원래 `Runner` 스킴이 남아 있어 flavor 없이도 빌드되지만, 결과는 prod 앱 ID에 dev 환경(DEV 배너·dev API)이 섞인 앱이다. 이 빌드는 배포에 쓰지 않는다. +- Xcode에서 직접 Run·Archive하지 않는다. 그때 Dart 쪽 flavor는 고른 스킴이 아니라, 마지막 `fvm flutter` 명령이 `ios/Flutter/Generated.xcconfig`에 남긴 `FLAVOR` 값을 따른다(flutter_tools `bin/xcode_backend.dart`). 그래서 스킴과 환경이 어긋날 수 있다. +- CocoaPods를 쓰게 되면 `ios/Podfile`의 `project 'Runner', {...}`에 새 구성 6개를 매핑해야 한다(`Debug-dev`는 `:debug`, `Release-dev`·`Profile-dev`는 `:release`, prod도 같게). 각 구성의 Pods xcconfig도 include해야 한다. 지금은 SwiftPM을 써서 Podfile이 없다. diff --git a/docs/overview.md b/docs/overview.md index 2196936..7e63fb0 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -11,7 +11,7 @@ flowchart LR repo --> mobile["apps/mobile
Flutter 3.47.9 · fvm"] repo --> web["apps/web
React 19 · TypeScript · Vite 8 · pnpm"] repo --> docs["docs/
규칙 문서"] - repo --> gh[".github/
PR 템플릿"] + repo --> gh[".github/
PR 템플릿 · CI"] repo --> agents["AGENTS.md
항상 지킬 것 + 문서 지도"] ``` @@ -20,7 +20,7 @@ flowchart LR | `apps/mobile` | Flutter 앱. 로그인·공연·신청·채팅·티켓·QR | `cd apps/mobile && fvm flutter ...` | | `apps/web` | 공개 웹(이벤트·공지·FAQ) + 관객용 모바일 웹(예정) | `cd apps/web && pnpm ...` | | `docs` | 작업 흐름, 앱·웹 구조, 디자인 토큰, PR 체크리스트 | - | -| `.github` | PR 템플릿. CI는 아직 없음 | - | +| `.github` | PR 템플릿, CI(`workflows/mobile.yml`·`web.yml`: PR마다 앱·웹 검증) | - | ## 2. 전체 그림: 누가 누구와 통신하나 From 9a9db857520c93b89ad42abc30e8966f6d57ba64 Mon Sep 17 00:00:00 2001 From: beomseok Date: Tue, 3 Nov 2026 00:39:09 +0900 Subject: [PATCH 15/23] =?UTF-8?q?chore:=20env=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=9D=B4=EB=A6=84=EC=9D=84=20=ED=95=9C=EA=B5=AD?= =?UTF-8?q?=EC=96=B4=20=EB=AC=B8=EC=9E=A5=EC=9C=BC=EB=A1=9C=20=EB=A7=9E?= =?UTF-8?q?=EC=B6=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 테스트명은 한국어 문장으로 쓴다는 규칙(mobile-architecture 9절)과 다른 테스트에 맞춘다. --- apps/mobile/test/app/env_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/mobile/test/app/env_test.dart b/apps/mobile/test/app/env_test.dart index d92655c..4f1f7f4 100644 --- a/apps/mobile/test/app/env_test.dart +++ b/apps/mobile/test/app/env_test.dart @@ -2,7 +2,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:highfive/app/env.dart'; void main() { - test('fromEnvironment resolves dev when no flavor is defined', () { + test('flavor 정의가 없으면 dev로 정한다', () { final env = AppEnv.fromEnvironment(); expect(env.flavor, Flavor.dev); From 22cabea4bd11185159131ddd0a3a8fac896cfd09 Mon Sep 17 00:00:00 2001 From: beomseok Date: Tue, 3 Nov 2026 11:21:03 +0900 Subject: [PATCH 16/23] =?UTF-8?q?fix:=20import=20=EA=B2=80=EC=82=AC?= =?UTF-8?q?=EA=B8=B0=EA=B0=80=20=EB=AC=B8=EC=84=9C=202=EC=A0=88=EC=9D=98?= =?UTF-8?q?=20=EB=B0=A9=ED=96=A5=20=EA=B7=9C=EC=B9=99=EC=9D=84=20=EB=AA=A8?= =?UTF-8?q?=EB=91=90=20=EA=B2=80=EC=82=AC=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 게이트 리뷰에서 다른 기능의 Service·DTO import, models의 core/shared import, View·ViewModel의 data 직접 import가 통과하는 것이 드러났다. 문서와 체크리스트는 이 검사가 막는다고 안내하므로 같은 기능 안 층별 허용 목록과 기능 간 계약(data/repositories·models)을 그대로 검사한다. --- apps/mobile/tool/check_imports.dart | 68 +++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 13 deletions(-) diff --git a/apps/mobile/tool/check_imports.dart b/apps/mobile/tool/check_imports.dart index 14846f6..6a23a96 100644 --- a/apps/mobile/tool/check_imports.dart +++ b/apps/mobile/tool/check_imports.dart @@ -79,25 +79,66 @@ String? _violation(String from, String to) { }; } +/// 같은 기능 안에서 각 층이 import할 수 있는 층 (mobile-architecture 2절의 화살표). +const _allowedInFeature = >{ + 'presentation/views': { + 'presentation/views', + 'presentation/widgets', + 'presentation/view_models', + 'presentation/providers', + 'models', + }, + 'presentation/widgets': { + 'presentation/widgets', + 'presentation/view_models', + 'presentation/providers', + 'models', + }, + 'presentation/view_models': { + 'presentation/view_models', + 'presentation/providers', + 'data/repositories', + 'models', + }, + 'presentation/providers': { + 'presentation/providers', + 'presentation/view_models', + 'data/repositories', + 'data/services', + 'models', + }, + 'data/repositories': { + 'data/repositories', + 'data/services', + 'data/dto', + 'models', + }, + 'data/services': {'data/services', 'data/dto'}, + 'data/dto': {'data/dto', 'models'}, + 'models': {'models'}, +}; + +/// 다른 기능에서 가져다 쓸 수 있는 계약. +const _crossFeatureContracts = {'data/repositories', 'models'}; + String? _featureViolation(_Layer f, _Layer t) { if (t.name == 'app') { return 'features는 app을 import하지 않는다 (연결 Provider는 presentation/providers 에)'; } + if (f.sub == 'models' && t.name != 'features') { + return 'models는 패키지만 import한다'; + } if (t.name != 'features') return null; if (f.feature != t.feature) { - if (t.sub == 'presentation') { - return '다른 기능의 presentation을 import하지 않는다 (data/repositories·models 계약만)'; - } - return null; + if (_crossFeatureContracts.contains(t.sub)) return null; + return '다른 기능은 data/repositories·models만 import한다 (${t.sub} 금지)'; } - if (f.sub.startsWith('data') && t.sub == 'presentation') { - return 'data는 presentation을 모른다'; - } - if (f.sub == 'models' && t.sub != 'models') { - return 'models는 패키지만 import한다'; + final allowed = _allowedInFeature[f.sub]; + if (allowed != null) { + return allowed.contains(t.sub) ? null : '${f.sub}는 ${t.sub}를 import하지 않는다'; } - if (f.sub == 'data/services' && t.sub == 'data/repositories') { - return 'services는 repositories를 import하지 않는다'; + if (f.sub.startsWith('data') && t.sub.startsWith('presentation')) { + return 'data는 presentation을 모른다'; } return null; } @@ -118,8 +159,9 @@ class _Layer { return _Layer(parts.first); case 'features': if (parts.length < 3) return null; - final sub = parts[2] == 'data' && parts.length > 4 - ? 'data/${parts[3]}' + final layered = parts[2] == 'data' || parts[2] == 'presentation'; + final sub = layered && parts.length > 4 + ? '${parts[2]}/${parts[3]}' : parts[2]; return _Layer('features', feature: parts[1], sub: sub); default: From e2fd4401f39333e62e5f500dc130be88f0c490c2 Mon Sep 17 00:00:00 2001 From: beomseok Date: Tue, 3 Nov 2026 11:21:03 +0900 Subject: [PATCH 17/23] =?UTF-8?q?docs:=20Xcode=20=EC=A7=81=EC=A0=91=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EB=95=8C=20flavor=EA=B0=80=20=EC=A0=95?= =?UTF-8?q?=ED=95=B4=EC=A7=80=EB=8A=94=20=EB=B0=A9=EC=8B=9D=20=EC=A0=95?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit flutter_tools 3.47.9는 iOS에서 빌드 구성 이름(Debug-dev)을 스킴 이름과 맞춰 flavor를 정하므로, 스킴과 무관하다던 설명이 틀렸다. 구성 이름에 flavor가 없는 Runner 스킴만 Generated.xcconfig 값에 기대므로 그 스킴을 쓰지 않도록 고친다. --- docs/mobile-architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mobile-architecture.md b/docs/mobile-architecture.md index d02d8cf..c6136ee 100644 --- a/docs/mobile-architecture.md +++ b/docs/mobile-architecture.md @@ -287,5 +287,5 @@ dev와 prod는 네이티브 flavor로 나눈다. 앱 ID가 달라서 두 앱이 - 값이 정해지는 순서: `--flavor dev`를 주면 Flutter가 `FLUTTER_APP_FLAVOR=dev`를 넣고, `AppEnv.fromEnvironment()`가 그 값을 먼저 읽는다. 없으면 `--dart-define=FLAVOR`(flavor 없이 도는 테스트·도구용)를, 그것도 없으면 dev를 쓴다. 모르는 값이면 시작할 때 바로 실패한다. - 설정 위치: Android는 `android/app/build.gradle.kts`의 `productFlavors`다. 앱 이름은 `resValue("string", "app_name", ...)`로 넣고, AGP 9는 이 기능이 기본으로 꺼져 있어 `buildFeatures.resValues = true`가 필요하다. iOS는 빌드 구성 `Debug-dev`·`Release-dev`·`Profile-dev`(prod도 같은 셋)와 공유 스킴 `dev`·`prod`다. Flutter는 스킴 이름이 flavor 이름과 같아야 찾는다. iOS 앱 이름은 빌드 설정 `APP_DISPLAY_NAME`이 `Info.plist`의 `CFBundleDisplayName`으로 들어간다. - **명령에는 항상 `--flavor`를 붙인다.** Android는 flavor 없이 빌드하면 `Gradle build failed to produce an .apk file` 오류로 실패한다. iOS는 원래 `Runner` 스킴이 남아 있어 flavor 없이도 빌드되지만, 결과는 prod 앱 ID에 dev 환경(DEV 배너·dev API)이 섞인 앱이다. 이 빌드는 배포에 쓰지 않는다. -- Xcode에서 직접 Run·Archive하지 않는다. 그때 Dart 쪽 flavor는 고른 스킴이 아니라, 마지막 `fvm flutter` 명령이 `ios/Flutter/Generated.xcconfig`에 남긴 `FLAVOR` 값을 따른다(flutter_tools `bin/xcode_backend.dart`). 그래서 스킴과 환경이 어긋날 수 있다. +- Xcode에서 직접 빌드할 때 Dart 쪽 flavor는 빌드 구성 이름에서 정해진다. `Debug-dev`처럼 `-` 뒤 이름이 스킴 이름과 같으면 그 flavor를 쓴다(flutter_tools `parseFlavorFromConfiguration`). 그래서 `dev`·`prod` 스킴을 고르면 맞게 들어간다. `Runner` 스킴(구성 `Debug`)은 구성 이름에 flavor가 없어서 마지막 `fvm flutter` 명령이 `ios/Flutter/Generated.xcconfig`에 남긴 `FLAVOR` 값을 쓴다. 그러니 Xcode에서는 `Runner` 스킴으로 빌드하지 않는다. - CocoaPods를 쓰게 되면 `ios/Podfile`의 `project 'Runner', {...}`에 새 구성 6개를 매핑해야 한다(`Debug-dev`는 `:debug`, `Release-dev`·`Profile-dev`는 `:release`, prod도 같게). 각 구성의 Pods xcconfig도 include해야 한다. 지금은 SwiftPM을 써서 Podfile이 없다. From 1fffdf29f107f0644b7ab560ab9726c6f2641199 Mon Sep 17 00:00:00 2001 From: beomseok Date: Tue, 3 Nov 2026 14:54:33 +0900 Subject: [PATCH 18/23] =?UTF-8?q?fix:=20=EA=B8=B0=EB=B3=B8=20=EA=B8=80?= =?UTF-8?q?=EC=9E=90=EC=83=89=EC=9D=B4=20textPrimary=20=ED=86=A0=ED=81=B0?= =?UTF-8?q?=EC=9D=84=20=EB=94=B0=EB=A5=B4=EB=8F=84=EB=A1=9D=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit textTheme에 색을 지정하지 않아 Material 3 기본값(시드에서 만든 onSurface)이 글자색으로 쓰였다. 토큰 규칙대로 본문 색을 쓰도록 colorScheme의 onSurface를 textPrimary로 맞춘다. --- apps/mobile/lib/shared/theme/app_theme.dart | 2 ++ .../test/shared/theme/app_theme_test.dart | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 apps/mobile/test/shared/theme/app_theme_test.dart diff --git a/apps/mobile/lib/shared/theme/app_theme.dart b/apps/mobile/lib/shared/theme/app_theme.dart index 94d0a89..cac890b 100644 --- a/apps/mobile/lib/shared/theme/app_theme.dart +++ b/apps/mobile/lib/shared/theme/app_theme.dart @@ -12,6 +12,8 @@ abstract final class AppTheme { primary: AppColors.light.primary, onPrimary: AppColors.light.onPrimary, surface: AppColors.light.surface, + // Material 3의 기본 글자색은 onSurface다. 토큰의 본문 색으로 맞춘다. + onSurface: AppColors.light.textPrimary, error: AppColors.light.danger, ), scaffoldBackgroundColor: AppColors.light.background, diff --git a/apps/mobile/test/shared/theme/app_theme_test.dart b/apps/mobile/test/shared/theme/app_theme_test.dart new file mode 100644 index 0000000..8bd6408 --- /dev/null +++ b/apps/mobile/test/shared/theme/app_theme_test.dart @@ -0,0 +1,18 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:highfive/shared/theme/app_colors.dart'; +import 'package:highfive/shared/theme/app_theme.dart'; + +void main() { + test('글자 스타일의 색은 textPrimary 토큰이다', () { + final t = AppTheme.light.textTheme; + + for (final style in [ + t.headlineSmall, + t.titleLarge, + t.bodyMedium, + t.bodySmall, + ]) { + expect(style?.color, AppColors.light.textPrimary); + } + }); +} From b70208fef9e39441dc47932e1010a9b678c674f4 Mon Sep 17 00:00:00 2001 From: beomseok Date: Tue, 3 Nov 2026 14:54:33 +0900 Subject: [PATCH 19/23] =?UTF-8?q?fix:=20import=20=EA=B2=80=EC=82=AC?= =?UTF-8?q?=EA=B8=B0=EA=B0=80=20=EC=A1=B0=EA=B1=B4=EB=B6=80=C2=B7=EC=97=AC?= =?UTF-8?q?=EB=9F=AC=20=EC=A4=84=20import=EC=99=80=20models=EC=9D=98=20flu?= =?UTF-8?q?tter=20import=EA=B9=8C=EC=A7=80=20=EA=B2=80=EC=82=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 줄 단위 정규식이라 조건부 import의 if 쪽 URI, 여러 줄 지시문, models의 package:flutter import가 검사되지 않았다. 지시문을 세미콜론까지 모으고 주석을 지운 뒤 모든 URI를 검사하며, 검사 로직이 다시 깨지지 않도록 회귀 테스트를 둔다. --- apps/mobile/test/tool/check_imports_test.dart | 145 ++++++++++++++++++ apps/mobile/tool/check_imports.dart | 97 ++++++++++-- 2 files changed, 229 insertions(+), 13 deletions(-) create mode 100644 apps/mobile/test/tool/check_imports_test.dart diff --git a/apps/mobile/test/tool/check_imports_test.dart b/apps/mobile/test/tool/check_imports_test.dart new file mode 100644 index 0000000..c1753ba --- /dev/null +++ b/apps/mobile/test/tool/check_imports_test.dart @@ -0,0 +1,145 @@ +import 'package:flutter_test/flutter_test.dart'; + +import '../../tool/check_imports.dart' as checker; + +const _views = 'features/auth/presentation/views/v.dart'; + +void main() { + // (설명, from, source, 위반이어야 하는가) + const cases = <(String, String, String, bool)>[ + ( + '기능에서 app을 import하면 막는다', + _views, + "import '../../../../app/router.dart';", + true, + ), + ( + '다른 기능의 service는 막는다', + _views, + "import '../../../payments/data/services/s.dart';", + true, + ), + ( + '다른 기능의 dto는 막는다', + _views, + "import '../../../payments/data/dto/d.dart';", + true, + ), + ( + '다른 기능의 repository는 허용한다', + _views, + "import '../../../payments/data/repositories/r.dart';", + false, + ), + ( + '다른 기능의 model은 허용한다', + _views, + "import '../../../payments/models/m.dart';", + false, + ), + ( + 'View가 repository를 직접 쓰면 막는다', + _views, + "import '../../data/repositories/r.dart';", + true, + ), + ( + 'ViewModel이 service를 직접 쓰면 막는다', + 'features/auth/presentation/view_models/vm.dart', + "import '../../data/services/s.dart';", + true, + ), + ( + 'ViewModel은 repository를 쓸 수 있다', + 'features/auth/presentation/view_models/vm.dart', + "import '../../data/repositories/r.dart';", + false, + ), + ( + 'repository가 presentation을 쓰면 막는다', + 'features/auth/data/repositories/r.dart', + "import '../../presentation/providers/p.dart';", + true, + ), + ( + 'service가 repository를 쓰면 막는다', + 'features/auth/data/services/s.dart', + "import '../repositories/r.dart';", + true, + ), + ( + 'model이 core를 쓰면 막는다', + 'features/auth/models/m.dart', + "import '../../../core/network/dio_client.dart';", + true, + ), + ( + 'model이 flutter를 쓰면 막는다', + 'features/auth/models/m.dart', + "import 'package:flutter/material.dart';", + true, + ), + ( + 'View는 flutter를 쓸 수 있다', + _views, + "import 'package:flutter/material.dart';", + false, + ), + ( + 'shared가 features를 쓰면 막는다', + 'shared/theme/t.dart', + "import '../../features/auth/models/m.dart';", + true, + ), + ( + 'core가 shared를 쓰면 막는다', + 'core/network/n.dart', + "import '../../shared/theme/app_colors.dart';", + true, + ), + ( + 'export도 검사한다', + 'features/auth/models/m.dart', + "export '../data/dto/d.dart';", + true, + ), + ( + '조건부 import의 if 쪽 URI도 검사한다', + 'features/auth/data/services/s.dart', + "import 'stub.dart' if (dart.library.io) 'package:highfive/app/env.dart';", + true, + ), + ( + '여러 줄에 걸친 import도 검사한다', + _views, + "import\n '../../../../app/router.dart';", + true, + ), + ( + '블록 주석 안의 import는 무시한다', + _views, + "/*\nimport '../../../../app/router.dart';\n*/", + false, + ), + ( + '지시문 안 주석의 URI는 무시한다', + _views, + "import '../../../payments/models/m.dart' // '../../../../app/router.dart'\n ;", + false, + ), + ]; + + for (final (name, from, source, isViolation) in cases) { + test(name, () { + expect(checker.findViolations(from, source).isNotEmpty, isViolation); + }); + } + + test('위반 줄 번호는 지시문이 시작한 줄이다', () { + const source = + "import 'package:flutter/material.dart';\n\nimport '../../../../app/router.dart';"; + final found = checker.findViolations(_views, source); + + expect(found.map((v) => v.line), [3]); + }); +} diff --git a/apps/mobile/tool/check_imports.dart b/apps/mobile/tool/check_imports.dart index 6a23a96..08b1355 100644 --- a/apps/mobile/tool/check_imports.dart +++ b/apps/mobile/tool/check_imports.dart @@ -1,9 +1,7 @@ -// lib/ 안 import가 docs/mobile-architecture.md 2절의 방향 규칙을 지키는지 검사한다. +// lib/ 안 import·export가 docs/mobile-architecture.md 2절의 방향 규칙을 지키는지 검사한다. // 실행: fvm dart run tool/check_imports.dart (위반이 있으면 종료 코드 1) import 'dart:io'; -final _importPattern = RegExp(r'''^\s*(?:import|export)\s+['"]([^'"]+)['"]'''); - void main() { final libDir = Directory('lib'); if (!libDir.existsSync()) { @@ -19,15 +17,8 @@ void main() { final violations = []; for (final file in files) { final from = _libRelative(file.path); - for (final (lineNo, line) in file.readAsLinesSync().indexed) { - final match = _importPattern.firstMatch(line); - if (match == null) continue; - final to = _resolve(from, match.group(1)!); - if (to == null) continue; - final reason = _violation(from, to); - if (reason != null) { - violations.add('${file.path}:${lineNo + 1} → $to\n $reason'); - } + for (final v in findViolations(from, file.readAsStringSync())) { + violations.add('${file.path}:${v.line} → ${v.target}\n ${v.reason}'); } } @@ -42,12 +33,82 @@ void main() { exit(1); } +class Violation { + const Violation(this.line, this.target, this.reason); + + final int line; + final String target; + final String reason; +} + +/// `import`·`export` 지시문 하나 (키워드부터 `;`까지, 여러 줄 가능). +final _directive = RegExp(r'^[ \t]*(?:import|export)\b[^;]*;', multiLine: true); + +/// 지시문 안의 모든 URI. 조건부 import의 `if (...) 'uri'`도 포함한다. +final _uri = RegExp(r'''(['"])(.*?)\1'''); + +/// [from](lib 기준 경로) 파일의 [source]에서 방향 규칙 위반을 찾는다. +List findViolations(String from, String source) { + final code = _blankComments(source); + final found = []; + for (final d in _directive.allMatches(code)) { + final line = '\n'.allMatches(code.substring(0, d.start)).length + 1; + for (final u in _uri.allMatches(d.group(0)!)) { + final uri = u.group(2)!; + final to = _resolve(from, uri); + final reason = to == null + ? _packageViolation(from, uri) + : _violation(from, to); + if (reason != null) found.add(Violation(line, to ?? uri, reason)); + } + } + return found; +} + +/// 주석을 같은 길이의 공백으로 바꾼다(줄 번호 유지). 따옴표 안의 `//`·`/*`는 건드리지 않는다. +String _blankComments(String s) { + final b = StringBuffer(); + String? quote; + var i = 0; + while (i < s.length) { + final c = s[i]; + if (quote != null) { + if (c == r'\' && i + 1 < s.length) { + b.write(s.substring(i, i + 2)); + i += 2; + continue; + } + if (c == quote) quote = null; + b.write(c); + i++; + } else if (c == "'" || c == '"') { + quote = c; + b.write(c); + i++; + } else if (s.startsWith('//', i)) { + final end = s.indexOf('\n', i); + final stop = end == -1 ? s.length : end; + b.write(' ' * (stop - i)); + i = stop; + } else if (s.startsWith('/*', i)) { + final end = s.indexOf('*/', i + 2); + final stop = end == -1 ? s.length : end + 2; + b.write(s.substring(i, stop).replaceAll(RegExp(r'[^\n]'), ' ')); + i = stop; + } else { + b.write(c); + i++; + } + } + return b.toString(); +} + String _libRelative(String path) { final idx = path.indexOf('lib/'); return path.substring(idx + 4).replaceAll(r'\', '/'); } -/// `package:highfive/...` 와 상대 경로만 lib 기준 경로로 바꾼다. 그 외(dart:, 다른 패키지)는 무시. +/// `package:highfive/...` 와 상대 경로만 lib 기준 경로로 바꾼다. 그 외(dart:, 다른 패키지)는 null. String? _resolve(String from, String uri) { const pkg = 'package:highfive/'; if (uri.startsWith(pkg)) return uri.substring(pkg.length); @@ -64,6 +125,16 @@ String? _resolve(String from, String uri) { return parts.join('/'); } +/// 외부 패키지 규칙: models는 flutter를 모른다. +String? _packageViolation(String from, String uri) { + final f = _Layer.of(from); + final isFlutter = uri.startsWith('package:flutter/') || uri == 'dart:ui'; + if (isFlutter && f != null && f.name == 'features' && f.sub == 'models') { + return 'models는 flutter를 import하지 않는다 (패키지만)'; + } + return null; +} + String? _violation(String from, String to) { final f = _Layer.of(from); final t = _Layer.of(to); From 0622b6d9129b121b04d5ce35f4193d7523d7480e Mon Sep 17 00:00:00 2001 From: beomseok Date: Tue, 3 Nov 2026 14:54:33 +0900 Subject: [PATCH 20/23] =?UTF-8?q?refactor:=20AppEnv=EC=9D=98=20flavor=20?= =?UTF-8?q?=EB=A7=A4=ED=95=91=EC=9D=84=20=EB=B6=84=EB=A6=AC=ED=95=B4=20pro?= =?UTF-8?q?d=20=EA=B2=BD=EB=A1=9C=EB=8F=84=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI의 flutter test는 flavor 값을 주지 않아 prod 분기가 한 번도 실행되지 않았다. 이름으로 환경을 고르는 부분을 분리해 prod·모르는 이름까지 검사한다. --- apps/mobile/lib/app/env.dart | 5 +++++ apps/mobile/test/app/env_test.dart | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/apps/mobile/lib/app/env.dart b/apps/mobile/lib/app/env.dart index 2e4c880..03fa7a6 100644 --- a/apps/mobile/lib/app/env.dart +++ b/apps/mobile/lib/app/env.dart @@ -15,6 +15,11 @@ class AppEnv { const name = bool.hasEnvironment('FLUTTER_APP_FLAVOR') ? String.fromEnvironment('FLUTTER_APP_FLAVOR') : String.fromEnvironment('FLAVOR', defaultValue: 'dev'); + return AppEnv.forFlavorName(name); + } + + /// flavor 이름으로 환경값을 고른다. 모르는 이름이면 [ArgumentError]. + factory AppEnv.forFlavorName(String name) { return switch (Flavor.values.byName(name)) { Flavor.dev => const AppEnv( flavor: Flavor.dev, diff --git a/apps/mobile/test/app/env_test.dart b/apps/mobile/test/app/env_test.dart index 4f1f7f4..9de94b2 100644 --- a/apps/mobile/test/app/env_test.dart +++ b/apps/mobile/test/app/env_test.dart @@ -8,4 +8,16 @@ void main() { expect(env.flavor, Flavor.dev); expect(env.isDev, isTrue); }); + + test('prod 이름은 prod 환경과 dev와 다른 API 주소로 정한다', () { + final prod = AppEnv.forFlavorName('prod'); + + expect(prod.flavor, Flavor.prod); + expect(prod.isDev, isFalse); + expect(prod.apiBaseUrl, isNot(AppEnv.forFlavorName('dev').apiBaseUrl)); + }); + + test('모르는 flavor 이름이면 바로 실패한다', () { + expect(() => AppEnv.forFlavorName('staging'), throwsArgumentError); + }); } From de04fefd4ff15f8cbf5977b152285fde86700f67 Mon Sep 17 00:00:00 2001 From: beomseok Date: Tue, 3 Nov 2026 14:55:46 +0900 Subject: [PATCH 21/23] =?UTF-8?q?feat:=20=EC=9B=B9=EC=97=90=20=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EA=B2=BD=EB=A1=9C=20=EC=95=88=EB=82=B4=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 등록되지 않은 URL은 React Router 기본 오류 화면이 떠서 공유 링크를 잘못 연 관객이 갈 곳이 없었다. 와일드카드 경로에 안내와 처음으로 가는 링크를 둔다. --- apps/web/src/app/NotFoundPage.module.css | 9 +++++++++ apps/web/src/app/NotFoundPage.tsx | 15 +++++++++++++++ apps/web/src/app/router.test.tsx | 11 +++++++++++ apps/web/src/app/router.tsx | 2 ++ apps/web/src/app/routes.ts | 2 +- docs/overview.md | 1 + docs/web-architecture.md | 2 +- 7 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/app/NotFoundPage.module.css create mode 100644 apps/web/src/app/NotFoundPage.tsx diff --git a/apps/web/src/app/NotFoundPage.module.css b/apps/web/src/app/NotFoundPage.module.css new file mode 100644 index 0000000..84e55a1 --- /dev/null +++ b/apps/web/src/app/NotFoundPage.module.css @@ -0,0 +1,9 @@ +.page { + padding: var(--space-4); + max-width: 480px; /* 레이아웃 폭은 토큰이 아니다 (web-architecture.md 4절) */ + margin: 0 auto; +} + +.link { + color: var(--color-primary); +} diff --git a/apps/web/src/app/NotFoundPage.tsx b/apps/web/src/app/NotFoundPage.tsx new file mode 100644 index 0000000..fcb622f --- /dev/null +++ b/apps/web/src/app/NotFoundPage.tsx @@ -0,0 +1,15 @@ +import { Link } from 'react-router'; +import styles from './NotFoundPage.module.css'; +import { routes } from './routes'; + +export function NotFoundPage() { + return ( +
+

페이지를 찾을 수 없어요

+

주소가 바뀌었거나 없는 페이지예요.

+ + 처음으로 가기 + +
+ ); +} diff --git a/apps/web/src/app/router.test.tsx b/apps/web/src/app/router.test.tsx index cedef60..422aa2e 100644 --- a/apps/web/src/app/router.test.tsx +++ b/apps/web/src/app/router.test.tsx @@ -17,4 +17,15 @@ describe('app router', () => { expect(screen.getByRole('heading', { level: 1 })).toBeDefined(); router.dispose(); }); + + it('없는 경로는 NotFoundPage로 보내고 처음으로 가는 링크를 준다', async () => { + const router = createMemoryRouter(appRoutes, { initialEntries: ['/no-such-page'] }); + + render(); + + const link = await screen.findByRole('link'); + expect(link.getAttribute('href')).toBe(routes.home); + expect(router.state.matches.at(-1)?.route.path).toBe(routes.notFound); + router.dispose(); + }); }); diff --git a/apps/web/src/app/router.tsx b/apps/web/src/app/router.tsx index 3ef819a..a17442a 100644 --- a/apps/web/src/app/router.tsx +++ b/apps/web/src/app/router.tsx @@ -1,10 +1,12 @@ import { createBrowserRouter, Navigate, type RouteObject } from 'react-router'; import { NoticeListPage } from '../features/notices/pages/NoticeListPage'; +import { NotFoundPage } from './NotFoundPage'; import { routes } from './routes'; export const appRoutes: RouteObject[] = [ { path: routes.home, element: }, { path: routes.notices, element: }, + { path: routes.notFound, element: }, ]; export const router = createBrowserRouter(appRoutes); diff --git a/apps/web/src/app/routes.ts b/apps/web/src/app/routes.ts index 57fce7f..2b9c4a3 100644 --- a/apps/web/src/app/routes.ts +++ b/apps/web/src/app/routes.ts @@ -1 +1 @@ -export const routes = { home: '/', notices: '/notices' } as const; +export const routes = { home: '/', notices: '/notices', notFound: '*' } as const; diff --git a/docs/overview.md b/docs/overview.md index 7e63fb0..8bb3bbc 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -244,6 +244,7 @@ flowchart TB ```mermaid flowchart LR slash["/"] -->|"redirect"| notices["/notices
NoticeListPage (자리만)"] + other["그 밖의 경로"] --> nf["NotFoundPage
처음으로 가는 링크"] ``` | 파일 | 값 | 쓰이는 때 | diff --git a/docs/web-architecture.md b/docs/web-architecture.md index 7134797..b1218c6 100644 --- a/docs/web-architecture.md +++ b/docs/web-architecture.md @@ -15,7 +15,7 @@ src/ │ ├── router.tsx (있음) appRoutes(RouteObject[]) + createBrowserRouter │ ├── router.test.tsx (있음) │ ├── providers.tsx QueryClientProvider 등 전역 Provider (필요해지면) -│ └── NotFoundPage.tsx 잘못된 경로 (첫 공개 페이지 만들 때) +│ └── NotFoundPage.tsx (있음) 없는 경로 안내 + 처음으로 가는 링크 (`routes.notFound` = `*`) │ ├── shared/ 도메인을 모르는 공통 코드 │ ├── config/env.ts (있음) VITE_FLAVOR, VITE_API_BASE_URL 읽기·검증. 아무것도 import하지 않는다 From f9e81027cd5944b12f67cf4b1b2fbf654623c7c4 Mon Sep 17 00:00:00 2001 From: beomseok Date: Tue, 3 Nov 2026 14:55:46 +0900 Subject: [PATCH 22/23] =?UTF-8?q?docs:=20=EA=B2=80=EC=A6=9D=20=EB=AA=85?= =?UTF-8?q?=EB=A0=B9=EC=9D=84=20CI=EC=99=80=20=EB=A7=9E=EC=B6=94=EA=B3=A0?= =?UTF-8?q?=20=ED=86=A0=ED=81=B0=20=EB=8B=A8=EA=B3=84=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20=EA=B7=9C=EC=B9=99=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit README·체크리스트의 검증 명령이 CI보다 적어(build_runner diff, build:dev, 포맷 검사) 로컬에서 통과해도 CI가 실패할 수 있었고, CI가 모든 PR에서 돈다고 잘못 적혀 있었다. 토큰 문서는 새 단계 추가와 한 화면용 값 금지가 충돌해 범용 단계만 추가한다로 정리한다. --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- AGENTS.md | 5 +++-- README.md | 4 +++- docs/design-tokens.md | 4 ++-- docs/pr-checklist.md | 4 ++-- docs/workflow.md | 5 +++-- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7c3a055..1cc9008 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -25,7 +25,7 @@ ## 작성자 체크 (docs/pr-checklist.md A절) - [ ] A1 형식: 브랜치·커밋·PR 제목 규칙, PR 하나 = Task 하나 -- [ ] A2 자동 검증: 앱 format·analyze·check_imports·test / 웹 format·lint·typecheck·test·build 전부 통과 (CI도 같은 검사) +- [ ] A2 자동 검증: 앱 format·analyze·check_imports·test / 웹 format·lint·typecheck·test·build·build:dev 전부 통과 (앱·웹 파일이 바뀐 PR이면 CI도 같은 검사) - [ ] A3 구조: 파일이 규칙 위치에 있고, features→app·다른 기능 내부 import 없음, 미래용 코드 없음 - [ ] A4 명령: 쓰기 요청은 버튼→ViewModel, 중복 실행 방지, 서버 판단을 화면에서 확정하지 않음 (해당 시) - [ ] A5 화면 상태: 로딩·빈·실패·정상 전부 있고 공통 위젯 사용 (해당 시) diff --git a/AGENTS.md b/AGENTS.md index 64cea8c..86ca49a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,14 +17,15 @@ apps/mobile/ Flutter 앱. 명령은 이 폴더에서 `fvm flutter ...` apps/web/ React + TypeScript + Vite. 명령은 이 폴더에서 `pnpm ...` docs/ 규칙 문서. BE API 명세는 docs/api/ 에 둔다 -.github/ PR 템플릿, CI (mobile.yml · web.yml — PR마다 아래 검증을 돌린다) +.github/ PR 템플릿, CI (mobile.yml · web.yml — 앱·웹 파일이 바뀐 PR마다 아래 검증을 돌린다) ``` | | 앱 (`apps/mobile`) | 웹 (`apps/web`) | | --- | --- | --- | | 설치 | `fvm install && fvm flutter pub get` | `corepack enable && pnpm install` | | 실행 | `fvm flutter run --flavor dev` (`prod`) | `pnpm dev` | -| 포맷 | `fvm dart format lib test tool` | `pnpm format` | +| 포맷 고치기 | `fvm dart format lib test tool` | `pnpm format` | +| 포맷 검사 (CI와 같음) | `fvm dart format --set-exit-if-changed --output=none lib test tool` | `pnpm format:check` | | 분석·린트 | `fvm flutter analyze && fvm dart run tool/check_imports.dart` | `pnpm lint && pnpm typecheck` | | 테스트 | `fvm flutter test` | `pnpm test` | | 빌드 | `fvm flutter build apk\|ipa --flavor prod` | `pnpm build` (prod) / `pnpm build:dev` | diff --git a/README.md b/README.md index 727b36b..bd07809 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ fvm dart format --set-exit-if-changed lib test tool fvm flutter analyze fvm dart run tool/check_imports.dart fvm flutter test +# 생성 파일이 최신인지: 커밋한 뒤 작업 트리가 깨끗할 때 실행해서 diff가 없어야 한다 +fvm dart run build_runner build --delete-conflicting-outputs && git diff --exit-code ``` ## 웹 실행 @@ -40,5 +42,5 @@ pnpm dev PR 전 검증 (CI도 같은 명령): ```bash -pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build +pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build && pnpm build:dev ``` diff --git a/docs/design-tokens.md b/docs/design-tokens.md index b68b746..eca6e89 100644 --- a/docs/design-tokens.md +++ b/docs/design-tokens.md @@ -24,7 +24,7 @@ 한쪽만 바꾸지 않는다. 새 토큰이 필요하면 먼저 기존 토큰으로 안 되는지 본다. -토큰이 아닌 값도 있다: 레이아웃 폭(`max-width`, breakpoint), `1px` 테두리, 진행률 같은 동적 값, 특정 일러스트 크기. 이건 그 컴포넌트 CSS·위젯 안에 두고 그 줄에 짧게 이유를 남긴다. 반대로 **색·간격·모서리·글자 크기는 한 화면용이라도 기존 토큰 단계 중에서 고른다.** 단계에 없는 값이 정말 필요하면 디자이너와 새 단계를 토큰으로 추가한다. 예외가 두 번째 쓰임을 얻으면 토큰으로 올린다. +토큰이 아닌 값도 있다: 레이아웃 폭(`max-width`, breakpoint), `1px` 테두리, 진행률 같은 동적 값, 특정 일러스트 크기. 이건 그 컴포넌트 CSS·위젯 안에 두고 그 줄에 짧게 이유를 남긴다. 반대로 **색·간격·모서리·글자 크기는 한 화면용이라도 기존 토큰 단계 중에서 고른다.** 단계에 없는 값이 정말 필요하면 디자이너와 앱 전체에서 쓸 범용 단계(예: `space.5`)로 추가한다. 특정 화면 이름이 붙은 토큰(예: `loginTitleGap`)은 만들지 않는다. 예외가 두 번째 쓰임을 얻으면 토큰으로 올린다. ## 3. 토큰 표 @@ -120,7 +120,7 @@ Container( - 위젯·컴포넌트에서 hex, `Colors.*`, 숫자 px·dp 직접 사용 - 원시 토큰(`_Palette.*`, `--gray-200`)을 토큰 파일 밖에서 참조 - 앱·웹 중 한쪽만 바꾸기 -- 한 화면용 값을 토큰에 올리기 +- 특정 화면 전용 토큰 만들기 (새 값이 필요하면 범용 단계로 추가) - 토큰 파일에 색·크기 외의 로직 넣기 ## 6. 아직 없는 것 (필요해질 때 같은 절차로 추가) diff --git a/docs/pr-checklist.md b/docs/pr-checklist.md index f70f1a4..43b7880 100644 --- a/docs/pr-checklist.md +++ b/docs/pr-checklist.md @@ -45,7 +45,7 @@ PR 템플릿(`.github/PULL_REQUEST_TEMPLATE.md`)의 체크박스는 이 문서 ### A2. 자동 검증 -- 본다: 앱 `fvm dart format --set-exit-if-changed lib test tool` / `fvm flutter analyze` / `fvm dart run tool/check_imports.dart` / `fvm flutter test`, 웹 `pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build`. 전부 종료 코드 0. CI가 PR마다 같은 것을 돌린다. +- 본다: 앱(`apps/mobile`에서) `fvm dart format --set-exit-if-changed --output=none lib test tool` / `fvm flutter analyze` / `fvm dart run tool/check_imports.dart` / `fvm flutter test`, 웹(`apps/web`에서) `pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build && pnpm build:dev`. 전부 종료 코드 0. 앱·웹 파일이 바뀐 PR이면 CI가 같은 것을 돌린다(문서만 바뀐 PR은 CI가 돌지 않는다). - 왜: 가장 싸게 얻는 일관성. 사람이 보기 전에 기계가 거를 수 있는 것은 전부 기계에 맡긴다. - 확인: 마지막 커밋 뒤에 다시 돌린다. 경고를 `// ignore:`·`eslint-disable`·`any`로 지웠으면 그 자체가 실패다. @@ -95,7 +95,7 @@ PR 템플릿(`.github/PULL_REQUEST_TEMPLATE.md`)의 체크박스는 이 문서 grep -rnE "Color\(0x|Colors\.|fontSize: [0-9]|EdgeInsets\.(all|symmetric|only|fromLTRB)\([0-9]|Radius\.circular\([0-9]" apps/mobile/lib/features apps/mobile/lib/app grep -rnE "#[0-9a-fA-F]{3,8}\b|[0-9]+px" apps/web/src/features apps/web/src/shared/ui --include='*.css' ``` - 예외: `1px` 테두리, `max-width`·breakpoint, 진행률 같은 동적 값. 예외는 그 줄에 짧게 이유를 남긴다. 토큰 자체가 없으면 [design-tokens.md 2절](./design-tokens.md#2-바꾸는-절차)대로 추가하고 "한 화면용 값"이면 추가하지 않는다. + 예외: `1px` 테두리, `max-width`·breakpoint, 진행률 같은 동적 값. 예외는 그 줄에 짧게 이유를 남긴다. 기존 단계로 안 되면 [design-tokens.md 2절](./design-tokens.md#2-바꾸는-절차)대로 디자이너와 범용 단계를 추가한다. 특정 화면 이름이 붙은 토큰은 만들지 않는다. ### A7. 공통 위젯·컴포넌트 재사용 diff --git a/docs/workflow.md b/docs/workflow.md index 61d17f9..3762541 100644 --- a/docs/workflow.md +++ b/docs/workflow.md @@ -69,15 +69,16 @@ fvm dart format --set-exit-if-changed lib test tool fvm flutter analyze fvm dart run tool/check_imports.dart # import 방향 규칙 fvm flutter test +fvm dart run build_runner build --delete-conflicting-outputs && git diff --exit-code # 생성 파일이 최신인지 (커밋 뒤 깨끗한 트리에서) ``` 웹 (`apps/web`): ```bash -pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build +pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build && pnpm build:dev ``` -- 하나라도 실패한 채로 PR을 올리지 않는다. CI(`.github/workflows/mobile.yml`, `web.yml`)가 PR마다 같은 명령을 돌리고, 바뀝 쪽 앱·웹만 실행한다. +- 하나라도 실패한 채로 PR을 올리지 않는다. CI(`.github/workflows/mobile.yml`, `web.yml`)가 같은 명령을 돌린다. 단, 앱·웹 파일(또는 그 워크플로 파일)이 바뀐 PR에서만 그쪽 검사가 돈다. 문서만 바꾼 PR은 CI가 돌지 않으니 링크·그림을 직접 확인한다. - 명령 통과는 시작일 뿐이다. 구조·명령 처리·화면 상태·토큰·문구·데이터·테스트는 [pr-checklist.md A절](./pr-checklist.md#a-작성자-체크-pr-올리기-전)로 한 번 더 본다. - 화면을 바꿨으면 캡처(앱: 바꾼 플랫폼, 웹: 모바일 폭)를 PR에 넣는다. - 경로에 한글이 있으면 `flutter analyze`가 크래시한다(analysis server 버그). 영문 경로에 복사해서 돌린다. From c7b2ccf57c19d75eb1770743f9e71320840c819f Mon Sep 17 00:00:00 2001 From: beomseok Date: Tue, 3 Nov 2026 15:02:13 +0900 Subject: [PATCH 23/23] =?UTF-8?q?refactor:=20import=20=EA=B2=80=EC=82=AC?= =?UTF-8?q?=EA=B8=B0=EA=B0=80=20=EC=A0=95=EA=B7=9C=EC=8B=9D=20=EB=8C=80?= =?UTF-8?q?=EC=8B=A0=20Dart=20=ED=8C=8C=EC=84=9C=EB=A1=9C=20=EC=A7=80?= =?UTF-8?q?=EC=8B=9C=EB=AC=B8=EC=9D=84=20=EC=9D=BD=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 정규식은 문자열 안에서 import로 시작하는 줄을 지시문으로 잘못 읽을 수 있었다. analyzer의 parseString으로 실제 import·export와 조건부 URI만 읽어 주석·문자열에 흔들리지 않게 하고, 그 경우를 회귀 테스트로 둔다. analyzer는 build_runner가 이미 쓰던 패키지라 dev 의존성으로만 추가한다. --- apps/mobile/pubspec.lock | 2 +- apps/mobile/pubspec.yaml | 1 + apps/mobile/test/tool/check_imports_test.dart | 6 ++ apps/mobile/tool/check_imports.dart | 60 ++++--------------- 4 files changed, 19 insertions(+), 50 deletions(-) diff --git a/apps/mobile/pubspec.lock b/apps/mobile/pubspec.lock index 93dee74..b482b81 100644 --- a/apps/mobile/pubspec.lock +++ b/apps/mobile/pubspec.lock @@ -10,7 +10,7 @@ packages: source: hosted version: "111.0.0" analyzer: - dependency: transitive + dependency: "direct dev" description: name: analyzer sha256: "6c39bd5486a310e56217bed7cb1691377959f31be4227e41750107db7e6dd55c" diff --git a/apps/mobile/pubspec.yaml b/apps/mobile/pubspec.yaml index 21e5afc..92eb6ab 100644 --- a/apps/mobile/pubspec.yaml +++ b/apps/mobile/pubspec.yaml @@ -29,6 +29,7 @@ dev_dependencies: flutter_lints: ^6.0.0 freezed: ^4.0.3 json_serializable: ^6.15.2 + analyzer: ^14.7.0 flutter: uses-material-design: true diff --git a/apps/mobile/test/tool/check_imports_test.dart b/apps/mobile/test/tool/check_imports_test.dart index c1753ba..4a027f6 100644 --- a/apps/mobile/test/tool/check_imports_test.dart +++ b/apps/mobile/test/tool/check_imports_test.dart @@ -142,4 +142,10 @@ void main() { expect(found.map((v) => v.line), [3]); }); + + test('문자열 안의 import 줄은 무시한다', () { + const source = "const s = '''\nimport '../../../../app/router.dart';\n''';"; + + expect(checker.findViolations(_views, source), isEmpty); + }); } diff --git a/apps/mobile/tool/check_imports.dart b/apps/mobile/tool/check_imports.dart index 08b1355..350bd68 100644 --- a/apps/mobile/tool/check_imports.dart +++ b/apps/mobile/tool/check_imports.dart @@ -2,6 +2,9 @@ // 실행: fvm dart run tool/check_imports.dart (위반이 있으면 종료 코드 1) import 'dart:io'; +import 'package:analyzer/dart/analysis/utilities.dart'; +import 'package:analyzer/dart/ast/ast.dart'; + void main() { final libDir = Directory('lib'); if (!libDir.existsSync()) { @@ -41,20 +44,17 @@ class Violation { final String reason; } -/// `import`·`export` 지시문 하나 (키워드부터 `;`까지, 여러 줄 가능). -final _directive = RegExp(r'^[ \t]*(?:import|export)\b[^;]*;', multiLine: true); - -/// 지시문 안의 모든 URI. 조건부 import의 `if (...) 'uri'`도 포함한다. -final _uri = RegExp(r'''(['"])(.*?)\1'''); - /// [from](lib 기준 경로) 파일의 [source]에서 방향 규칙 위반을 찾는다. +/// Dart 파서로 읽으므로 주석·문자열 속 `import`는 지시문으로 보지 않는다. +/// 조건부 import의 `if (...) 'uri'`도 검사한다. List findViolations(String from, String source) { - final code = _blankComments(source); + final unit = parseString(content: source, throwIfDiagnostics: false).unit; final found = []; - for (final d in _directive.allMatches(code)) { - final line = '\n'.allMatches(code.substring(0, d.start)).length + 1; - for (final u in _uri.allMatches(d.group(0)!)) { - final uri = u.group(2)!; + for (final d in unit.directives.whereType()) { + final line = unit.lineInfo.getLocation(d.offset).lineNumber; + for (final literal in [d.uri, for (final c in d.configurations) c.uri]) { + final uri = literal.stringValue; + if (uri == null) continue; final to = _resolve(from, uri); final reason = to == null ? _packageViolation(from, uri) @@ -65,44 +65,6 @@ List findViolations(String from, String source) { return found; } -/// 주석을 같은 길이의 공백으로 바꾼다(줄 번호 유지). 따옴표 안의 `//`·`/*`는 건드리지 않는다. -String _blankComments(String s) { - final b = StringBuffer(); - String? quote; - var i = 0; - while (i < s.length) { - final c = s[i]; - if (quote != null) { - if (c == r'\' && i + 1 < s.length) { - b.write(s.substring(i, i + 2)); - i += 2; - continue; - } - if (c == quote) quote = null; - b.write(c); - i++; - } else if (c == "'" || c == '"') { - quote = c; - b.write(c); - i++; - } else if (s.startsWith('//', i)) { - final end = s.indexOf('\n', i); - final stop = end == -1 ? s.length : end; - b.write(' ' * (stop - i)); - i = stop; - } else if (s.startsWith('/*', i)) { - final end = s.indexOf('*/', i + 2); - final stop = end == -1 ? s.length : end + 2; - b.write(s.substring(i, stop).replaceAll(RegExp(r'[^\n]'), ' ')); - i = stop; - } else { - b.write(c); - i++; - } - } - return b.toString(); -} - String _libRelative(String path) { final idx = path.indexOf('lib/'); return path.substring(idx + 4).replaceAll(r'\', '/');