Skip to main content

RBAC UI/UX Specification by Business Level (L0–L4)

Dokumentasi lengkap spesifikasi UI/UX untuk semua role di setiap business level, dari Micro/Solo hingga MNC/Global.

🎯 Shared Design Principles

Prinsip desain yang konsisten di semua level:

Mobile-First

Semua elemen optimized untuk tap jempol kanan

Offline-Ready

SQLite local + auto-sync saat online

Zero Training

Icon intuitif, max 3 klik per transaksi

Minimal UI

Konsisten color system & typography

🎨 Visual Design System (All Levels)

Color Palette

ElementColorUsage
Primary#7C3AED (Purple)Buttons, headers, active state
Success#10B981 (Green)Revenue, profit, success messages
Danger#EF4444 (Red)Expense, alerts, delete actions
Warning#F59E0B (Orange)Low stock, pending approval
Info#3B82F6 (Blue)Cash balance, info messages
Neutral#6B7280 (Gray)Text, borders, disabled state

Typography

- Heading 1: 24px, Bold (Dashboard titles)
- Heading 2: 20px, SemiBold (Section headers)
- Body Large: 16px, Regular (Cards, buttons)
- Body: 14px, Regular (Table, list)
- Caption: 12px, Regular (Timestamps, hints)

Spacing

- Padding Card: 16px
- Gap between cards: 12px
- Bottom Nav height: 64px
- FAB size: 56x56px

🧩 L0 — Micro / Solo

Target Bisnis: Warung, freelancer, usaha solo (1-3 orang)
Fokus: Simplicity, offline-first, zero training needed
Setup Time: < 5 menit

L0_OWNER Role

Akses: Full (CRUD semua modul)
Navigation: Bottom Navigation Bar (5 ikon)
Route: /dashboard
Icon: 🏠

Components:

  • Penjualan Hari Ini (Card besar, warna hijau)
    • Total transaksi (angka besar)
    • Jumlah item terjual
    • Mini line chart 7 hari terakhir
  • Saldo Kas (Card sedang, warna biru)
    • Kas tunai
    • Kas bank/e-wallet
    • Icon alert jika < threshold
  • Laba Harian (Card sedang, warna ungu)
    • Profit margin %
    • Bandingkan vs kemarin
    • Icon trend (↑/↓)

Quick Actions (FAB):

  • ➕ Transaksi Baru
  • 📦 Tambah Produk
  • 📊 Lihat Laporan

L0_CASHIER Role

Akses: Write (hanya transaksi & shift)
Navigation: Bottom Navigation Bar (4 ikon)
Route: /pos
Icon: 💵

Perbedaan dari Owner:

  • Tidak bisa edit harga produk
  • Tidak bisa delete transaksi
  • Tidak bisa lihat total laba (hanya pendapatan)

L0_VIEWER Role

Akses: Read-only (semua modul)
Navigation: Bottom Navigation Bar (3 ikon)
Route: /dashboard
Icon: 📊

Perbedaan:

  • Semua tombol “Edit” disabled
  • Tidak ada FAB (Quick Actions)
  • Badge 🔒 di pojok kanan atas

🧩 L1 — SME

Target Bisnis: Toko retail, cafe, restaurant (5-20 orang)
Fokus: Department-based, basic approval
Setup Time: 15-30 menit

Key Differences from L0:

  • Multi-user dashboard: Lihat aktivitas team
  • Department views: Finance, Inventory, HR tabs
  • Basic approval: Approval untuk PO, SO
  • Audit trail: Log aktivitas per user
  • More reports: Laporan per departemen
L1_OWN-MGR: 6 tabs (Dashboard, Finance, Inventory, HR, Reports, Settings)
L1_FIN-MGR: 4 tabs (Dashboard, Finance, Reports, Export)
L1_INV-MGR: 4 tabs (Dashboard, Inventory, Reports, Export)
L1_HR-MGR: 4 tabs (Dashboard, HR, Payroll, Reports)
L1_CSH: 4 tabs (POS, Quick Products, History, Close Shift)
L1_AUD: 3 tabs (Dashboard, Audit Logs, Reports)

