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
Next
Structure

Module Overview

An Akan module is one business feature folder. It keeps the model shape, language, persistence behavior, business workflows, APIs, client state, and UI pieces close together.
This overview is a map. Use it to understand which file to open next, then move to each detail page for patterns and examples.

Module File Map

Most modules are easier to understand when split into two groups: data/server files and UI/client files. Each card links to the matching guide.
Data And Server Files
model.constant.ts
Defines the business data shape: fields, enums, model layers, helpers, hidden/secret fields, and resolved fields.
model.dictionary.ts
Defines user-facing language for fields, insights, queries, slices, endpoints, errors, and UI text.
model.document.ts
Defines persistence behavior: filters, document methods, model-level helpers, indexes, and schema hooks.
model.service.ts
Owns business workflows and coordinates generated document methods, injected services, and database operations.
model.signal.ts
Exposes APIs, slices, realtime messages, pubsub channels, internal tasks, guards, and resolved field handlers.
model.store.ts
Coordinates client state, form state, list state, generated fetch calls, toast messages, and UI-facing actions.
UI And Client Files
Model.Template.tsx
Renders form pieces and interaction fragments bound to store form state and generated setters.
Model.Unit.tsx
Renders reusable light-model display pieces such as cards, rows, avatars, columns, and compact summaries.
Model.View.tsx
Renders full-model detail UI for detail pages, view modals, and sections that need complete model data.
Model.Util.tsx
Packages small client helper UI such as action buttons, toolboxes, dialogs, query panels, and navigation helpers.
Model.Zone.tsx
Composes page sections with Load.Units, Load.View, Unit/View display, Util controls, and section-level UI state.

Server To Client Flow

A module usually grows from data shape to persistence, then to API, client state, and UI. You do not need every file for every feature, but this order keeps ownership clear.
constant
Start with the business shape and generated model layers.
dictionary
Give those fields, actions, errors, and UI phrases user-facing names.
document
Describe how stored documents are queried, changed, indexed, and loaded.
service
Implement business workflows using document helpers and other services.
signal
Expose server behavior as typed slices, endpoints, realtime channels, and tasks.
store
Connect generated fetch APIs to client state, form state, and UI actions.
UI files
Render forms, lists, detail views, actions, and page sections.
module flow

Role Boundaries

When a module becomes confusing, it is usually because logic moved into the wrong file. Use these boundaries before adding code.
Business rules
Put them in service, document, or constant helpers. Do not hide them inside render code.
API and access
Put slices, endpoints, guards, internal args, realtime, and tasks in signal.
Client coordination
Put fetch calls, form state, list state, toast messages, and UI actions in store.
Display
Use Unit for repeated light-model display and View for full-model detail display.
Page sections
Use Zone to compose Load wrappers, Unit/View, Util controls, and section layout.
Small controls
Use Util for toolboxes, action buttons, dialog triggers, query panels, and navigation helpers.

Recommended Reading Paths

Start from the task you are trying to build. The first file in each path is the best place to inspect or design the change.
New Model
constant -> dictionary -> document -> service -> signal -> store
Use this path when defining a business object from scratch.
New List Page
signal slice -> store -> Zone -> Unit
Use this path when a page needs list data, filtering, pagination, and cards.
New Detail Or Edit Page
signal view -> store -> Zone/View -> Template
Use this path when showing full data or editing an existing model.
New Action
service -> signal endpoint -> store action -> Util/Template button
Use this path when a user click should run a business workflow.

Practical Rules

Keep the overview short. Put detailed syntax and examples in each file-specific guide.
Let generated types and helpers connect files instead of copying shapes by hand.
Design server behavior before UI when a feature changes stored data.
Use UI files for composition and presentation, not hidden business decisions.
When a section gets large, move display into Unit/View and controls into Util before expanding Zone.
Module Overview
Module File Map
Server To Client Flow
Role Boundaries
Recommended Reading Paths
Practical Rules