システムレジストリパターン
:LiTarget: 用途
社内で運用する全システムのメタ情報(URL/ローカルパス/担当者/技術スタック)を1ファイルで管理するパターン。
:LiSparkle: 特徴
- 全システム一覧の単一情報源
- 型安全
- メンテ容易
:LiCode: 実コード(SCALE Base より自動抽出)
:LiInfo:
lib/systems.tsの中身そのもの。コピペ即可。
import {
Search, ListTodo, AtSign, Briefcase, FolderKanban,
LayoutDashboard, FileText, Target, Crosshair, Columns3, Users, Settings,
PenTool, Calendar, BarChart3, Shield, Globe, Link2, Bot, FileBarChart,
Zap, Clock, Send, History, BookOpen, MessageSquare, TrendingUp,
Megaphone, UserPlus, LineChart, Layers, Hash, TestTube, Recycle, FileOutput, UserCircle,
type LucideIcon,
DollarSign, ClipboardList, Database, Video, Brain,
CheckSquare, Wallet, Wrench, Phone, Star, ScrollText, Activity,
ShieldCheck, UserCog, Building2, Lock, UserCheck, Calculator,
CreditCard, Receipt, Banknote, Kanban, Mail, ClipboardCheck,
Palette, Wand2, Image, Bookmark, Sparkles,
Pen, ScanEye, Languages, Notebook, SquarePen, AlertTriangle, FileClock
} from 'lucide-react';
export type SystemId = 'tasks' | 'docs' | 'admin' | 'services' | 'design' | 'writing' | 'x' | 'seo' | 'hp' | 'fs' | 'pm' | 'accounting' | 'hr' | 'ai-ops' | 'sites' | 'scale-lead' | 'assistant' | 'command' | 'datalake' | 'partners' | 'brand' | 'rnd' | 'scheduling' | 'contracts' | 'passwords' | 'changelog' | 'build';
// 吸収されたシステム → 親システムへのマッピング(URLは残しつつ、サイドバーは親を表示)
const SYSTEM_ABSORBED: Record<string, SystemId> = {
goals: 'tasks', // 目標管理 → タスク
pipeline: 'command', // Pipeline → Command Center
automation: 'ai-ops', // Automation → AI Ops
};
export interface NavItem {
label: string;
href: string;
icon: LucideIcon;
}
export interface SystemDef {
id: SystemId;
name: string;
shortName: string;
icon: LucideIcon;
color: string;
bgColor: string;
sections: NavItem[];
externalUrl?: string; // 外部独立アプリへのリンク(設定時は新規タブで開く)
}
export interface DepartmentGroup {
name: string;
systemIds: SystemId[];
}
export const departmentGroups: DepartmentGroup[] = [
// 全体: SCALE Base に常駐するコア機能。分離せずモノリス内にとどめる。
// 2026-04-29: PW管理 / 日程調整 / Design / Writing を分離キャンセルしてここに統合。
// 2026-04-30: AI Ops / Data Lake も全社横断基盤として「全体」に統合(分離キャンセル)。
{ name: '全体', systemIds: ['assistant', 'tasks', 'docs', 'admin', 'changelog', 'passwords', 'scheduling', 'design', 'writing', 'ai-ops', 'datalake'] },
{ name: 'システム開発', systemIds: ['build', 'services'] },
{ name: 'マーケティング', systemIds: ['x', 'seo', 'hp'] },
{ name: 'FS/PM/品質管理', systemIds: ['scale-lead', 'fs', 'pm'] },
{ name: '事業戦略', systemIds: ['command'] },
{ name: 'コーポレート', systemIds: ['accounting', 'contracts'] },
{ name: '人事', systemIds: ['hr', 'partners'] },
{ name: 'ブランド・PR', systemIds: ['brand'] },
{ name: 'R&D', systemIds: ['rnd'] },
];
export const systems: SystemDef[] = [
{
id: 'command',
name: 'Command Center',
shortName: '司令塔',
icon: LineChart,
color: '#c96868',
bgColor: 'rgba(201,104,104,0.15)',
sections: [
{ label: '経営サマリー', href: '/command', icon: LayoutDashboard },
{ label: '売上予測AI', href: '/command/forecast', icon: TrendingUp },
{ label: 'What-Ifシミュ', href: '/command/simulator', icon: Zap },
{ label: '全社KPI集約', href: '/command/kpis', icon: BarChart3 },
{ label: 'AI経営アラート', href: '/command/alerts', icon: AlertTriangle },
{ label: '日次サマリー', href: '/command/daily', icon: FileBarChart },
],
},
{
id: 'assistant',
name: 'AIアシスタント',
shortName: 'AI',
icon: Sparkles,
color: '#9078ad',
bgColor: 'rgba(144,120,173,0.15)',
sections: [
{ label: 'チャット', href: '/assistant', icon: MessageSquare },
{ label: '履歴', href: '/assistant/history', icon: History },
{ label: '連携ツール', href: '/assistant/tools', icon: Link2 },
{ label: '設定', href: '/assistant/settings', icon: Settings },
],
},
{
id: 'tasks',
name: 'Task',
shortName: 'Task',
icon: ListTodo,
color: '#3b82f6',
bgColor: 'rgba(59,130,246,0.15)',
sections: [
{ label: '作業報告', href: '/tasks/work-log', icon: Activity },
{ label: 'タスク管理', href: '/tasks/list', icon: FileText },
{ label: 'レポート', href: '/tasks', icon: BarChart3 },
{ label: 'カレンダー', href: '/tasks/calendar', icon: Calendar },
{ label: '設定', href: '/tasks/settings', icon: Settings },
],
},
{
id: 'sites',
name: 'サイト一覧',
shortName: 'サイト',
icon: Globe,
color: '#8b5cf6',
bgColor: 'rgba(139,92,246,0.15)',
sections: [
{ label: 'サイト一覧', href: '/sites', icon: Globe },
],
},
{
id: 'design',
name: 'Design Studio',
shortName: 'Design',
icon: Palette,
color: '#f43f5e',
bgColor: 'rgba(244,63,94,0.15)',
sections: [
{ label: 'ダッシュボード', href: '/design', icon: LayoutDashboard },
{ label: '制作', href: '/design/generate', icon: Wand2 },
{ label: 'アセット', href: '/design/projects', icon: Image },
{ label: 'ブランド・参考', href: '/design/brand', icon: Palette },
{ label: '設定', href: '/design/settings', icon: Settings },
],
},
{
id: 'writing',
name: 'Writing',
shortName: 'Writing',
icon: Pen,
color: '#f472b6',
bgColor: 'rgba(244,114,182,0.15)',
sections: [
{ label: 'ダッシュボード', href: '/writing', icon: LayoutDashboard },
{ label: '作成', href: '/writing/generate', icon: Sparkles },
{ label: '資産', href: '/writing/templates', icon: FileText },
{ label: '設定', href: '/writing/settings', icon: Settings },
],
},
{
id: 'x',
name: 'X',
shortName: 'X',
icon: AtSign,
color: '#a855f7',
bgColor: 'rgba(168,85,247,0.15)',
sections: [],
externalUrl: 'https://x.scale-group.co.jp/',
},
{
id: 'seo',
name: 'SEO',
shortName: 'SEO',
icon: Search,
color: '#22c55e',
bgColor: 'rgba(34,197,94,0.15)',
sections: [
{ label: 'ダッシュボード', href: '/seo', icon: LayoutDashboard },
{ label: 'キーワード管理', href: '/seo/keywords', icon: FileText },
{ label: 'KWリサーチ', href: '/seo/keywords/research', icon: Search },
{ label: 'コンテンツスタジオ', href: '/seo/content/new', icon: PenTool },
{ label: 'コンテンツ一覧', href: '/seo/content', icon: FileText },
{ label: 'カレンダー', href: '/seo/content/calendar', icon: Calendar },
{ label: '順位トラッキング', href: '/seo/rankings', icon: BarChart3 },
{ label: 'テクニカルSEO', href: '/seo/audit', icon: Shield },
{ label: '競合分析', href: '/seo/competitors', icon: Globe },
{ label: '被リンク分析', href: '/seo/backlinks', icon: Link2 },
{ label: 'AIアシスタント', href: '/seo/assistant', icon: Bot },
{ label: 'レポート', href: '/seo/reports', icon: FileBarChart },
{ label: '連携ツール', href: '/seo/tools', icon: Link2 },
{ label: '設定', href: '/seo/settings', icon: Settings },
],
},
{
id: 'hp',
name: 'HP管理',
shortName: 'HP',
icon: Globe,
color: '#0ea5e9',
bgColor: 'rgba(14,165,233,0.15)',
sections: [
{ label: 'ダッシュボード', href: '/hp', icon: LayoutDashboard },
{ label: 'ページ管理', href: '/hp/pages', icon: FileText },
{ label: 'CTA・フォーム管理', href: '/hp/cta', icon: Target },
{ label: 'アクセス解析', href: '/hp/analytics', icon: BarChart3 },
{ label: 'LP管理', href: '/hp/lp', icon: Layers },
{ label: 'ブログ・お知らせ', href: '/hp/blog', icon: PenTool },
{ label: 'SEO設定', href: '/hp/seo-settings', icon: Search },
{ label: 'リード管理', href: '/hp/leads', icon: Users },
{ label: '参考HP一覧', href: '/hp/references', icon: Globe },
{ label: 'AI流入分析', href: '/hp/ai-analysis', icon: Sparkles },
{ label: 'HPショーケース', href: '/hp/showcase', icon: Star },
{ label: '連携ツール', href: '/hp/tools', icon: Link2 },
{ label: '設定', href: '/hp/settings', icon: Settings },
],
},
{
id: 'fs',
name: 'FS',
shortName: 'FS',
icon: Briefcase,
color: '#b8794f',
bgColor: 'rgba(184,121,79,0.15)',
sections: [],
externalUrl: 'https://scale-fs.pages.dev/login/',
},
{
id: 'build',
name: 'SCALE Build',
shortName: 'Build',
icon: Wrench,
color: '#a855f7',
bgColor: 'rgba(168,85,247,0.15)',
sections: [],
externalUrl: 'https://build.scale-group.co.jp/',
},
// ─── SCALE CRM (id: 'crm'): 2026-05-04 完全削除(scale-base-crm.pages.dev に分離後の Base 内残骸を整理)───
{
id: 'scale-lead',
name: 'SCALE CRM',
shortName: 'CRM',
icon: Target,
color: '#6485b8',
bgColor: 'rgba(100,133,184,0.15)',
sections: [],
externalUrl: 'https://crm.scale-group.co.jp/',
},
{
id: 'pm',
name: 'PM',
shortName: 'PM',
icon: FolderKanban,
color: '#06b6d4',
bgColor: 'rgba(6,182,212,0.15)',
sections: [],
externalUrl: 'https://scale-pm.pages.dev/',
},
{
id: 'docs',
name: 'Docs',
shortName: 'Docs',
icon: BookOpen,
color: '#f59e0b',
bgColor: 'rgba(245,158,11,0.15)',
sections: [
{ label: 'ダッシュボード', href: '/docs', icon: LayoutDashboard },
{ label: 'ナレッジ', href: '/docs/input', icon: BookOpen },
{ label: 'マニュアル・手順', href: '/docs/sop', icon: ClipboardCheck },
{ label: '参照資料', href: '/docs/meetings', icon: MessageSquare },
{ label: '設定', href: '/docs/settings', icon: Settings },
],
},
{
id: 'hr',
name: 'Recruit',
shortName: 'Recruit',
icon: UserPlus,
color: '#ec4899',
bgColor: 'rgba(236,72,153,0.15)',
sections: [
{ label: 'ダッシュボード', href: '/hr', icon: LayoutDashboard },
{ label: 'パイプライン', href: '/hr/pipeline', icon: Columns3 },
{ label: '候補者一覧', href: '/hr/candidates', icon: Users },
{ label: '求人管理', href: '/hr/jobs', icon: Briefcase },
{ label: 'SNSスカウト', href: '/hr/scout', icon: Search },
{ label: '面談管理', href: '/hr/interviews', icon: Calendar },
{ label: 'オンボーディング', href: '/hr/onboarding', icon: ClipboardList },
{ label: 'テンプレート', href: '/hr/templates', icon: FileText },
{ label: '分析レポート', href: '/hr/analytics', icon: BarChart3 },
{ label: '評価・1on1', href: '/hr/performance', icon: Star },
{ label: 'カルチャー', href: '/hr/culture', icon: Sparkles },
{ label: 'AIアシスタント', href: '/hr/assistant', icon: MessageSquare },
{ label: '連携ツール', href: '/hr/tools', icon: Link2 },
{ label: '設定', href: '/hr/settings', icon: Settings },
],
},
{
id: 'accounting',
name: 'Finance',
shortName: 'Finance',
icon: Calculator,
color: '#14b8a6',
bgColor: 'rgba(20,184,166,0.15)',
sections: [],
externalUrl: 'https://finance.scale-group.co.jp/',
},
{
id: 'admin',
name: '管理',
shortName: '管理',
icon: ShieldCheck,
color: '#64748b',
bgColor: 'rgba(100,116,139,0.15)',
sections: [
{ label: 'ユーザー・部署', href: '/admin/users', icon: UserCog },
{ label: 'セキュリティ', href: '/admin/security', icon: Shield },
{ label: 'バックアップ', href: '/admin/backup', icon: Database },
{ label: '外部連携', href: '/admin/integrations', icon: Link2 },
],
},
{
id: 'changelog',
name: '更新履歴',
shortName: '更新履歴',
icon: FileClock,
color: '#3b82f6',
bgColor: 'rgba(59,130,246,0.15)',
sections: [
{ label: '更新履歴', href: '/changelog', icon: FileClock },
],
},
{
id: 'services',
name: 'サービス管理',
shortName: 'サービス',
icon: Sparkles,
color: '#6366f1',
bgColor: 'rgba(99,102,241,0.15)',
sections: [
{ label: 'ダッシュボード', href: '/services', icon: LayoutDashboard },
{ label: 'サービス一覧', href: '/services/list', icon: Layers },
{ label: 'システム設計書', href: '/services/specs', icon: FileText },
{ label: 'コードベース', href: '/services/code', icon: Database },
{ label: '管理画面', href: '/services/admin-panel', icon: Settings },
{ label: 'ドキュメント', href: '/services/docs', icon: BookOpen },
{ label: '連携ツール', href: '/services/tools', icon: Link2 },
],
},
{
id: 'datalake',
name: 'Data Lake',
shortName: 'Data',
icon: Database,
color: '#6395a3',
bgColor: 'rgba(99,149,163,0.15)',
sections: [
{ label: '概要', href: '/datalake', icon: LayoutDashboard },
{ label: 'データ・クエリ', href: '/datalake/sources', icon: Database },
{ label: '分析', href: '/datalake/dashboards', icon: BarChart3 },
{ label: 'ツール', href: '/datalake/export', icon: FileOutput },
],
},
{
id: 'ai-ops',
name: 'AI Ops',
shortName: 'AI Ops',
icon: Bot,
color: '#8b5cf6',
bgColor: 'rgba(139,92,246,0.15)',
sections: [
{ label: 'ダッシュボード', href: '/ai-ops', icon: LayoutDashboard },
{ label: 'エージェント', href: '/ai-ops/agents', icon: Bot },
{ label: '実行・運用', href: '/ai-ops/logs', icon: Activity },
{ label: '分析・API', href: '/ai-ops/performance', icon: BarChart3 },
{ label: 'Automation', href: '/automation', icon: Zap },
{ label: '設定', href: '/ai-ops/settings', icon: Settings },
],
},
{
id: 'partners',
name: 'Partners & Academy',
shortName: 'Partners',
icon: Users,
color: '#d97706',
bgColor: 'rgba(217,119,6,0.15)',
sections: [
{ label: 'ダッシュボード', href: '/partners', icon: LayoutDashboard },
{ label: 'パートナー一覧', href: '/partners/list', icon: Users },
{ label: '案件マッチング', href: '/partners/matching', icon: Link2 },
{ label: '成果レポート', href: '/partners/reports', icon: BarChart3 },
{ label: 'Academy 研修', href: '/partners/academy', icon: BookOpen },
{ label: '学習履歴', href: '/partners/learning', icon: History },
{ label: '設定', href: '/partners/settings', icon: Settings },
],
},
{
id: 'brand',
name: 'Brand & PR',
shortName: 'Brand',
icon: Megaphone,
color: '#db2777',
bgColor: 'rgba(219,39,119,0.15)',
sections: [
{ label: 'ダッシュボード', href: '/brand', icon: LayoutDashboard },
{ label: 'ブランドモニタ', href: '/brand/monitor', icon: ScanEye },
{ label: 'メンション解析', href: '/brand/mentions', icon: AtSign },
{ label: 'PR / IR', href: '/brand/pr', icon: Megaphone },
{ label: 'イベント管理', href: '/brand/events', icon: Calendar },
{ label: 'コミュニティ', href: '/brand/community', icon: MessageSquare },
{ label: '連携ツール', href: '/brand/tools', icon: Link2 },
{ label: '設定', href: '/brand/settings', icon: Settings },
],
},
{
id: 'rnd',
name: 'R&D Lab',
shortName: 'R&D',
icon: TestTube,
color: '#0ea5e9',
bgColor: 'rgba(14,165,233,0.15)',
sections: [
{ label: 'ダッシュボード', href: '/rnd', icon: LayoutDashboard },
{ label: 'リサーチ', href: '/rnd/research', icon: Search },
{ label: 'Innovation Lab', href: '/rnd/lab', icon: TestTube },
{ label: '実験ログ', href: '/rnd/experiments', icon: Activity },
{ label: '特許 / IP', href: '/rnd/ip', icon: Shield },
{ label: 'ナレッジ', href: '/rnd/knowledge', icon: BookOpen },
{ label: '連携ツール', href: '/rnd/tools', icon: Link2 },
{ label: '設定', href: '/rnd/settings', icon: Settings },
],
},
{
id: 'passwords',
name: 'PW管理',
shortName: 'PW',
icon: Lock,
color: '#8b5cf6',
bgColor: 'rgba(139,92,246,0.15)',
sections: [
{ label: 'PW一覧', href: '/passwords', icon: Lock },
],
},
{
id: 'contracts',
name: '契約書対応',
shortName: '契約書',
icon: ScrollText,
color: '#8b5cf6',
bgColor: 'rgba(139,92,246,0.15)',
sections: [],
},
{
id: 'scheduling',
name: '日程調整',
shortName: '日程調整',
icon: Calendar,
color: '#6485b8',
bgColor: 'rgba(100,133,184,0.15)',
sections: [
{ label: 'ビルダー', href: '/scheduling', icon: Calendar },
],
},
];
export function getSystemById(id: SystemId): SystemDef | undefined {
return systems.find(s => s.id === id);
}
export function getSystemByPath(pathname: string): SystemDef | undefined {
const segment = pathname.split('/').filter(Boolean)[0];
// 吸収されたシステム配下のURLは親システムを返す(例: /goals/* → tasks)
const targetId = (SYSTEM_ABSORBED[segment] || segment) as SystemId;
return systems.find(s => s.id === targetId);
}
:LiFolder: ソースファイルのパス
/Users/oogushiyuuki/Library/CloudStorage/GoogleDrive-y-ogushi@scale-group.co.jp/マイドライブ/AI/scale-base/lib/systems.ts
:LiHandPointer: 使い方
対象プロジェクトに該当ファイルをコピーして、props を流し込むだけ。
:LiAlertCircle: 注意事項
- 依存パッケージを忘れず追加