Skip to main content

12 Modules Architecture

MStore Dashboard menggunakan arsitektur modular dengan 12 domain modules yang mencakup seluruh kebutuhan bisnis ERP.

Module Overview

Module Summary

#ModuleDomainDescriptionBusiness Level
0101_coreCoreAuth, notifications, settingsL0+
0202_financeFinanceInvoice, payment, AR/AP, ledgerL1+
0303_inventoryInventoryProducts, stock managementL0+
0404_procurementProcurementPO, suppliers, approvalsL0+
0505_salesSalesPOS, transactions, receiptsL0+
0606_hrHREmployees, payroll, attendanceL1+
0707_crmCRMCustomers, campaigns, leadsL1+
0808_csCustomer ServiceTickets, SLA, chatL1+
0909_auditAuditAudit logs, complianceL2+
1010_analyticsAnalyticsDashboards, KPI, reportsL2+
1111_holdingHoldingMulti-entity, consolidationL3+
1212_globalGlobalIAM, security, policiesL4

Business Levels

LevelNameDescription
L0Micro/SoloSingle owner, cashier
L1SMEManagers, supervisors
L2EnterpriseAuditors, analysts
L3HoldingMulti-entity management
L4MNCGlobal administrators

Module Details

01_core - Core Foundation

01_core

Purpose: Authentication, notifications, dan system settingsSubmodules:
  • auth/ - Login, logout, token management
  • notifications/ - Push notifications, alerts
  • settings/ - User preferences, app config
  • user/ - User profile, roles
Key Features:
  • JWT authentication
  • Role-based access control (RBAC)
  • Real-time notifications
  • Theme preferences
features/01_core/
├── api/
│   ├── auth/
│   │   ├── login.ts
│   │   ├── logout.ts
│   │   └── refreshToken.ts
│   └── notifications/
│       ├── getList.ts
│       └── markAsRead.ts
├── store/
│   ├── auth.ts
│   └── notifications.ts
├── composables/
│   ├── useAuth.ts
│   └── useNotifications.ts
└── types/
    ├── auth.types.ts
    └── notification.types.ts

02_finance - Finance Management

02_finance

Purpose: Manajemen keuangan, invoice, dan pembayaranSubmodules:
  • invoice/ - Pembuatan dan tracking invoice
  • payment/ - Metode pembayaran, reconciliation
  • ar/ - Accounts Receivable (piutang)
  • ap/ - Accounts Payable (hutang)
  • ledger/ - General ledger, trial balance
  • cashflow/ - Cash flow management
Key Features:
  • Multi-currency support
  • Tax calculation
  • Payment gateway integration
  • Financial reports
features/02_finance/
├── api/
│   ├── invoice/
│   ├── payment/
│   ├── ar/
│   └── ap/
├── store/
│   └── finance.store.ts
├── components/
│   ├── InvoiceTable.vue
│   ├── PaymentForm.vue
│   └── ARAPSummary.vue
└── types/
    └── finance.types.ts

03_inventory - Inventory Management

03_inventory

Purpose: Manajemen produk dan stokSubmodules:
  • product/ - Product master, categories
  • stock/ - Stock levels, warehouses
  • adjustment/ - Stock opname, variance
  • transfer/ - Inter-warehouse transfer
Key Features:
  • Multi-warehouse support
  • Barcode/SKU management
  • Stock alerts (low stock)
  • Batch/serial tracking
features/03_inventory/
├── api/
│   ├── getList.ts
│   ├── create.ts
│   ├── update.ts
│   └── delete.ts
├── store/
│   └── inventory.store.ts
├── components/
│   ├── InventoryTable.vue
│   ├── ProductForm.vue
│   └── StockAdjustment.vue
├── composables/
│   ├── useInventoryList.ts
│   └── useStockOpname.ts
└── types/
    └── inventory.types.ts

04_procurement - Procurement

04_procurement

Purpose: Purchase order dan supplier managementSubmodules:
  • po/ - Purchase Order creation, tracking
  • rfq/ - Request for Quotation
  • supplier/ - Supplier master, contacts
  • approval/ - Multi-level approval workflow
Key Features:
  • Supplier comparison
  • PO approval workflow
  • Goods receipt
  • Supplier performance tracking

05_sales - Sales & POS

05_sales

Purpose: Point of Sale dan transaksi penjualanSubmodules:
  • pos/ - POS interface, cart
  • checkout/ - Payment collection
  • receipt/ - Receipt printing
  • transaction/ - Transaction history
  • return/ - Sales return handling
  • shift/ - Shift management