🧩 L2 — Enterprise

Target Bisnis: Manufaktur, distribusi, multi-branch (20-100 orang)
Fokus: Multi-department, approval flow, SoD enforcement
Setup Time: 1-2 jam

Key Differences from L1:

  • Advanced dashboard: KPI per departemen, drill-down analytics
  • Approval workflow: Multi-level approval (L1, L2)
  • SoD enforcement: UI blocks invalid role combinations
  • Advanced reports: Pivot tables, custom reports
  • Audit trail: Detailed logging dengan SoD validation
  • Multi-branch: Branch selector, consolidation view
L2_OWN-MGR: 8 tabs (Dashboard, Finance, Operations, Marketing, Reports, Audit, Settings, Admin)
L2_ADM-BIZ: 5 tabs (Business Config, Branches, Roles, Workflows, Audit)
L2_ADM-SYS: 5 tabs (System Health, Users, Backup, Logs, Settings)
L2_FIN-AP/AR/CASH: 4 tabs (Dashboard, Transactions, Approval Queue, Reports)
L2_ACC-MGR: 4 tabs (Dashboard, Journal, Approval, Reports)
L2_APV-L1/L2: 3 tabs (Approval Queue, History, Reports)

🧩 L3 — Holding

Target Bisnis: Multi-entity, holding company (100-500 orang)
Fokus: Multi-entity consolidation, domain isolation
Setup Time: 2-4 jam

Key Differences from L2:

  • Entity selector: Switch between entities
  • Consolidation dashboard: Group-level KPI
  • Intercompany transactions: Track cross-entity flows
  • Multi-currency: Currency conversion, FX management
  • Group reporting: Consolidated P&L, balance sheet
  • Domain isolation: Role access per entity
L3_OWN-MGR-HLD: 8 tabs (Group Dashboard, Entities, Finance, Consolidation, Reports, Audit, Settings, Admin)
L3_CONS-MGR: 4 tabs (Consolidation, Intercompany, Reports, Export)
L3_AUD-GRP: 4 tabs (Group Audit, Entity Audit, Logs, Reports)
L3_BI-MGR: 4 tabs (Dashboards, KPI Design, Reports, Export)

🧩 L4 — MNC / Global

Target Bisnis: Multi-country, public company (500+ orang)
Fokus: Global governance, compliance, SSO
Setup Time: 4-8 jam

Key Differences from L3:

  • Region selector: Switch between regions/countries
  • Executive dashboard: C-level strategic view
  • Compliance dashboard: SOX, ISO, GDPR compliance status
  • Global reporting: Multi-currency, multi-country consolidation
  • SSO integration: Single sign-on, MFA
  • Advanced audit: Detailed SoD validation, anomaly detection
L4_BOARD-CXO: 6 tabs (Executive Dashboard, Strategy, Compliance, Global Reports, Audit, Settings)
L4_GOV-COMP: 5 tabs (Compliance Dashboard, Audit Trail, SoD Validation, Reports, Export)
L4_IT-SYS-GLB: 5 tabs (System Monitor, IAM, Security, Logs, Settings)
L4_FIN-GLB: 4 tabs (Global Finance, Consolidation, Reports, Export)

📱 Navigation Patterns by Level

L0 Bottom Navigation

┌──────┬──────┬──────┬──────┬──────┐
│  🏠  │  💵  │  📦  │  📊  │  ⚙️  │
│ Home │  POS │ Item │ Rep. │ Set. │
└──────┴──────┴──────┴──────┴──────┘

L1 Bottom Navigation (Owner)

┌──────┬──────┬──────┬──────┬──────┬──────┐
│  🏠  │  💰  │  📦  │  👥  │  📊  │  ⚙️  │
│ Dash │ Fin. │ Inv. │  HR  │ Rep. │ Set. │
└──────┴──────┴──────┴──────┴──────┴──────┘

L2 Top Navigation (Tabbed)

