Skip to content

alfinohatta/cakra-treasury

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Cakra Treasury: Next-Gen Autonomous Corporate Treasury Management

Platform Kotlin Compose Hilt

πŸ“Œ Project Overview

Cakra Treasury is a production-ready, enterprise-grade Android application designed to revolutionize corporate treasury operations. It provides a centralized Command Center for liquidity management, risk mitigation, and automated financial execution. By leveraging a multi-agent architectural simulation, it offers treasurers real-time insights and autonomous recommendation engines to optimize working capital and mitigate FX risks.

πŸ’Ό Business Problem Statement

Traditional treasury management often suffers from fragmented data, delayed visibility into cash positions, manual reconciliation processes, and slow response times to market volatility. These inefficiencies lead to idle cash, increased FX exposure, and missed investment opportunities.

🎯 Objectives

  • Centralized Visibility: Consolidate bank accounts and financial positions into a single "Source of Truth".
  • Autonomous Intelligence: Utilize specialized AI agents to analyze risk, liquidity, and compliance.
  • Operational Excellence: Streamline working capital cycles (DSO/DPO) and automate routine treasury placements.
  • Security & Compliance: Ensure every action is biometrically verified and recorded in an immutable audit trail.

πŸ“– Table of Contents

  1. Architecture
  2. Key Features
  3. Technology Stack
  4. Project Structure
  5. Getting Started
  6. Environment Configuration
  7. Security & Compliance
  8. Deployment & CI/CD
  9. Contribution Guidelines
  10. License

πŸ— Architecture

High-Level System Architecture

graph TD
    User((Corporate Treasurer))
    
    subgraph "Android Client (Cakra Treasury)"
        UI[Jetpack Compose UI Layer]
        VM[ViewModel State Management]
        DI[Hilt Dependency Injection]
        REPO[Repository Pattern Layer]
    end
    
    subgraph "Data Layer (Local-First)"
        DB[(Room SQLite Database)]
        DAO[Data Access Objects]
    end
    
    subgraph "Business Logic (Domain)"
        Model[Domain Models]
        Agents[AI Agent Simulation Logic]
    end

    User <--> UI
    UI <--> VM
    VM <--> REPO
    REPO <--> DB
    VM <--> Agents
    DI -.-> VM
    DI -.-> REPO
Loading

Detailed Data Flow

sequenceDiagram
    participant U as User
    participant V as DashboardViewModel
    participant R as TreasuryRepository
    participant D as Room Database
    
    U->>V: Enter AI Command (e.g. "Optimize Liquidity")
    V->>V: Process Command (Simulated NLP)
    V->>R: Fetch Current Financial Position
    R->>D: Query BankAccounts/Invoices
    D-->>R: Return Raw Data
    R-->>V: Return Domain Models
    V->>V: Agent Logic analyzes data
    V->>D: Update Recommendations/Audit Log
    D-->>V: Flow Emit Updates
    V-->>U: Display AI Recommendation & Insights
Loading

Component Responsibilities:

  • UI Layer: Handles user interaction using declarative UI.
  • ViewModel: Manages UI state and business logic execution, surviving configuration changes.
  • Repository: Orchestrates data flow between the local database and potential future remote APIs.
  • Domain Models: Pure Kotlin data classes representing the business entities (e.g., BankAccount, TreasuryPolicy).

✨ Key Features

  • AI Command Center: Natural language interface for treasury analysis and scenario simulation.
  • Multi-Agent Engine: Dedicated agents for Liquidity, Risk, Market, and Compliance.
  • Liquidity Management: Real-time tracking of bank balances and cash flow forecasts.
  • Working Capital Optimization: Advanced metrics for DSO, DPO, and CCC.
  • Automated Execution: Biometrically secured autonomous placement of funds.
  • Audit Trail: Comprehensive logs of every system and user action for enterprise compliance.

πŸ›  Technology Stack

Frontend & UI

  • Kotlin: Primary programming language.
  • Jetpack Compose: Modern toolkit for building native UI.
  • Material 3: Latest design system for enterprise aesthetics.
  • Navigation Compose: Type-safe navigation between screens.

Backend & Storage

  • Room Database: Robust SQLite abstraction for local-first data persistence.
  • KSP (Kotlin Symbol Processing): High-performance annotation processing for Room and Hilt.

Dependency Injection

  • Hilt (Dagger): Standardized DI for Android to ensure modularity and testability.

Security

  • Biometric API: Integration for Fingerprint/Face ID authorization of financial transactions.

πŸ“‚ Project Structure

com.example.cakratreasury/
β”œβ”€β”€ data/               # Data Layer Implementation
β”‚   β”œβ”€β”€ local/          # Room DB, DAOs, Entities, and Seeding logic
β”‚   β”œβ”€β”€ mapper/         # Converters between Entities and Domain Models
β”‚   └── repository/     # Concrete Repository implementations
β”œβ”€β”€ di/                 # Hilt Dependency Injection Modules
β”œβ”€β”€ domain/             # Domain Layer (Pure Logic)
β”‚   β”œβ”€β”€ model/          # Business Entities
β”‚   └── repository/     # Repository Interfaces
β”œβ”€β”€ ui/                 # Presentation Layer
β”‚   β”œβ”€β”€ auth/           # Login and Authentication screens
β”‚   β”œβ”€β”€ dashboard/      # Main Command Center
β”‚   β”œβ”€β”€ theme/          # Material 3 Color Schemes & Typography
β”‚   └── ...             # Feature-specific packages (Transactions, Policy, etc.)
β”œβ”€β”€ util/               # Helper classes (Biometric, Formatting)
└── MainActivity.kt     # Entry point & Navigation Host

πŸš€ Getting Started

Prerequisites

  • Android Studio Ladybug (or newer)
  • JDK 11 or 17
  • Android SDK 34+
  • Physical device or Emulator with Biometric support (for testing execution features)

Installation & Setup

  1. Clone the repository:
    git clone https://github.com/alfinohatta/cakra-treasury.git
  2. Open in Android Studio.
  3. Sync Project with Gradle Files.
  4. Run the App: Select app configuration and target your device.

βš™οΈ Environment Configuration

This project uses a local-first approach. For future API integrations, create a .env file in the root directory based on the provided template:

# Example .env structure
BANKING_API_GATEWAY=https://api.internal.bank.com
ENCRYPTION_KEY=your_secret_key_here

πŸ›‘ Security & Compliance

  • Biometric Locking: Sensitive operations (e.g., approving treasury placements) require biometric re-authentication.
  • ProGuard/R8: Enabled for release builds to obfuscate code and reduce APK size.
  • No Credentials in Source: All API keys (if any) are managed via local.properties or environment variables.

🀝 Contribution Guidelines

  1. Fork the Project.
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature).
  3. Commit your Changes (git commit -m 'Add some AmazingFeature').
  4. Push to the Branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

πŸ“„ License

Distributed under the License. See LICENSE for more information.


πŸ₯ Troubleshooting & FAQ

Q: The app starts with no data. A: The app seeds initial data on the first run. If it fails, clear app data and restart.

Q: Biometric authentication is failing. A: Ensure your device has a fingerprint or face registered and that the emulator supports biometrics.


Developed by Cakra Treasury Team | Enterprise Software

About

It provides a centralized Command Center for liquidity management, risk mitigation, and automated financial execution. By leveraging a multi-agent architectural simulation, it offers treasurers real-time insights and autonomous recommendation engines to optimize working capital and mitigate FX risks.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages