image
Akan.js
English
DocsConventionsReferencesCheatsheet
image
Akan.js
Akan.js v2 docs are now available.View the v1 docs
DocsConventionsReferencesCheatsheet
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
Next
구조

model.dictionary.ts

dictionary 파일은 module의 언어 레이어입니다. model field, insight 값, query, sort option, enum, slice, endpoint, error, module 전용 UI 문구에 사용자에게 보이는 이름을 붙입니다.
현재 패턴은 type 기반입니다. dictionary key는 임의의 번역 문자열이 아니라 constant, document filter, slice, endpoint의 shape을 따라가야 합니다.

Model dictionary 패턴

일반 document model에는 modelDictionary를 사용합니다. 보통 model 이름에서 시작해서 field label, insight label, document query/sort label, enum 값, signal label, error, custom UI text를 차례로 추가합니다.
ticket.dictionary.ts
.model
constant model의 field에 label을 붙입니다. id, createdAt, updatedAt, removedAt 같은 base field는 자동으로 추가됩니다.
.insight
reporting field에 label을 붙입니다. base insight인 count는 자동으로 추가됩니다.
.query / .sort
document filter option에 label을 붙입니다. any, latest, oldest 같은 base query/sort label이 포함됩니다.

Dictionary 사용하기

dictionary를 선언한 뒤에는 대부분 generated helper를 통해 사용합니다. client component는 usePage()로 번역 label을 읽고, server code는 error key로 Err를 던지며, client store는 msg로 번역된 toast message를 보여줍니다.
Client UI
Server Error
Client Toast

Generated dictionary 확장

app이 generated 또는 library model을 확장한다면 dictionary도 함께 확장합니다. ...user.dictionaries를 넘기면 base dictionary entry를 유지하면서 app이 custom field, endpoint, phrase만 추가할 수 있습니다.
user.dictionary.ts

Scalar와 service dictionary

module 형태에 따라 dictionary builder를 선택합니다. document model은 modelDictionary, embedded scalar 값은 scalarDictionary, service-only module은 serviceDictionary를 사용합니다.
modelDictionary
model, insight, query, sort, slice, endpoint, error, custom 번역이 필요한 document model에 사용합니다.
scalarDictionary
embedded scalar 값에 사용합니다. 보통 model field, enum 값, error, 작은 custom text 정도만 필요합니다.
serviceDictionary
document model이 없는 service module 또는 app-level dictionary에 사용합니다.
coordinate.dictionary.ts
util.dictionary.ts

Error, UI 문구, 언어 목록

domain error에는 error()를, module 전용 UI 문구에는 translate()를 사용합니다. 번역 배열의 순서는 language list와 정확히 일치해야 합니다.
ticket.dictionary.ts
akamir.dictionary.ts

실전 규칙

dictionary key는 typed constant, filter, slice, endpoint와 맞춰둡니다.
raw 변수명보다 사용자에게 읽히는 label을 사용합니다. 예를 들어 due보다 Due Date가 낫습니다.
generated docs, form, tooltip에 보일 수 있는 label에는 desc()를 추가합니다.
dictionary text를 보여줄 때 client UI에서는 usePage translation, server logic에서는 Err, client store에서는 msg를 사용합니다.
app 전용 번역을 추가하기 전에 ...model.dictionaries로 generated dictionary를 확장합니다.
모든 translation tuple은 language list와 같은 순서와 길이를 유지합니다.
model.dictionary.ts
Model dictionary 패턴
Dictionary 사용하기
Generated dictionary 확장
Scalar와 service dictionary
Error, UI 문구, 언어 목록
실전 규칙