Dashboard | Finance | Operations | Marketing | Reports | Audit | Settings | Admin

L3 Sidebar Navigation

Group Dashboard
├── Entities
├── Finance
├── Consolidation
├── Reports
├── Audit
├── Settings
└── Admin

L4 Sidebar Navigation (Advanced)

Executive Dashboard
├── Strategy & KPI
├── Compliance
├── Global Reports
├── Audit & SoD
├── Regional View
├── Settings
└── Admin

🧪 Component Library (All Levels)

Core Components

// Untuk display KPI
class MetricCard extends StatelessWidget {
  final String title;
  final String value;
  final IconData icon;
  final Color color;
  final String? trend; // "+12%" atau "-5%"
  
  // Tap action → detail page
}
// Grid/List produk
class ProductCard extends StatelessWidget {
  final String name;
  final double price;
  final int stock;
  final String? imageUrl;
  final VoidCallback onTap;
  final VoidCallback? onEdit; // null untuk read-only
}
// List transaksi
class TransactionCard extends StatelessWidget {
  final String invoiceNo;
  final DateTime timestamp;
  final double total;
  final PaymentStatus status;
  final VoidCallback onTap;
}
// Approval queue (L2+)
class ApprovalCard extends StatelessWidget {
  final String docNo;
  final String type; // PO, SO, Payment
  final double amount;
  final DateTime createdAt;
  final String createdBy;
  final VoidCallback onApprove;
  final VoidCallback onReject;
}

🔄 Offline-First Strategy (All Levels)

Local Database (SQLite/Isar)

// Tables
- products (id, name, price, stock, sync_status)
- transactions (id, invoice_no, total, items, sync_status)
- approvals (id, doc_no, type, status, sync_status) // L2+
- settings (key, value)

// Sync Queue
- pending_transactions (auto-sync saat online)
- pending_approvals (auto-sync saat online) // L2+
- conflict_resolution (last-write-wins)

Sync Indicator

┌─────────────────────────────┐
│ 🌐 Online (hijau)           │
│ 📴 Offline (abu-abu)        │
│ 🔄 Syncing... (kuning)      │
│ ⚠️ Conflict (merah)         │
└─────────────────────────────┘

✅ Feature Matrix by Level

FeatureL0L1L2L3L4
Dashboard KPI
POS Transaction
Product CRUD
Reports
Approval Flow⚠️
Multi-User
Multi-Department
Multi-Entity
Multi-Country
SSO/MFA
Compliance Dashboard
Offline Mode

📱 Mobile Implementation by Role (mstore_mobile)

Setiap role memiliki implementasi spesifik di Flutter mobile app. Berikut mapping antara role dan features yang accessible:

L0 Roles

L0_OWNER

Features di mstore_mobile:
  • ✅ Dashboard (full metrics)
  • ✅ Cashier (POS transactions)
  • ✅ Inventory (product CRUD)
  • ✅ Reports (all reports)
  • ✅ Settings (full configuration)
Code Path: mstore_mobile/lib/features/
  • dashboard/ - Full dashboard dengan KPI
  • cashier/ - POS system
  • inventory/ - Product management
  • report/ - All reports
  • setting/ - Configuration

L0_CASHIER

Features di mstore_mobile:
  • ✅ Cashier (POS only)
  • ✅ Quick Products (favorites)
  • ✅ Transaction History (view only)
  • ✅ Shift Management (close shift)
  • ❌ Settings (disabled)
  • ❌ Reports (disabled)
Code Path: mstore_mobile/lib/features/
  • cashier/ - POS transactions
  • transaction_history/ - View only
  • shift/ - Shift management

L0_VIEWER

Features di mstore_mobile:
  • ✅ Dashboard (read-only)
  • ✅ Reports (view & export)
  • ❌ Cashier (disabled)
  • ❌ Inventory (disabled)
  • ❌ Settings (disabled)
Code Path: mstore_mobile/lib/features/
  • dashboard/ - Read-only view
  • report/ - View & export

