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
Model.Unit.tsx
Next
Model.View.tsx

model.Util.tsx

A Util file contains small client-side helper components for a module. It is a good home for action buttons, toolboxes, dialog triggers, query controls, and context-aware navigation pieces.
Use Util to keep Page, Zone, Unit, Template, and View files focused. Util components should package interaction UI, not own core business rules.

File Convention

Util files usually use client hooks and event handlers, so they start with the use client directive. Export named components that describe the action or helper clearly.
Path
lib/[model]/[Model].Util.tsx
Directive
"use client"
Exports
Remove, Toolbox, SetOrg, QueryMaker, BackButton

Model Wrapper Actions

Many Util components are small controls around generated model wrappers. A toolbox can collect edit, remove, and other model actions without making the Unit or Zone file noisy.
Project.Util.tsx
__Model__.Util.tsx

Dialog And Modal Actions

Use Util when an action needs its own dialog, confirmation UI, or small local state. Local component state is fine when it only belongs to that interaction.
BizLicense.Util.tsx
Report.Util.tsx

Query And Context Utilities

Util files are also useful for query panels and route-aware helper UI. They can read store state and route context, then call generated store actions or router helpers.
Ticket.Util.tsx
Board.Util.tsx

Practical Rules

Use usePage for labels instead of hard-coded action text.
Call st.do actions or Model wrappers from Util components; keep core business rules elsewhere.
Use local state only for UI-only interaction values such as an opened dialog or selected option.
Keep props explicit so the caller can see which model id, slice, role, or name the action depends on.
Split big toolboxes or workflow modals into named exports instead of hiding too much in one component.
model.Util.tsx
File Convention
Model Wrapper Actions
Dialog And Modal Actions
Query And Context Utilities
Practical Rules