From 7c01d5b4d98c4ad58730d0ac37c7be44582acb39 Mon Sep 17 00:00:00 2001 From: Kazuhito Go Date: Tue, 28 Oct 2025 16:19:24 +0900 Subject: [PATCH 01/11] =?UTF-8?q?=E3=81=A8=E3=82=8A=E3=81=82=E3=81=88?= =?UTF-8?q?=E3=81=9A=E5=8B=95=E3=81=8F=E3=82=84=E3=81=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cdk/lib/construct/web.ts | 6 ++++ .../cdk/lib/generative-ai-use-cases-stack.ts | 2 ++ packages/cdk/lib/stack-input.ts | 7 +++++ packages/cdk/parameter.ts | 28 +++++++++++++++++++ packages/web/src/hooks/useBranding.ts | 24 ++++++++++++++++ packages/web/src/pages/LandingPage.tsx | 28 +++++++++++++++++-- packages/web/src/vite-env.d.ts | 2 ++ 7 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 packages/web/src/hooks/useBranding.ts diff --git a/packages/cdk/lib/construct/web.ts b/packages/cdk/lib/construct/web.ts index 3b47c60a8..d4b443d73 100644 --- a/packages/cdk/lib/construct/web.ts +++ b/packages/cdk/lib/construct/web.ts @@ -66,6 +66,10 @@ export interface WebProps { readonly agentCoreGenericRuntime?: AgentCoreConfiguration; readonly agentCoreExternalRuntimes: AgentCoreConfiguration[]; readonly agentCoreRegion?: string; + readonly brandingConfig?: { + logoPath?: string; + title?: string; + }; } export class Web extends Construct { @@ -297,6 +301,8 @@ export class Web extends Construct { VITE_APP_AGENT_CORE_EXTERNAL_RUNTIMES: JSON.stringify( props.agentCoreExternalRuntimes ), + VITE_APP_BRANDING_LOGO_PATH: props.brandingConfig?.logoPath ?? '', + VITE_APP_BRANDING_TITLE: props.brandingConfig?.title ?? '', }, }); // Enhance computing resources diff --git a/packages/cdk/lib/generative-ai-use-cases-stack.ts b/packages/cdk/lib/generative-ai-use-cases-stack.ts index 82556355e..14568219f 100644 --- a/packages/cdk/lib/generative-ai-use-cases-stack.ts +++ b/packages/cdk/lib/generative-ai-use-cases-stack.ts @@ -249,6 +249,8 @@ export class GenerativeAiUseCasesStack extends Stack { webBucket: props.webBucket, cognitoUserPoolProxyEndpoint: props.cognitoUserPoolProxyEndpoint, cognitoIdentityPoolProxyEndpoint: props.cognitoIdentityPoolProxyEndpoint, + // Branding + brandingConfig: params.brandingConfig, }); // RAG diff --git a/packages/cdk/lib/stack-input.ts b/packages/cdk/lib/stack-input.ts index e47ccd7fd..8d76bcbc8 100644 --- a/packages/cdk/lib/stack-input.ts +++ b/packages/cdk/lib/stack-input.ts @@ -250,6 +250,13 @@ export const processedStackInputSchema = baseStackInputSchema.extend({ ), // Processed agentCoreRegion (null -> modelRegion) agentCoreRegion: z.string(), + // Branding configuration + brandingConfig: z + .object({ + logoPath: z.string().optional(), + title: z.string().optional(), + }) + .optional(), }); export type StackInput = z.infer; diff --git a/packages/cdk/parameter.ts b/packages/cdk/parameter.ts index 1b417e06a..f1d92f1a0 100644 --- a/packages/cdk/parameter.ts +++ b/packages/cdk/parameter.ts @@ -1,4 +1,6 @@ import * as cdk from 'aws-cdk-lib'; +import * as fs from 'fs'; +import * as path from 'path'; import { StackInput, stackInputSchema, @@ -6,6 +8,26 @@ import { } from './lib/stack-input'; import { ModelConfiguration } from 'generative-ai-use-cases'; +// Branding configuration interface +interface BrandingConfig { + logoPath?: string; + title?: string; +} + +// Load branding configuration from JSON file +const loadBrandingConfig = (): BrandingConfig => { + const brandingPath = path.join(__dirname, 'branding.json'); + try { + if (fs.existsSync(brandingPath)) { + const brandingData = fs.readFileSync(brandingPath, 'utf8'); + return JSON.parse(brandingData); + } + } catch (error) { + console.warn('Failed to load branding.json, using defaults:', error); + } + return {}; +}; + // Get parameters from CDK Context const getContext = (app: cdk.App): StackInput => { const params = stackInputSchema.parse(app.node.getAllContext()); @@ -44,6 +66,10 @@ export const getParams = (app: cdk.App): ProcessedStackInput => { env: params.env, }); } + + // Load branding configuration + const brandingConfig = loadBrandingConfig(); + // Make the format of modelIds, imageGenerationModelIds consistent const convertToModelConfiguration = ( models: (string | ModelConfiguration)[], @@ -77,5 +103,7 @@ export const getParams = (app: cdk.App): ProcessedStackInput => { ), // Process agentCoreRegion: null -> modelRegion agentCoreRegion: params.agentCoreRegion || params.modelRegion, + // Add branding configuration + brandingConfig, }; }; diff --git a/packages/web/src/hooks/useBranding.ts b/packages/web/src/hooks/useBranding.ts new file mode 100644 index 000000000..2452304f0 --- /dev/null +++ b/packages/web/src/hooks/useBranding.ts @@ -0,0 +1,24 @@ +import { useMemo } from 'react'; + +interface BrandingConfig { + logoPath: string; + title: string; +} + +const useBranding = (): BrandingConfig => { + const brandingConfig = useMemo(() => { + const logoPath = import.meta.env.VITE_APP_BRANDING_LOGO_PATH; + const title = import.meta.env.VITE_APP_BRANDING_TITLE; + + console.log('Branding config:', { logoPath, title }); + + return { + logoPath: logoPath || '', + title: title || '', + }; + }, []); + + return brandingConfig; +}; + +export default useBranding; diff --git a/packages/web/src/pages/LandingPage.tsx b/packages/web/src/pages/LandingPage.tsx index 15473a0b8..36d5e128b 100644 --- a/packages/web/src/pages/LandingPage.tsx +++ b/packages/web/src/pages/LandingPage.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; import CardDemo from '../components/CardDemo'; import Button from '../components/Button'; @@ -23,6 +23,7 @@ import { } from 'react-icons/pi'; import AwsIcon from '../assets/aws.svg?react'; import useInterUseCases from '../hooks/useInterUseCases'; +import useBranding from '../hooks/useBranding'; import { AgentPageQueryParams, ChatPageQueryParams, @@ -65,6 +66,27 @@ const LandingPage: React.FC = () => { const { enabled } = useUseCases(); const { setIsShow, init } = useInterUseCases(); const { t } = useTranslation(); + const { logoPath, title } = useBranding(); + const [customLogoUrl, setCustomLogoUrl] = useState(''); + + // Load custom logo dynamically + useEffect(() => { + if (logoPath) { + console.log('Loading custom logo:', logoPath); + const logoUrl = new URL(`../assets/${logoPath}`, import.meta.url).href; + setCustomLogoUrl(logoUrl); + } else { + setCustomLogoUrl(''); + } + }, [logoPath]); + + // Determine which logo and title to use + const displayLogo = customLogoUrl ? ( + {title + ) : ( + + ); + const displayTitle = title || t('landing.title'); const demoChat = () => { const params: ChatPageQueryParams = { @@ -282,8 +304,8 @@ const LandingPage: React.FC = () => { return (
- - {t('landing.title')} + {displayLogo} + {displayTitle}
diff --git a/packages/web/src/vite-env.d.ts b/packages/web/src/vite-env.d.ts index ac6bac3a7..ffd00b0a6 100644 --- a/packages/web/src/vite-env.d.ts +++ b/packages/web/src/vite-env.d.ts @@ -37,6 +37,8 @@ interface ImportMetaEnv { readonly VITE_APP_AGENT_CORE_ENABLED: string; readonly VITE_APP_AGENT_CORE_GENERIC_RUNTIME: string; readonly VITE_APP_AGENT_CORE_EXTERNAL_RUNTIMES: string; + readonly VITE_APP_BRANDING_LOGO_PATH: string; + readonly VITE_APP_BRANDING_TITLE: string; } interface ImportMeta { From 3f75bd7e78a9f654689fa6ea122e2bd95a00cccd Mon Sep 17 00:00:00 2001 From: Kazuhito Go Date: Tue, 28 Oct 2025 17:02:13 +0900 Subject: [PATCH 02/11] =?UTF-8?q?paramter.ts=20=E3=81=8B=E3=82=89=20brandi?= =?UTF-8?q?ng.ts=20=E3=81=AB=E5=88=87=E3=82=8A=E5=87=BA=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cdk/branding.ts | 22 ++++++++++++++++++++++ packages/cdk/parameter.ts | 23 +---------------------- 2 files changed, 23 insertions(+), 22 deletions(-) create mode 100644 packages/cdk/branding.ts diff --git a/packages/cdk/branding.ts b/packages/cdk/branding.ts new file mode 100644 index 000000000..99a5eb6e1 --- /dev/null +++ b/packages/cdk/branding.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import * as path from 'path'; + +// Branding configuration interface +interface BrandingConfig { + logoPath?: string; + title?: string; +} + +// Load branding configuration from JSON file +export const loadBrandingConfig = (): BrandingConfig => { + const brandingPath = path.join(__dirname, 'branding.json'); + try { + if (fs.existsSync(brandingPath)) { + const brandingData = fs.readFileSync(brandingPath, 'utf8'); + return JSON.parse(brandingData); + } + } catch (error) { + console.warn('Failed to load branding.json, using defaults:', error); + } + return {}; +}; diff --git a/packages/cdk/parameter.ts b/packages/cdk/parameter.ts index f1d92f1a0..2b52c0505 100644 --- a/packages/cdk/parameter.ts +++ b/packages/cdk/parameter.ts @@ -1,32 +1,11 @@ import * as cdk from 'aws-cdk-lib'; -import * as fs from 'fs'; -import * as path from 'path'; import { StackInput, stackInputSchema, ProcessedStackInput, } from './lib/stack-input'; import { ModelConfiguration } from 'generative-ai-use-cases'; - -// Branding configuration interface -interface BrandingConfig { - logoPath?: string; - title?: string; -} - -// Load branding configuration from JSON file -const loadBrandingConfig = (): BrandingConfig => { - const brandingPath = path.join(__dirname, 'branding.json'); - try { - if (fs.existsSync(brandingPath)) { - const brandingData = fs.readFileSync(brandingPath, 'utf8'); - return JSON.parse(brandingData); - } - } catch (error) { - console.warn('Failed to load branding.json, using defaults:', error); - } - return {}; -}; +import { loadBrandingConfig } from './branding'; // Get parameters from CDK Context const getContext = (app: cdk.App): StackInput => { From d23c054450c1fa55a534a2d9a3da0d8dca1b72f7 Mon Sep 17 00:00:00 2001 From: Kazuhito Go Date: Tue, 28 Oct 2025 17:07:09 +0900 Subject: [PATCH 03/11] add doc --- docs/en/DEPLOY_OPTION.md | 32 ++++++++++++++++++++++++++++++++ docs/ja/DEPLOY_OPTION.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/docs/en/DEPLOY_OPTION.md b/docs/en/DEPLOY_OPTION.md index e6a0dfd6c..2e3776fdc 100644 --- a/docs/en/DEPLOY_OPTION.md +++ b/docs/en/DEPLOY_OPTION.md @@ -1503,6 +1503,38 @@ const envs: Record> = { } ``` +## Branding Customization + +You can customize the logo and title displayed on the landing page by creating a branding configuration file. + +### Configuration + +1. Create `packages/cdk/branding.json` with your custom settings: + +```json +{ + "logoPath": "your-logo.svg", + "title": "Your Custom Title" +} +``` + +2. Place your custom SVG logo file in `packages/web/src/assets/`: + +``` +packages/web/src/assets/your-logo.svg +``` + +### Parameters + +- `logoPath` (optional): Filename of the SVG logo in `packages/web/src/assets/` +- `title` (optional): Custom title text to display + +### Notes + +- If `branding.json` doesn't exist, default AWS logo and title are used +- Only SVG format is supported for custom logos +- The logo will be displayed at 80x80 pixels (size-20 class) + ## Security-Related Settings ### Disable Self-Signup diff --git a/docs/ja/DEPLOY_OPTION.md b/docs/ja/DEPLOY_OPTION.md index 1dbf61c45..b3127c278 100644 --- a/docs/ja/DEPLOY_OPTION.md +++ b/docs/ja/DEPLOY_OPTION.md @@ -1510,6 +1510,38 @@ const envs: Record> = { } ``` +## ブランディングカスタマイズ + +ランディングページに表示されるロゴとタイトルをカスタマイズできます。 + +### 設定方法 + +1. `packages/cdk/branding.json` にカスタム設定を作成: + +```json +{ + "logoPath": "your-logo.svg", + "title": "カスタムタイトル" +} +``` + +2. カスタムSVGロゴファイルを `packages/web/src/assets/` に配置: + +``` +packages/web/src/assets/your-logo.svg +``` + +### パラメータ + +- `logoPath` (オプション): `packages/web/src/assets/` 内のSVGロゴファイル名 +- `title` (オプション): 表示するカスタムタイトルテキスト + +### 注意事項 + +- `branding.json` が存在しない場合、デフォルトのAWSロゴとタイトルが使用されます +- カスタムロゴはSVG形式のみサポートされています +- ロゴは80x80ピクセル(size-20クラス)で表示されます + ## セキュリティ関連設定 ### セルフサインアップを無効化する From bfabaedea4a8ad717a445238678525609b403193 Mon Sep 17 00:00:00 2001 From: Kazuhito Go Date: Wed, 29 Oct 2025 12:19:35 +0900 Subject: [PATCH 04/11] update snapshot --- .../cdk/lib/construct/generic-agent-core.ts | 3 +- .../generative-ai-use-cases.test.ts.snap | 28 +++++++++++++------ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/packages/cdk/lib/construct/generic-agent-core.ts b/packages/cdk/lib/construct/generic-agent-core.ts index 33fd48015..1dbfe4433 100644 --- a/packages/cdk/lib/construct/generic-agent-core.ts +++ b/packages/cdk/lib/construct/generic-agent-core.ts @@ -196,7 +196,8 @@ export class GenericAgentCore extends Construct { ], conditions: { StringEquals: { - 'iam:AWSServiceName': 'runtime-identity.bedrock-agentcore.amazonaws.com', + 'iam:AWSServiceName': + 'runtime-identity.bedrock-agentcore.amazonaws.com', }, }, }) diff --git a/packages/cdk/test/__snapshots__/generative-ai-use-cases.test.ts.snap b/packages/cdk/test/__snapshots__/generative-ai-use-cases.test.ts.snap index 026241a8d..d918bd19b 100644 --- a/packages/cdk/test/__snapshots__/generative-ai-use-cases.test.ts.snap +++ b/packages/cdk/test/__snapshots__/generative-ai-use-cases.test.ts.snap @@ -2753,7 +2753,7 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 2`] = ` "Arn", ], }, - "Runtime": "python3.11", + "Runtime": "python3.13", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -3286,6 +3286,7 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 2`] = ` "SourceObjectKeys": [ "HASH-REPLACED.zip", ], + "WaitForDistributionInvalidation": true, }, "Type": "Custom::CDKBucketDeployment", "UpdateReplacePolicy": "Delete", @@ -3649,6 +3650,7 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 3`] = ` "SourceObjectKeys": [ "HASH-REPLACED.zip", ], + "WaitForDistributionInvalidation": true, }, "Type": "Custom::CDKBucketDeployment", "UpdateReplacePolicy": "Delete", @@ -4160,7 +4162,7 @@ Automatically detect the language of the user's request and think and answer in "Arn", ], }, - "Runtime": "python3.11", + "Runtime": "python3.13", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -18344,6 +18346,8 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 6`] = ` ], ], }, + "VITE_APP_BRANDING_LOGO_PATH": "", + "VITE_APP_BRANDING_TITLE": "", "VITE_APP_COGNITO_IDENTITY_POOL_PROXY_ENDPOINT": { "Fn::Join": [ "", @@ -18549,6 +18553,7 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 6`] = ` ], }, ], + "WaitForDistributionInvalidation": true, }, "Type": "Custom::CDKBucketDeployment", "UpdateReplacePolicy": "Delete", @@ -19211,7 +19216,7 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 6`] = ` "Arn", ], }, - "Runtime": "python3.11", + "Runtime": "python3.13", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -19368,7 +19373,7 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 6`] = ` "Arn", ], }, - "Runtime": "python3.11", + "Runtime": "python3.13", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -20162,6 +20167,7 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 6`] = ` "SourceObjectKeys": [ "HASH-REPLACED.zip", ], + "WaitForDistributionInvalidation": true, }, "Type": "Custom::CDKBucketDeployment", "UpdateReplacePolicy": "Delete", @@ -24023,7 +24029,7 @@ exports[`GenerativeAiUseCases matches the snapshot 2`] = ` "Arn", ], }, - "Runtime": "python3.11", + "Runtime": "python3.13", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -24556,6 +24562,7 @@ exports[`GenerativeAiUseCases matches the snapshot 2`] = ` "SourceObjectKeys": [ "HASH-REPLACED.zip", ], + "WaitForDistributionInvalidation": true, }, "Type": "Custom::CDKBucketDeployment", "UpdateReplacePolicy": "Delete", @@ -24919,6 +24926,7 @@ exports[`GenerativeAiUseCases matches the snapshot 3`] = ` "SourceObjectKeys": [ "HASH-REPLACED.zip", ], + "WaitForDistributionInvalidation": true, }, "Type": "Custom::CDKBucketDeployment", "UpdateReplacePolicy": "Delete", @@ -25384,7 +25392,7 @@ Automatically detect the language of the user's request and think and answer in "Arn", ], }, - "Runtime": "python3.11", + "Runtime": "python3.13", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -38602,6 +38610,8 @@ exports[`GenerativeAiUseCases matches the snapshot 6`] = ` ], ], }, + "VITE_APP_BRANDING_LOGO_PATH": "", + "VITE_APP_BRANDING_TITLE": "", "VITE_APP_COGNITO_IDENTITY_POOL_PROXY_ENDPOINT": "", "VITE_APP_COGNITO_USER_POOL_PROXY_ENDPOINT": "", "VITE_APP_ENDPOINT_NAMES": "[]", @@ -38772,6 +38782,7 @@ exports[`GenerativeAiUseCases matches the snapshot 6`] = ` ], }, ], + "WaitForDistributionInvalidation": true, }, "Type": "Custom::CDKBucketDeployment", "UpdateReplacePolicy": "Delete", @@ -40367,7 +40378,7 @@ exports[`GenerativeAiUseCases matches the snapshot 6`] = ` "Arn", ], }, - "Runtime": "python3.11", + "Runtime": "python3.13", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -40524,7 +40535,7 @@ exports[`GenerativeAiUseCases matches the snapshot 6`] = ` "Arn", ], }, - "Runtime": "python3.11", + "Runtime": "python3.13", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -41314,6 +41325,7 @@ exports[`GenerativeAiUseCases matches the snapshot 6`] = ` "SourceObjectKeys": [ "HASH-REPLACED.zip", ], + "WaitForDistributionInvalidation": true, }, "Type": "Custom::CDKBucketDeployment", "UpdateReplacePolicy": "Delete", From bee02b5ea919eacbfb6863c0d31fa026e0454a7d Mon Sep 17 00:00:00 2001 From: Kazuhito Go Date: Thu, 30 Oct 2025 17:34:20 +0900 Subject: [PATCH 05/11] =?UTF-8?q?=E3=83=A1=E3=83=A2=E5=8C=96=E3=81=A8?= =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=82=B3=E3=83=BC=E3=83=89=E3=81=AE=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/web/src/hooks/useBranding.ts | 2 -- packages/web/src/pages/LandingPage.tsx | 33 ++++++++++++-------------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/packages/web/src/hooks/useBranding.ts b/packages/web/src/hooks/useBranding.ts index 2452304f0..bd1a8345b 100644 --- a/packages/web/src/hooks/useBranding.ts +++ b/packages/web/src/hooks/useBranding.ts @@ -10,8 +10,6 @@ const useBranding = (): BrandingConfig => { const logoPath = import.meta.env.VITE_APP_BRANDING_LOGO_PATH; const title = import.meta.env.VITE_APP_BRANDING_TITLE; - console.log('Branding config:', { logoPath, title }); - return { logoPath: logoPath || '', title: title || '', diff --git a/packages/web/src/pages/LandingPage.tsx b/packages/web/src/pages/LandingPage.tsx index 36d5e128b..2d14345ef 100644 --- a/packages/web/src/pages/LandingPage.tsx +++ b/packages/web/src/pages/LandingPage.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import React, { useMemo } from 'react'; import { useNavigate } from 'react-router-dom'; import CardDemo from '../components/CardDemo'; import Button from '../components/Button'; @@ -23,7 +23,7 @@ import { } from 'react-icons/pi'; import AwsIcon from '../assets/aws.svg?react'; import useInterUseCases from '../hooks/useInterUseCases'; -import useBranding from '../hooks/useBranding'; + import { AgentPageQueryParams, ChatPageQueryParams, @@ -52,6 +52,8 @@ const agentCoreEnabled: boolean = import.meta.env.VITE_APP_AGENT_CORE_ENABLED === 'true'; const inlineAgents: boolean = import.meta.env.VITE_APP_INLINE_AGENTS === 'true'; const mcpEnabled: boolean = import.meta.env.VITE_APP_MCP_ENABLED === 'true'; +const logoPath: string = import.meta.env.VITE_APP_BRANDING_LOGO_PATH || ''; +const brandingTitle: string = import.meta.env.VITE_APP_BRANDING_TITLE || ''; const { imageGenModelIds, videoGenModelIds, @@ -66,27 +68,22 @@ const LandingPage: React.FC = () => { const { enabled } = useUseCases(); const { setIsShow, init } = useInterUseCases(); const { t } = useTranslation(); - const { logoPath, title } = useBranding(); - const [customLogoUrl, setCustomLogoUrl] = useState(''); - // Load custom logo dynamically - useEffect(() => { + const displayLogo = useMemo(() => { if (logoPath) { - console.log('Loading custom logo:', logoPath); const logoUrl = new URL(`../assets/${logoPath}`, import.meta.url).href; - setCustomLogoUrl(logoUrl); - } else { - setCustomLogoUrl(''); + return ( + {brandingTitle + ); } - }, [logoPath]); + return ; + }, []); - // Determine which logo and title to use - const displayLogo = customLogoUrl ? ( - {title - ) : ( - - ); - const displayTitle = title || t('landing.title'); + const displayTitle = brandingTitle || t('landing.title'); const demoChat = () => { const params: ChatPageQueryParams = { From d3f08d8c8f93833f82cbbe1f5117df746c2b5b8b Mon Sep 17 00:00:00 2001 From: Kazuhito Go Date: Thu, 6 Nov 2025 20:40:37 +0900 Subject: [PATCH 06/11] Delete packages/cdk/branding.json.bk --- packages/cdk/branding.json.bk | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 packages/cdk/branding.json.bk diff --git a/packages/cdk/branding.json.bk b/packages/cdk/branding.json.bk deleted file mode 100644 index 7024e40d8..000000000 --- a/packages/cdk/branding.json.bk +++ /dev/null @@ -1,4 +0,0 @@ -{ - "logoPath": "nanj.svg", - "title": "エーアイってヤツを触るンゴ!" -} From a14bf71ef3845cf2f7494a38ec9ce9480ab21d1e Mon Sep 17 00:00:00 2001 From: Kazuhito Go Date: Thu, 6 Nov 2025 20:41:18 +0900 Subject: [PATCH 07/11] Delete packages/web/src/assets/azure.svg --- packages/web/src/assets/azure.svg | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 packages/web/src/assets/azure.svg diff --git a/packages/web/src/assets/azure.svg b/packages/web/src/assets/azure.svg deleted file mode 100644 index ff5dfa5c1..000000000 --- a/packages/web/src/assets/azure.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 7b793cd661c2432822c716309bdf8c545c1846a9 Mon Sep 17 00:00:00 2001 From: Kazuhito Go Date: Thu, 6 Nov 2025 20:43:02 +0900 Subject: [PATCH 08/11] Delete packages/web/src/assets/nanj.svg --- packages/web/src/assets/nanj.svg | 94 -------------------------------- 1 file changed, 94 deletions(-) delete mode 100644 packages/web/src/assets/nanj.svg diff --git a/packages/web/src/assets/nanj.svg b/packages/web/src/assets/nanj.svg deleted file mode 100644 index a01303041..000000000 --- a/packages/web/src/assets/nanj.svg +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From af31370d3bc2c7ae877669781c6552ee6b81d1ed Mon Sep 17 00:00:00 2001 From: Kazuhito Go Date: Thu, 6 Nov 2025 21:29:47 +0900 Subject: [PATCH 09/11] =?UTF-8?q?branding=20=E3=81=AE=E5=8F=8D=E6=98=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cdk/parameter.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/cdk/parameter.ts b/packages/cdk/parameter.ts index 2b52c0505..8000e662a 100644 --- a/packages/cdk/parameter.ts +++ b/packages/cdk/parameter.ts @@ -45,10 +45,6 @@ export const getParams = (app: cdk.App): ProcessedStackInput => { env: params.env, }); } - - // Load branding configuration - const brandingConfig = loadBrandingConfig(); - // Make the format of modelIds, imageGenerationModelIds consistent const convertToModelConfiguration = ( models: (string | ModelConfiguration)[], @@ -82,7 +78,7 @@ export const getParams = (app: cdk.App): ProcessedStackInput => { ), // Process agentCoreRegion: null -> modelRegion agentCoreRegion: params.agentCoreRegion || params.modelRegion, - // Add branding configuration - brandingConfig, + // Load branding configuration + brandingConfig: loadBrandingConfig(), }; }; From 1472cb97cb4dd2ec4f253c7fdb6ba6d5ee0d5de5 Mon Sep 17 00:00:00 2001 From: Kazuhito Go Date: Thu, 6 Nov 2025 22:22:17 +0900 Subject: [PATCH 10/11] =?UTF-8?q?setup-env.sh=20=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup-env.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup-env.sh b/setup-env.sh index 21c185843..a58aa1558 100755 --- a/setup-env.sh +++ b/setup-env.sh @@ -60,3 +60,10 @@ export VITE_APP_AGENT_CORE_AGENT_BUILDER_ENABLED=$(extract_value "$stack_output" export VITE_APP_AGENT_CORE_AGENT_BUILDER_RUNTIME=$(extract_value "$stack_output" AgentCoreAgentBuilderRuntime) export VITE_APP_AGENT_CORE_EXTERNAL_RUNTIMES=$(extract_value "$stack_output" AgentCoreExternalRuntimes) export VITE_APP_MCP_SERVERS_CONFIG=$(extract_value "$stack_output" McpServersConfig) +if [ -f "packages/cdk/branding.json" ]; then + export VITE_APP_BRANDING_LOGO_PATH=$(cat packages/cdk/branding.json | jq -r '.logoPath // ""') + export VITE_APP_BRANDING_TITLE=$(cat packages/cdk/branding.json | jq -r '.title // ""') +else + export VITE_APP_BRANDING_LOGO_PATH="" + export VITE_APP_BRANDING_TITLE="" +fi From 32b91832c447c2ec485e42fa2e6c8e5749c4f860 Mon Sep 17 00:00:00 2001 From: Kazuhito Go Date: Tue, 11 Nov 2025 13:24:12 +0900 Subject: [PATCH 11/11] =?UTF-8?q?Win=20=E3=81=AE=E9=96=8B=E7=99=BA?= =?UTF-8?q?=E7=94=A8=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0=E3=82=92=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_devw_win.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/web_devw_win.ps1 b/web_devw_win.ps1 index d27f2d64f..d7566722d 100644 --- a/web_devw_win.ps1 +++ b/web_devw_win.ps1 @@ -75,7 +75,7 @@ $env:VITE_APP_ENDPOINT_NAMES = Extract-Value $stack_output "EndpointNames" $env:VITE_APP_SAMLAUTH_ENABLED = Extract-Value $stack_output "SamlAuthEnabled" $env:VITE_APP_SAML_COGNITO_DOMAIN_NAME = Extract-Value $stack_output "SamlCognitoDomainName" $env:VITE_APP_SAML_COGNITO_FEDERATED_IDENTITY_PROVIDER_NAME = Extract-Value $stack_output "SamlCognitoFederatedIdentityProviderName" -$env:VITE_APP_AGENT_NAMES = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($(Extract-Value $stack_output "AgentNames"))) +$env:VITE_APP_AGENTS = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($(Extract-Value $stack_output "Agents"))) $env:VITE_APP_INLINE_AGENTS = Extract-Value $stack_output "InlineAgents" $env:VITE_APP_USE_CASE_BUILDER_ENABLED = Extract-Value $stack_output "UseCaseBuilderEnabled" $env:VITE_APP_OPTIMIZE_PROMPT_FUNCTION_ARN = Extract-Value $stack_output "OptimizePromptFunctionArn" @@ -94,4 +94,13 @@ $env:VITE_APP_AGENT_CORE_AGENT_BUILDER_RUNTIME = Extract-Value $stack_output "Ag $env:VITE_APP_AGENT_CORE_EXTERNAL_RUNTIMES = Extract-Value $stack_output "AgentCoreExternalRuntimes" $env:VITE_APP_MCP_SERVERS_CONFIG = Extract-Value $stack_output "McpServersConfig" +if (Test-Path "packages/cdk/branding.json") { + $branding = Get-Content -Raw -Path "packages/cdk/branding.json" | ConvertFrom-Json + $env:VITE_APP_BRANDING_LOGO_PATH = if ($branding.logoPath) { $branding.logoPath } else { "" } + $env:VITE_APP_BRANDING_TITLE = if ($branding.title) { $branding.title } else { "" } +} else { + $env:VITE_APP_BRANDING_LOGO_PATH = "" + $env:VITE_APP_BRANDING_TITLE = "" +} + npm -w packages/web run dev