L1 Roles

L1_OWN-MGR

Features di mstore_mobile:
  • ✅ Dashboard (team activity)
  • ✅ Finance (full access)
  • ✅ Inventory (full access)
  • ✅ HR (full access)
  • ✅ Reports (all reports)
  • ✅ Settings (full)
Code Path: mstore_mobile/lib/features/
  • dashboard/ - Team dashboard
  • approval/ - Approval queue
  • inventory/ - Full management
  • employee/ - HR management
  • report/ - All reports

L1_FIN-MGR

Features di mstore_mobile:
  • ✅ Dashboard (finance only)
  • ✅ Finance (transactions, approval)
  • ✅ Reports (finance reports)
  • ❌ Inventory (disabled)
  • ❌ HR (disabled)
Code Path: mstore_mobile/lib/features/
  • dashboard/ - Finance metrics
  • approval/ - Finance approvals
  • report/ - Finance reports

L1_CSH (Cashier)

Features di mstore_mobile:
  • ✅ Cashier (POS)
  • ✅ Quick Products
  • ✅ Transaction History
  • ✅ Shift Management
  • ❌ Reports (disabled)
  • ❌ Settings (disabled)

L2+ Roles

L2_OWN-MGR

Features di mstore_mobile:
  • ✅ Dashboard (enterprise KPI)
  • ✅ Finance (multi-department)
  • ✅ Operations (full)
  • ✅ Approval (multi-level)
  • ✅ Reports (consolidated)
  • ✅ Audit (full access)

L2_ADM-SYS

Features di mstore_mobile:
  • ✅ Settings (system config)
  • ✅ User Management
  • ✅ Backup/Restore
  • ✅ Audit Logs
  • ❌ Business features (disabled)

L2_APV-L1/L2 (Approver)

Features di mstore_mobile:
  • ✅ Approval Queue (priority)
  • ✅ Approval History
  • ✅ Reports (approval metrics)
  • ❌ Other features (disabled)

🔐 Role-Based Access Control Implementation

Feature Flag Pattern

// In each feature, implement role-based access:

class CashierPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final userRole = context.read<AuthProvider>().userRole;
    
    // Check if user has access to this feature
    if (!_hasAccess(userRole)) {
      return UnauthorizedPage();
    }
    
    // Show role-specific UI
    return _buildCashierUI(userRole);
  }
  
  bool _hasAccess(String role) {
    const allowedRoles = ['L0_OWNER', 'L0_CASHIER', 'L1_OWN-MGR', 'L1_CSH'];
    return allowedRoles.contains(role);
  }
  
  Widget _buildCashierUI(String role) {
    if (role == 'L0_CASHIER') {
      return _buildCashierOnlyUI(); // Limited UI
    } else if (role == 'L0_OWNER' || role == 'L1_OWN-MGR') {
      return _buildFullCashierUI(); // Full UI with edit options
    }
    return SizedBox.shrink();
  }
}

Shared Features

Beberapa features digunakan oleh multiple roles dengan UI yang berbeda:
FeatureL0_OWNERL0_CASHIERL0_VIEWERL1_OWN-MGRL1_CSHL1_AUD
Dashboard✅ Full✅ Read✅ Full✅ Read
Cashier✅ Full✅ Full✅ Full✅ Full
Inventory✅ Full✅ Full
Reports✅ Full✅ Read✅ Full✅ Read
Approval✅ Full

🚀 Implementation Roadmap

  1. Design Phase:
    • Buat Figma mockup berdasarkan spec ini
    • Design system (colors, typography, components)
    • Prototype interactive flow per level
  2. Development Phase:
    • Implement UI components (Flutter)
    • Integrate dengan backend API
    • Implement offline-first logic
    • Role-based UI rendering
  3. Testing Phase:
    • User testing dengan stakeholder per level
    • Performance testing (offline mode)
    • Accessibility testing
    • SoD enforcement testing (L2+)


File ini siap digunakan sebagai referensi untuk Figma design dan Flutter implementation di semua business levels.