C
CanxJS
v1.6.2
  • Learn
  • Blog
  • Showcase
C
CanxJS

Ultra-fast async MVC backend framework for Bun. Build production-ready APIs with elegance and speed.

Resources

  • Documentation
  • Learn
  • Blog
  • Showcase

Documentation

  • Introduction
  • Installation
  • Core Concepts
  • CLI Commands
  • API Reference

Legal

  • Privacy Policy
  • Terms of Service

© 2026 CanxJS. All rights reserved.

Built with ❤️ for Candra Kirana

  • Citadel (Admin)
  • Dominion (RBAC)
  • Blocks (Modules)
  • Echo (Realtime)
  • Telescope (Debug)
  • Payment (Midtrans)
Official Package

Blocks

@canxjs/blocks enables modular architecture (HMVC) for large-scale CanxJS applications.

Installation

terminal
1npm install @canxjs/blocks

Folder Structure

Blocks looks for a modules directory in your project root.

structure
1/modules
2 /Blog
3 module.json
4 /src
5 BlogServiceProvider.ts
6 /controllers
7 /routes
8 api.ts

Module Configuration

Each module requires a module.json file.

module.json
1{
2 "name": "Blog",
3 "description": "Blog module",
4 "enabled": true,
5 "order": 1
6}

Generating Modules

terminal
1node canx make:module Blog

Benefits

  • ✓Separation of Concerns: Keep related features together.
  • ✓Reusability: Modules can be shared between projects.
  • ✓Organization: Prevents src/ clutter in large applications.

Next Steps

Explore more packages for building full-featured applications.