Akan.js
한국어
English
한국어
문서
컨벤션
레퍼런스
Cheatsheet
Akan.js
Akan.js v2 문서가 새로 나왔습니다.
v1 문서 보기
문서
컨벤션
레퍼런스
Cheatsheet
MIT 라이선스 하에 배포되었습니다.
Akan.js 공식 컨설팅 서비스
Akansoft
Copyright © 2026 Akan.js 모든 권리 보유.
시스템 관리자
bassman
워크스페이스 규칙
•
구조
•
포맷 & 린트
앱 & 라이브러리 규칙
•
애셋 (public/ private/)
•
컴포넌트 (ui/)
•
서버 유틸리티 (srvkit/)
•
웹 유틸리티 (webkit/)
•
공통 유틸리티 (common/)
•
akan.config.ts
도메인 규칙
•
개요
•
model.constant.ts
•
model.dictionary.ts
•
model.document.ts
•
model.service.ts
•
model.signal.ts
•
model.store.ts
•
Model.Template.tsx
•
Model.Unit.tsx
•
Model.Util.tsx
•
Model.View.tsx
•
Model.Zone.tsx
스칼라 규칙
•
개요
•
scalar.constant.ts
•
scalar.dictionary.ts
•
scalar.document.ts
•
Scalar.Template.tsx
•
Scalar.Unit.tsx
서비스 규칙
•
개요
•
service.dictionary.ts
•
service.service.ts
•
service.signal.ts
•
service.store.ts
•
Service.Util.tsx
•
Service.Zone.tsx
워크스페이스 규칙
•
구조
•
포맷 & 린트
앱 & 라이브러리 규칙
•
애셋 (public/ private/)
•
컴포넌트 (ui/)
•
서버 유틸리티 (srvkit/)
•
웹 유틸리티 (webkit/)
•
공통 유틸리티 (common/)
•
akan.config.ts
도메인 규칙
•
개요
•
model.constant.ts
•
model.dictionary.ts
•
model.document.ts
•
model.service.ts
•
model.signal.ts
•
model.store.ts
•
Model.Template.tsx
•
Model.Unit.tsx
•
Model.Util.tsx
•
Model.View.tsx
•
Model.Zone.tsx
스칼라 규칙
•
개요
•
scalar.constant.ts
•
scalar.dictionary.ts
•
scalar.document.ts
•
Scalar.Template.tsx
•
Scalar.Unit.tsx
서비스 규칙
•
개요
•
service.dictionary.ts
•
service.service.ts
•
service.signal.ts
•
service.store.ts
•
Service.Util.tsx
•
Service.Zone.tsx
이전
Model.Zone.tsx
다음
scalar.constant.ts
Scalar 개요
scalar는 작고 재사용 가능한 value object입니다. 같은 field 묶음이 여러 domain model 안에서 반복될 때 사용합니다.
예를 들어 product, order, invoice가 모두 price 값을 필요로 할 수 있습니다. 매번 `amount`와 `currency`를 다시 쓰는 대신 `Price` scalar를 한 번 정의하고 필요한 곳에 embed합니다.
Scalar를 쓰는 경우
다른 model의 일부로 저장되는 값이면 scalar를 사용합니다. 독립적인 list page, permission, service method, lifecycle이 필요하면 일반 module model을 사용합니다.
좋은 scalar 예시: Price, Address, ContactInfo, Coordinate, FileMeta.
좋은 module model 예시: Product, Order, User, Post, Ticket.
product.constant.ts
Scalar 파일
Scalar 파일은 `lib/__scalar/<scalarName>` 아래에 둡니다. constant, dictionary, document 파일로 시작하고, 재사용 UI가 필요할 때만 Template 또는 Unit 파일을 추가합니다.
*.constant.ts
: scalar field와 enum 값을 정의합니다.
*.dictionary.ts
: scalar field의 label과 description을 추가합니다.
*.document.ts
: 필요하면 작은 value helper method를 추가합니다.
*.Template.tsx
: 상위 form 안에서 scalar를 편집하는 재사용 editor를 렌더링합니다.
*.Unit.tsx
: 상위 card나 detail page 안에서 scalar를 표시하는 재사용 renderer를 렌더링합니다.
작은 예시
scalar는 그 자체로 이해하기 쉬워야 합니다. 아래 예시는 값의 형태만 정의하고, 저장, 로딩, 렌더링 방식은 상위 module이 결정합니다.
price.constant.ts
Scalar 개요
Scalar를 쓰는 경우
Scalar 파일
작은 예시