Domain-level modules

Domain-level modules can declare and manage all units for a single domain.
The final goal of this module is to produce UI units that can be used in the Nest.js module and Next.js page.

Overview

Domain-level modules are created by dividing the code into common files, backend files, and frontend files to remove duplicate code declarations during this process.
Domain Module Architecture
Common + Backend MongoDB Model, Service Logic, Endpoint Nest.js Module
Common + Frontend fetch client, flux store, UI Next.js Component

1. Common files

Common files are files that are used in both the backend and frontend.
FileDescription
constantDefines the schema of data stored in the DB and the resolved form received through fetch.
dictionaryDefines the names, descriptions, API names, enums, error messages, etc. of the model and model fields in multiple languages.
signalDefines the data shape that the backend opens and the data shape received by the frontend.
Constraints
In common files, you cannot import or use dependent code or libraries on the backend/frontend, and you need to write code at the pure javascript level.
For example, you cannot call mongoose(backend), window(browser), etc., and you can only use the base/common library as an internal library.
However, type import is possible because it disappears during the transpilation process.

2. Backend files

Backend files are files that create a Nest.js module by creating MongoDB models, service-level business logic, and API endpoints.
FileDescription
document
constant 스키마 기반의 MongoDB Document/Modeland Redis cache, natural language search, etc.
serviceWrites the business logic that is actually needed for the domain operation.

3. Frontend files

Frontend files are files that define the client that fetches data from the endpoint, the basic state management system that supports CRUD, pagination, etc., and the domain-based UI components.
FileDescription
storeDefines the state and action related to the domain in the global single store.
TemplateDefines the UI components needed to create/update the domain data.
UnitDefines the UI components needed to display the domain data when multiple data is retrieved.
UtilDefines the UI components needed to create special functions related to the domain.
ViewDefines the UI components needed to display the domain data when a single data is retrieved.
ZoneCombines existing components to create a container that can be used in actual pages.

Frontend Component Summary

State Management

The store handles the domain state and business logic.

UI Component

Template, Unit, View provide reusable UI components.

Container

Zone combines components to create a complete page.

Released under the MIT License
Official Akan.js Consulting onAkansoft
Copyright © 2025 Akan.js. All rights reserved.
System managed bybassman