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
Format & Lint
Next
Components (ui/)

Asset Overview

Apps and libraries can both have an asset folder. Use public for files that the browser can request, and private for files that only server code should read.
asset/public/
Served as static assets. Use it for images, PDF files, downloadable JSON, icons, and other files that can be public.
asset/private/
Available only to server-side code. Use it for seed data, private JSON, model files, and resources used by server jobs.

Public Assets

Files under asset/public are copied to the app's public surface and served by the server. The browser can request them directly by URL.
public asset examples
Link to a PDF
Fetch static JSON

Optimized Images

When an image is public, you can render it with the Image component from akanjs/ui. Akan serves an optimized image response in a similar way to Next.js image optimization, so use this for UI images instead of a plain img tag when possible.
HeroImage.tsx

Private Assets

Files under asset/private are for server-only resources. Put files here when the browser should not download them directly, but the server needs them to load data, run inference, or initialize a service.
private asset examples
Load private JSON on the server
Use a private model file on the server

Library Asset Sync

When a library has assets, Akan syncs both public and private assets into each app. Public assets become browser-requestable files, while private assets stay server-only after sync.
library asset mapping
Use synced public library asset
Use synced private library asset

Practical Rules

Use public when the browser is allowed to request the file directly.
Use private when the file contains internal data, model weights, or server-only configuration.
Use Image from akanjs/ui for public UI images that should be optimized by the server.
Put reusable public files in a library asset folder when multiple apps need the same asset.
Asset Overview
Public Assets
Optimized Images
Private Assets
Library Asset Sync
Practical Rules