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
구조

Akan Config 개요

akan.config.ts는 앱 또는 라이브러리 설정의 진입점입니다. Akan은 이 파일을 기준으로 server, web, mobile app, database, build, image, environment 동작을 준비합니다.
빈 config로 시작해도 됩니다. Akan은 이 파일을 partial settings로 다루고, 선언하지 않은 값은 framework 기본값으로 채웁니다.
apps/myapp/akan.config.ts

설정 파일 형태

AppConfig와 LibConfig는 일반 객체 또는 함수가 될 수 있습니다. 대부분은 일반 객체로 충분합니다. config를 읽는 시점에 app 또는 library metadata가 필요할 때 함수 형태를 사용합니다.
object config
function config

routes

routes는 domain과 basePath를 하나의 앱에 연결합니다. 하나의 Akan 앱이 여러 brand, service, entry path를 제공해야 할 때 사용합니다.
Akan은 basePath를 정리하고, domain을 수집하며, branch 이름을 추가하고, 명시 domain이 없을 때 개발용 기본 domain을 생성합니다.
apps/shop/akan.config.ts
mobile target에서 basePath를 사용한다면 먼저 routes에 해당 basePath를 정의하세요. Akan은 mobile target의 basePath를 route 목록 기준으로 검증합니다.

mobile

mobile은 웹 surface를 Capacitor로 native app에 담아 배포할 때 사용하는 app identity와 target별 packaging 설정입니다.
빠진 값은 app name, com.<app>.app, version 0.0.1, build number 1, default target으로 채워집니다. target basePath는 routes에 존재해야 합니다.
apps/shop/akan.config.ts
로컬 keystore path와 private signing 값은 공유 예시에 넣지 마세요. machine-specific 값은 local-only file 또는 deployment secret으로 관리합니다.

defaultDatabaseMode

defaultDatabaseMode는 앱의 기본 database operating model을 선택합니다. 대부분의 앱은 비워두고 single database 기본값을 사용하면 됩니다.
Akan은 resolve된 mode를 app scan result에 저장해서 database 관련 command와 runtime setup이 같은 기본값을 공유하도록 합니다.
apps/enterprise/akan.config.ts
배포 모델에서 database 분리 또는 cluster 동작이 실제로 필요할 때만 커스터마이징하세요. 자세한 내용은 Database Mode를 참고하세요.

images

images는 Akan optimized image pipeline을 설정합니다. 허용 image size, output format, remote source, local path, redirect, timeout, byte limit을 제어합니다.
Akan은 image config를 기본값과 merge합니다. deviceSizes, imageSizes, formats, remotePatterns, localPatterns 같은 list 필드는 직접 설정하지 않으면 기본값을 유지합니다.
apps/catalog/akan.config.ts

i18n

i18n은 앱이 지원하는 locale과 사용자 선호를 resolve하지 못했을 때 사용할 default locale을 정의합니다.
Akan은 resolve된 default locale과 locale 목록을 build/runtime에서 사용할 수 있도록 AKAN_PUBLIC_DEFAULT_LOCALE, AKAN_PUBLIC_LOCALES에 기록합니다.
apps/global/akan.config.ts
여기에는 app-level language availability만 둡니다. 실제 번역 문구는 해당 text를 소유한 page, dictionary, localization layer에 둡니다.

publicEnv

publicEnv는 browser code에 노출해도 되는 environment key 목록입니다. 공개 가능한 값에 대한 allowlist로 다루세요.
Akan은 해당 목록을 resolved app config에 저장해서 build와 runtime code가 server-to-browser boundary를 넘어갈 수 있는 env 값을 알 수 있게 합니다.
apps/landing/akan.config.ts
secret, database URL, private token, server credential은 절대 publicEnv에 넣지 마세요.

externalLibs

externalLibs는 app code bundle에 포함하지 않을 dependency를 표시합니다. 여기에 선언된 dependency는 production build 단계에서 별도 package로 설치됩니다.
Akan은 externalLibs를 필수 SSR/native runtime package와 함께 production package dependencies에 포함합니다.
apps/media/akan.config.ts
native package나 runtime 처리에 민감한 package에 사용하세요. 일반 TypeScript helper는 보통 externalLibs가 필요하지 않습니다.

barrelImports

barrelImports는 barrel folder로 다뤄야 하는 import root를 추가합니다. Akan은 framework barrel과 각 app/library의 standard barrel folder를 기본으로 포함합니다.
Akan은 akanjs/webkit, akanjs/common, akanjs/ui, akanjs/client, akanjs/server 같은 framework 기본값으로 시작합니다. 또한 @apps/<app>/{ui,webkit,common,client,server}와 사용 중인 모든 @libs/<lib>의 동일 폴더를 추가합니다. 사용자가 추가한 값은 이 기본값 뒤에 붙습니다.
apps/admin/akan.config.ts
대부분의 ui, webkit, common, client, server 폴더는 이미 포함됩니다. standard facet 밖의 custom barrel에만 추가하세요.

optimizeImports

optimizeImports는 page가 실제 사용하는 것만 load하도록 optimized import handling에 참여할 package 또는 barrel을 지정합니다. Akan은 자주 쓰이는 UI, icon, chart, hook, utility package를 기본으로 포함합니다.
Akan은 사용자가 추가한 값을 lucide-react, date-fns, lodash-es, ramda, antd, ahooks, Heroicons, MUI, Recharts, react-use, Tabler icons, react-icons/* 같은 기본 optimized package 목록과 merge하고 중복을 제거합니다.
apps/dashboard/akan.config.ts
깔끔한 barrel 구조와 함께 사용하세요. 1 file = 1 export를 유지하면 optimized import 동작을 예측하기 쉽습니다.

docker

docker는 Akan이 앱용으로 생성하는 production container를 커스터마이징합니다. 배포에 추가 system package나 다른 startup command가 필요할 때만 사용합니다.
Akan은 base image, 기본 system package, 사용자 run script, app env 값, basePath, locale 값, command를 조합해 Dockerfile content를 생성합니다.
apps/worker/akan.config.ts
apps/custom-runtime/akan.config.ts
docker.content는 deployment image를 완전히 제어해야 할 때 유용합니다. 가능하면 기본 Dockerfile 흐름을 유지하세요. runtime package 설치, production dependency 설치, app file copy, Akan public env 설정, CMD 선언 순서입니다.

Library Config 필드

LibConfig도 같은 partial object 또는 function 형태를 사용하지만, 현재 실전에서 다루는 표면은 externalLibs입니다. shared library가 production runtime packaging에 포함되어야 하는 dependency를 감쌀 때 사용합니다.
Akan은 빠진 값을 빈 목록으로 resolve하고, 그 결과를 library scan result에 저장합니다.
libs/shared/akan.config.ts
Akan Config 개요
설정 파일 형태
routes
mobile
defaultDatabaseMode
images
i18n
publicEnv
externalLibs
barrelImports
optimizeImports
docker
Library Config 필드