Files
sam-react-prod/src/modules/types.ts
유병철 0a65609e5a feat: [Phase 1] 모듈 레지스트리 + 라우트 가드
- src/modules/ 모듈 시스템 (types, registry, tenant-config)
- useModules() 훅: 테넌트 industry 기반 모듈 활성화 판단
- ModuleGuard: 비허용 모듈 라우트 접근 차단 (클라이언트 사이드)
- (protected)/layout.tsx에 ModuleGuard 적용
- industry 미설정 테넌트는 가드 비활성 (하위 호환)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 14:54:42 +09:00

27 lines
701 B
TypeScript

/**
* 모듈 시스템 타입 정의
*
* Phase 1: 프론트 하드코딩 industry 매핑
* Phase 2: 백엔드 API에서 모듈 목록 수신
* Phase 3: JSON 스키마 기반 동적 페이지 조립
*/
/** 모듈 식별자 */
export type ModuleId =
| 'common'
| 'production'
| 'quality'
| 'construction'
| 'vehicle-management';
/** 모듈 매니페스트 — 각 모듈의 메타데이터 */
export interface ModuleManifest {
id: ModuleId;
name: string;
description: string;
/** 이 모듈이 소유하는 라우트 접두사 (예: ['/production']) */
routePrefixes: string[];
/** 이 모듈이 대시보드에 기여하는 섹션 키 */
dashboardSections?: string[];
}