image
Akan.js
English
DocsConventionsReferencesCheatsheet
image
Akan.js
DocsConventionsReferencesCheatsheet
Released under the MIT License
Official Akan.js Consulting onAkansoft
Copyright © 2026 Akan.js All rights reserved.
System managed bybassman
General
• Authorization
• Schema Design
• Edge Computing
• File Management
• Single Sign-On
• DataList & Enum
Interface
• CRUD
• Endpoint
• Form
Observability
• Logging
• Dependency Injection
• Error Handling
• Metrics
Performance
• Caching
• Image Optimization
• Lazy Loading
• Querying
• Queueing
• Realtime
Development
• Documentation
• Script
• Docker
• Kubernetes
General
• Authorization
• Schema Design
• Edge Computing
• File Management
• Single Sign-On
• DataList & Enum
Interface
• CRUD
• Endpoint
• Form
Observability
• Logging
• Dependency Injection
• Error Handling
• Metrics
Performance
• Caching
• Image Optimization
• Lazy Loading
• Querying
• Queueing
• Realtime
Development
• Documentation
• Script
• Docker
• Kubernetes
Previous
CRUD
Next
Form

Endpoint Actions

CRUD handles the common actions. Endpoint is for one clear business action, such as publish, approve, reject, archive, or send notification.
A good rule is: one button action, one store action, one endpoint, one service method.

The Flow

  1. User clicks a button in a Util component.
  2. The button calls a store action.
  3. The store action calls the generated fetch endpoint.
  4. The endpoint delegates real work to the service.
Button to service

Declare Endpoint

Keep the endpoint thin. It receives parameters, checks guards if needed, and calls the service method.
Publish endpoint

Put Rules In Service

The service is where you write business rules. For example, a post can be published only when it has a title and content.
Service method

Call It From Store

Store actions make the UI code short. They can call fetch, show a message, close a modal, or refresh data after the endpoint succeeds.
Store action

Make One Util

Put the button in `Post.Util.tsx`. Then every card, detail page, or admin page can reuse the same action.
Publish button

Tips

  • Use endpoint names as verbs: `publishPost`, `approveTicket`, `archiveProject`.
  • Do not put business rules in the button. Put them in the service.
  • If the same action appears twice, make a Util component before copying the button.
Endpoint Actions
The Flow
Declare Endpoint
Put Rules In Service
Call It From Store
Make One Util
Tips