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.
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.
- 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.
- Architecture
- Key Features
- Technology Stack
- Project Structure
- Getting Started
- Environment Configuration
- Security & Compliance
- Deployment & CI/CD
- Contribution Guidelines
- License
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
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
- 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).
- 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.
- 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.
- Room Database: Robust SQLite abstraction for local-first data persistence.
- KSP (Kotlin Symbol Processing): High-performance annotation processing for Room and Hilt.
- Hilt (Dagger): Standardized DI for Android to ensure modularity and testability.
- Biometric API: Integration for Fingerprint/Face ID authorization of financial transactions.
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
- Android Studio Ladybug (or newer)
- JDK 11 or 17
- Android SDK 34+
- Physical device or Emulator with Biometric support (for testing execution features)
- Clone the repository:
git clone https://github.com/alfinohatta/cakra-treasury.git
- Open in Android Studio.
- Sync Project with Gradle Files.
- Run the App: Select
appconfiguration and target your device.
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- 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.propertiesor environment variables.
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature). - Commit your Changes (
git commit -m 'Add some AmazingFeature'). - Push to the Branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Distributed under the License. See LICENSE for more information.
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