Key Features:
  • Offline-capable POS
  • Multiple payment methods
  • Thermal printer support
  • Real-time stock update
features/05_sales/
├── api/
│   ├── createTransaction.ts
│   ├── getTransactions.ts
│   └── processReturn.ts
├── store/
│   ├── sales.store.ts
│   └── cart.store.ts
├── components/
│   ├── POSInterface.vue
│   ├── CartSummary.vue
│   └── ReceiptPreview.vue
└── composables/
    ├── usePOS.ts
    └── useCheckout.ts

06_hr - Human Resources

06_hr

Purpose: Employee management dan payrollSubmodules:
  • employee/ - Staff directory, profiles
  • attendance/ - Check-in/out, timesheet
  • leave/ - Leave requests, balance
  • payroll/ - Salary, deductions
Key Features:
  • Attendance tracking
  • Leave management
  • Payroll calculation
  • Employee documents

07_crm - Customer Relationship

07_crm

Purpose: Customer management dan marketingSubmodules:
  • customer/ - Customer database
  • campaign/ - Marketing campaigns
  • lead/ - Lead tracking
  • loyalty/ - Loyalty program
Key Features:
  • Customer segmentation
  • Campaign management
  • Lead pipeline
  • Points/rewards system

08_cs - Customer Service

08_cs

Purpose: Customer support dan ticketingSubmodules:
  • ticket/ - Support tickets
  • chat/ - Real-time messaging
  • sla/ - SLA tracking
  • kb/ - Knowledge base
Key Features:
  • Ticket management
  • Multi-channel support
  • SLA monitoring
  • Self-service portal

09_audit - Audit & Compliance

09_audit

Purpose: Audit trail dan complianceSubmodules:
  • log/ - Activity logging
  • compliance/ - Compliance reporting
  • sod/ - Segregation of Duties
  • report/ - Audit reports
Key Features:
  • Full audit trail
  • Compliance checklists
  • SoD validation
  • Regulatory reports

10_analytics - Analytics & BI

10_analytics

Purpose: Business intelligence dan reportingSubmodules:
  • dashboard/ - KPI dashboards
  • report/ - Custom reports
  • kpi/ - Key performance indicators
  • forecast/ - Sales forecasting
Key Features:
  • Real-time dashboards
  • Custom report builder
  • KPI tracking
  • Predictive analytics

11_holding - Multi-Entity

11_holding

Purpose: Multi-company dan consolidationSubmodules:
  • entity/ - Entity registry
  • consolidation/ - Financial consolidation
  • intercompany/ - Intercompany transactions
Key Features:
  • Multi-entity management
  • Consolidated reporting
  • Intercompany elimination
  • Group-level analytics

12_global - Global Administration

12_global

Purpose: Global settings dan securitySubmodules:
  • iam/ - Identity & Access Management
  • security/ - Security policies
  • policy/ - Business rules (OPA)
  • esg/ - ESG compliance
Key Features:
  • SSO integration
  • Policy management
  • Security monitoring
  • ESG reporting

Module Dependencies

Adding New Module

1

Create Module Structure

# Create new module (e.g., 13_new_module)
mkdir -p features/13_new_module/{api,components,composables,store,types}
2

Define Types

// features/13_new_module/types/index.ts
export interface NewEntity {
  id: string
  name: string
  createdAt: Date
}
3

Create Store

// features/13_new_module/store/newModule.store.ts
export const useNewModuleStore = defineStore('newModule', () => {
  const items = ref<NewEntity[]>([])
  const loading = ref(false)

  return { items, loading }
})
4

Create Barrel Export

// features/13_new_module/index.ts
export * from './api'
export * from './store'
export * from './composables'
export * from './types'
5

Create Pages

mkdir -p app/pages/new-module
touch app/pages/new-module/index.vue

Best Practices

  • Setiap module harus self-contained
  • Hindari direct import antar module (gunakan store)
  • Share utilities via utils/ folder
  • Share types via barrel export
// Good: Use store
import { useInventoryStore } from '~/features/03_inventory'
const inventoryStore = useInventoryStore()

// Avoid: Direct import
import { getInventoryList } from '~/features/03_inventory/api/getList'
  • Module folder: {number}_{name} (e.g., 03_inventory)
  • Store: use{Module}Store
  • Composable: use{Module}{Action}
  • Component: {Module}{Type}

Next Steps