diff --git a/yourwork/.amazonq/cli-agents/default-agent.json b/yourwork/.amazonq/cli-agents/default-agent.json index 30b69b7..5ed9514 100644 --- a/yourwork/.amazonq/cli-agents/default-agent.json +++ b/yourwork/.amazonq/cli-agents/default-agent.json @@ -8,8 +8,6 @@ ], "allowedTools": [ "fs_read", - "fs_write", - "execute_bash", "use_aws", "report_issue" ], diff --git a/yourwork/template/DEPLOYMENT_GUIDE.md b/yourwork/template/DEPLOYMENT_GUIDE.md index 5b45763..afca609 100644 --- a/yourwork/template/DEPLOYMENT_GUIDE.md +++ b/yourwork/template/DEPLOYMENT_GUIDE.md @@ -35,10 +35,10 @@ template/ ## 技術スタック -- **フロントエンド**: React 18 + TypeScript +- **フロントエンド**: React + TypeScript - **ビルドツール**: Vite -- **スタイリング**: Tailwind CSS + Framer Motion -- **ルーティング**: React Router v6 +- **スタイリング**: Tailwind CSS v4+ (CSS-first configuration) + Framer Motion +- **ルーティング**: React Router - **テスト**: Vitest + Playwright - **ホスティング**: AWS S3 + CloudFront - **インフラ**: AWS CloudFormation @@ -107,13 +107,27 @@ VITE_ENVIRONMENT=development # 環境名 ### 5. スタイリング/ブランディング -#### **tailwind.config.js** -- カラーパレットをブランドカラーに変更 -- フォントファミリーの設定 +#### **Tailwind CSS v4 設定** (`src/styles/globals.css`) +Tailwind CSS v4では設定ファイル不要のCSS-first approach を採用: -#### **src/styles/globals.css** -- カスタムCSS変数の追加 -- ブランド固有のスタイル定義 +```css +@import "tailwindcss"; + +@theme { + /* カスタムカラーパレット */ + --color-primary-500: #0ea5e9; /* ブランドカラーに変更 */ + --color-primary-600: #0284c7; + + /* カスタムアニメーション */ + --animate-fade-in: fadeIn 0.5s ease-in-out; +} +``` + +**重要**: +- ❌ `tailwind.config.js` は不要(削除済み) +- ❌ `postcss.config.js` は不要(削除済み) +- ❌ `@tailwindcss/*` プラグインは不要(v4で内蔵) +- ✅ CSS内で `@theme {}` ブロックで設定 ### 6. ランディングページのカスタマイズ @@ -127,8 +141,8 @@ VITE_ENVIRONMENT=development # 環境名 ## 前提条件 ### 必要なツール -- Node.js 18.x 以上 -- npm 8.x 以上 +- Node.js 20.x 以上 +- npm 10.x 以上 - AWS CLI v2 - AWS アカウントと適切な権限 diff --git a/yourwork/template/app/cloudformation.yaml b/yourwork/template/app/cloudformation.yaml index 6ed8f00..f73ffa0 100644 --- a/yourwork/template/app/cloudformation.yaml +++ b/yourwork/template/app/cloudformation.yaml @@ -46,7 +46,7 @@ Resources: Type: AWS::CloudFront::OriginAccessControl Properties: OriginAccessControlConfig: - Name: !Sub '${ProjectName}-${Environment}-oac' + Name: !Sub '${ProjectName}-${Environment}-oac-${AWS::AccountId}' OriginAccessControlOriginType: s3 SigningBehavior: always SigningProtocol: sigv4 @@ -139,7 +139,7 @@ Resources: Type: AWS::CloudFront::ResponseHeadersPolicy Properties: ResponseHeadersPolicyConfig: - Name: !Sub '${ProjectName}-${Environment}-security-headers' + Name: !Sub '${ProjectName}-${Environment}-security-headers-${AWS::AccountId}' SecurityHeadersConfig: StrictTransportSecurity: AccessControlMaxAgeSec: 31536000 @@ -176,28 +176,28 @@ Outputs: Description: 'S3 Bucket name for uploading files' Value: !Ref S3Bucket Export: - Name: !Sub '${ProjectName}-${Environment}-bucket-name' + Name: !Sub '${ProjectName}-${Environment}-bucket-name-${AWS::AccountId}' CloudFrontDistributionId: Description: 'CloudFront Distribution ID' Value: !Ref CloudFrontDistribution Export: - Name: !Sub '${ProjectName}-${Environment}-distribution-id' + Name: !Sub '${ProjectName}-${Environment}-distribution-id-${AWS::AccountId}' CloudFrontDomainName: Description: 'CloudFront Distribution Domain Name' Value: !GetAtt CloudFrontDistribution.DomainName Export: - Name: !Sub '${ProjectName}-${Environment}-domain-name' + Name: !Sub '${ProjectName}-${Environment}-domain-name-${AWS::AccountId}' WebsiteURL: Description: 'Website URL' Value: !Sub 'https://${CloudFrontDistribution.DomainName}' Export: - Name: !Sub '${ProjectName}-${Environment}-website-url' + Name: !Sub '${ProjectName}-${Environment}-website-url-${AWS::AccountId}' S3BucketRegion: Description: 'S3 Bucket Region' Value: !Ref 'AWS::Region' Export: - Name: !Sub '${ProjectName}-${Environment}-bucket-region' \ No newline at end of file + Name: !Sub '${ProjectName}-${Environment}-bucket-region-${AWS::AccountId}' \ No newline at end of file diff --git a/yourwork/template/app/package.json b/yourwork/template/app/package.json index 2e3a3ee..9d29c14 100644 --- a/yourwork/template/app/package.json +++ b/yourwork/template/app/package.json @@ -22,9 +22,7 @@ "dependencies": { "@headlessui/react": "^2.2.8", "@heroicons/react": "^2.2.0", - "@tailwindcss/aspect-ratio": "^0.4.2", - "@tailwindcss/forms": "^0.5.10", - "@tailwindcss/typography": "^0.5.18", + "clsx": "^2.1.1", "framer-motion": "^12.23.16", "lucide-react": "^0.544.0", @@ -47,14 +45,15 @@ "@vitejs/plugin-react": "^5.0.3", "@vitest/coverage-v8": "^3.2.4", "@vitest/ui": "^3.2.4", - "autoprefixer": "^10.4.21", + + "@tailwindcss/vite": "^4.1.13", "eslint": "^9.36.0", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-react-refresh": "^0.4.20", "jsdom": "^27.0.0", "msw": "^2.11.2", - "postcss": "^8.5.6", + "prettier": "^3.6.2", "prettier-plugin-tailwindcss": "^0.6.14", "tailwindcss": "^4.1.13", diff --git a/yourwork/template/app/postcss.config.js b/yourwork/template/app/postcss.config.js deleted file mode 100644 index e99ebc2..0000000 --- a/yourwork/template/app/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} \ No newline at end of file diff --git a/yourwork/template/app/src/components/app/HomePage.tsx b/yourwork/template/app/src/components/app/HomePage.tsx index 5b8e041..c282028 100644 --- a/yourwork/template/app/src/components/app/HomePage.tsx +++ b/yourwork/template/app/src/components/app/HomePage.tsx @@ -1,65 +1,85 @@ -import { useEffect, useRef } from 'react'; -import LoadingSpinner from '@/components/common/LoadingSpinner'; +import React from 'react'; +import { motion } from 'framer-motion'; import { mlewTracker } from '../../services/mlewTracker'; -function HomePage() { - const hasTracked = useRef(false); +const HomePage: React.FC = () => { + const handleGetStarted = () => { + mlewTracker.trackCTAClick('Get Started', 'home-page', '/features'); + }; - useEffect(() => { - // Track app page view only once (prevent React Strict Mode double execution) - if (!hasTracked.current) { - hasTracked.current = true; - mlewTracker.trackPageView('app-home'); - } - }, []); + const handleLearnMore = () => { + mlewTracker.trackClick('learn-more-button', { + source: 'home-page', + destination: 'features' + }); + }; return ( -
- Modern React TypeScript application template with analytics integration -
-+ A modern, production-ready React application template with TypeScript, + Tailwind CSS, and integrated analytics tracking. +
+ +- Built with modern React and TypeScript for type-safe development -
+Built with Vite for lightning-fast development experience
- Utility-first CSS framework for rapid UI development -
+Tailwind CSS v4 with beautiful, responsive components
- Integrated MLEWW3 Tracker for comprehensive analytics -
+Integrated MLEW Tracker for comprehensive user analytics