Architecture Overview

Akan.js is a full-stack framework designed to accelerate modern web application development. It provides a cohesive architecture that seamlessly integrates backend, frontend, and DevOps systems into one unified development experience.
🎯 Core Philosophy
"Write once, use everywhere" - Define your data models once, and Akan.js automatically generates GraphQL APIs, database schemas, TypeScript types, frontend stores, and UI components.
System Components
📦Domain Module
Standardized folder structure implementing Domain-Driven Design. Encapsulates Backend, Frontend, and Common logic for each business domain (e.g., User, Product) into self-contained modules.
🖥️Backend System
Built on Nest.js, featuring a robust server cluster architecture (Federation & Batch modes). Uses MongoDB for persistence and Redis for caching/subscriptions.
🎨Frontend System
Powered by Next.js 15 App Router. features auto-generated stores (Zustand) and a comprehensive component library (Unit, View, Edit, Zone) for rapid UI development.
🌍Environment
Centralized configuration via baseEnv and baseClientEnv. Manages settings across diverse environments (Local, Debug, Develop, Main) and modes (SSR/CSR).

Domain Architecture

At the heart of Akan.js is a module-based architecture where each data model becomes a self-contained module. This structure promotes code organization, reusability, and maintainability across your entire application.
Each module is composed of specialized files that handle specific responsibilities:
1Constant & Scalar
Defines data models, types, and enums using built-in scalars (String, Int) and custom scalars (ID, JSON). This is the single source of truth.
2Document & Service
Backend layer. Document handles MongoDB operations and schema validation. Service contains business logic and orchestrates data flow.
3Signal (API)
Shared interface defining GraphQL endpoints (Slices, Endpoints). Acts as the contract between backend implementations and frontend consumers.
4Store & Components (Zone, View, Unit)
Frontend layer. Store manages state via Zustand. Standardized components (Zone, View, Unit) provide consistent UI rendering for models.
5Dictionary & CSS
Support layer. Dictionary handles i18n text. TailwindCSS & DaisyUI provide the styling foundation.

Data Flow Overview

Akan.js ensures a predictable data flow from user interaction to database persistence and back to the UI.
End-to-End Flow
UI (Page/Zone)
Store
Signal (GraphQL)
Service
Document
MongoDB
For detailed explanations of each layer, refer to the specific documentation sections in the sidebar menu.
Released under the MIT License
Official Akan.js Consulting onAkansoft
Copyright © 2025 Akan.js. All rights reserved.
System managed bybassman