Upgrade to Pro — share decks privately, control downloads, hide ads and more …

グローバルなコンパウンドプロダクトのためのフロントエンドアーキテクチャ設計 #MOSHTech

グローバルなコンパウンドプロダクトのためのフロントエンドアーキテクチャ設計 #MOSHTech

Avatar for Masayuki Takahashi

Masayuki Takahashi

January 07, 2026
Tweet

More Decks by Masayuki Takahashi

Other Decks in Technology

Transcript

  1. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    自己紹介 • 業務 ◦ HR領域のプロダクト開発エンジニア ◦ プロダクト全体のUIUX改善 • 経歴 ◦ 2021/04 ASP事業会社 ◦ 2022/04 株式会社HRBrain ◦ 2025/10 Dress Code株式会社 • 技術 ◦ ユーザー体験とか考えるのが好き ◦ フロント専任からフルスタックに挑戦中 • 趣味 ◦ コーヒー / スプラトゥーン もず(@mozu1206) 2
  2. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    14.1億円  資金調達を実施 Pre Seed&Seed Round 180+社 が利用中  Number of companies Number of countries 5カ国 で事業を展開  Dress Code 会社概要 Company Name / 会社名 Dress Code 株式会社 2024年9月 正式創業:2025年4月 29名 東京都中央区築地2-1-4 銀座PREX East 8F CEO / 代表取締役 Date of establishment / 設立年月 Location / 所在地 江尻 祐樹 Member / メンバー数 3
  3. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    デジタル化に伴う社会課題 -「摩擦問題」 - SaaS/ツール乱立に伴い、システムの分断・業務のサイロ化が進む 採用 部門 法務 部門 労務 部門 人事 部門 情報 システム 部門 総務 部門 採用管理 システム 契約管理 システム 労務管理 システム 勤怠管理 システム SaaS管理 システム デバイス 管理台帳 採用関連データ 契約関連データ 労務関連データ 勤怠関連データ SaaS関連データ デバイス関連データ ツールの乱立で、使いこなせない/慣れるのまでに時間がかかる ツール/部門間のアナログ連携が大変 担当間/部門間の摩擦が増大している 各業務担当者 経営/管理部全体 最適なSaaSを選定することが困難 データが散在していて利用/活用できない 連携/メンテのためのコスト(時間・お金)が膨大 ❌
 分断
 ❌
 分断
 ❌
 分断
 ❌
 分断
 ❌
 分断
 5
  4. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    8 フロントエンドアーキテクチャの全体像
  5. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    9 フロントエンドアーキテクチャの全体像 ・componentsに共通UI ・shadcn/UIをベースに設計 ・featuresに共通機能  ・動的に変わるフォームの生成 ・libに翻訳ファイルなど  ・6言語対応 ・routes配下はTanStack系のあれこれ
  6. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    10 routes配下を少し深掘り ・TanStack Router のルーティング規則に従い「-」で区切って分離  ・分離する際は bulletproof-react の思想に則って設計 ・ページ特有のコンポーネントが必要な場合は「-components」で定義
  7. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    11 bulletproof-react のfeaturesの設計思想 https://github.com/alan2207/bulletproof-react/blob/master/docs/project-structure.md
  8. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    12 AIに「うちの設計なんて説明すると良い?」 と聞いたら
  9. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    13 bulletproof-react の設計原則 & TanStack Query のベストプラクティス が掛け合わさった設計
  10. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    14 結構ちゃんと設計されてる気がします
  11. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    15 問題なんか起きなそうな気がしてきます
  12. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    16 でもディレクトリ構成を良くみてください
  13. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    19 bulletproof-react のfeaturesの設計思想 https://github.com/alan2207/bulletproof-react/blob/master/docs/project-structure.md
  14. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    20 このComponentsのあり方で課題があった
  15. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    21 プロダクト全体を回遊していて あることに気付いた
  16. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    22 UIが微妙に異なる Comboboxたち
  17. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    23 これらのコンポーネントどこにいるんだ?
  18. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    24 共通UI用のcomponentsにComboboxが乱立 components/Combobox/ ├── index.tsx ← 汎用(291行) ├── PersonSelectorCombobox/ ← 人選択用 ├── SoftwareSelectorCombobox/ ← ソフト選択用 ├── DepartmentCombobox/ ← 部署選択用 ├── NetworkCombobox/ ← ネットワーク選択用 ├── WorkerTypeCombobox/ ← 雇用形態選択用 └── ...
  19. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    25 ここのcomponents 整備した方が良さそう
  20. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    27 課題 20以上の機能で同じ操作性を提供したいが…  ・各機能が独自のビジネスロジックを持ち、表示したいものが異なる  ・整ったデザインシステムを作るにも開発速度に整備が追いつかない
  21. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    28 独自でコンポーネントを増やしても 統一した体験を提供できる状態を目指す
  22. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    29 そもそもなぜこの状態に陥ったか
  23. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    30 共通UIコンポーネントの拡張ではなく ヘッドレスUIを独自で拡張する実装
  24. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    31 一旦Comboboxどうにかするか
  25. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    32 Radix UIにはComboboxがなかったが Base UIというものにはあるらしい
  26. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    33 Base UIとは ・Radix UIを作ったチーム + αが、再び作り直したヘッドレスUI ・Comboboxを専用設計で提供 ・Radix UI + cmdk から Base UI に統一できそう ・React 19対応、TypeScript完全対応 ・Radix UIとの互換性が意識されている ・shadcnも最近Base UIに対応している https://x.com/shadcn/status/1999530415653113871
  27. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    34 共通UIコンポーネントのアーキテクチャ整理 & Radix UI + cmdkからBase UIへの乗り換え
  28. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    35 独自コンポーネントを作りやすい3層アーキテクチャ 1. components/ui/combobox.tsx →Base UIをラップして、スタイルのみ整えたUI層 2. components/Combobox/BaseUICombobox/ →状態管理 + 共通ロジックを注入したComponents層 3. features/person/components/PersonSelectorCombobox/ →ビジネスロジック + カスタムフックを注入したFeatures層
  29. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    36 独自コンポーネントを作りやすい3層アーキテクチャ 1. components/ui/combobox.tsx →Base UIをラップして、スタイルのみ整えたUI層 2. components/Combobox/BaseUICombobox/ →状態管理 + 共通ロジックを注入したComponents層 3. features/person/components/PersonSelectorCombobox/ →ビジネスロジック + カスタムフックを注入したFeatures層 体験を設計 ロジック 注入
  30. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    37 UI層とComponents層(イメージ)
  31. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    39 Features層での再利用パターン ・他の用途でも全部同じ構造 ・カスタムフックを書くだけで、コンポーネント自体の体験は同じ
  32. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    40 UI提供とロジック注入の責務分離 components/ ├── ui/combobox.tsx └── Combobox/BaseUICombobox/index.tsx features/ ├── /software/components/SoftwareSelectorCombobox/ ├── /device/components/DeviceSelectorCombobox/ ├── /person/components/PersonSelectorCombobox/ └── ...
  33. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    42 未来のデザインシステム
  34. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    44 まとめ ・bulletproof-react の設計思想は関心事が分かれて管理しやすい ・componentsが増えるので、管理は気を付けよう ・UIとロジックを分離した3層に分けることで統一した体験を提供できる ・featuresで独自コンポーネントを作っても体験に差が生まれにくい ・共通UIのcomponentsにはロジックを侵食させない強い意志が大事 ・ui→component→featureの一方向の依存関係を厳守
  35. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    共通UIコンポーネントを デザインシステムに昇華させる 46
  36. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    47 ”グローバル”に挑戦する仲間を募集しています! • PdM(プロダクトマネージャー) • コミュニケーションデザイナー • デジタルプロダクトデザイナー • デザインエンジニア • プロダクトエンジニア • SRE・QA • etc… Dress Code イベント登壇情報まとめ
  37. CONFIDENTIAL | © Dress Code Inc . All rights reserved.

    48 ご清聴ありがとうございました!!!