image
Akan.js
English
DocsConventionsReferencesCheatsheet
image
Akan.js
Akan.js v2 docs are now available.View the v1 docs
DocsConventionsReferencesCheatsheet
Released under the MIT License
Official Akan.js Consulting onAkansoft
Copyright © 2026 Akan.js All rights reserved.
System managed bybassman
Workspace Convention
• Structure
• Format & Lint
App & Library Convention
• Assets (public/ private/)
• Components (ui/)
• Server Utils (srvkit/)
• Web Utils (webkit/)
• Common Utils (common/)
• akan.config.ts
Domain Convention
• Overview
• 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 Convention
• Overview
• scalar.constant.ts
• scalar.dictionary.ts
• scalar.document.ts
• Scalar.Template.tsx
• Scalar.Unit.tsx
Service Convention
• Overview
• service.dictionary.ts
• service.service.ts
• service.signal.ts
• service.store.ts
• Service.Util.tsx
• Service.Zone.tsx
Workspace Convention
• Structure
• Format & Lint
App & Library Convention
• Assets (public/ private/)
• Components (ui/)
• Server Utils (srvkit/)
• Web Utils (webkit/)
• Common Utils (common/)
• akan.config.ts
Domain Convention
• Overview
• 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 Convention
• Overview
• scalar.constant.ts
• scalar.dictionary.ts
• scalar.document.ts
• Scalar.Template.tsx
• Scalar.Unit.tsx
Service Convention
• Overview
• service.dictionary.ts
• service.service.ts
• service.signal.ts
• service.store.ts
• Service.Util.tsx
• Service.Zone.tsx
Previous
scalar.constant.ts
Next
scalar.document.ts

scalar.dictionary.ts

A scalar dictionary gives translated labels to a scalar value. It normally describes the scalar name, field labels, and enum values.
Keep it smaller than a module dictionary. A scalar usually does not have query, sort, slice, endpoint, or signal labels.

Basic Pattern

Start with `scalarDictionary(["en", "ko"])`. Then add the scalar name with `.of()`, field labels with `.model()`, and enum labels with `.enum()` when the scalar has an enum.
price.dictionary.ts

Builder Order

  1. .of(): names the scalar itself.
  2. .model(): labels each field from the scalar constant.
  3. .enum(): labels enum values only when the scalar has an enum.
  4. .translate(): adds small scalar-specific text only when needed.

Language Order

The language array controls every translation tuple. If the dictionary starts with `["en", "ko"]`, write English first and Korean second everywhere.
language order

Enum Name Matching

When a scalar constant uses `enumOf()`, the dictionary `.enum()` name must match the `enumOf()` name exactly.
price.constant.ts
price.dictionary.ts

Small Custom Text

Use `.translate()` only for short text that belongs to the scalar itself. If the text belongs to a page or action, keep it in the parent module dictionary.
price.dictionary.ts
PriceLabel.tsx
scalar.dictionary.ts
Basic Pattern
Builder Order
Language Order
Enum Name Matching
Small Custom Text