Skip to content

harissabil/DaMoMe

Repository files navigation

damome_banner

DaMoMe: Daily Money Manager

DaMoMe is a smart income and expense tracking app built with Kotlin Multiplatform, targeting Android and Desktop. It simplifies financial management by allowing users to scan receipts for quick income or expense recording, avoiding the need for manual input. Additionally, the app features an AI-powered chatbot with RAG support (currently for Android) to provide personalized financial advice and insights tailored to the user’s needs.

The app addresses the issue of low financial literacy, which remains a persistent challenge. For instance, the 2024 P-Fin Index reports that financial literacy in the US has hovered around 50% for eight consecutive years, with a 2% drop in the past two years. DaMoMe offers an accessible solution to promote better money management habits. With its intuitive features and advanced AI combination, DaMoMe helps users make smarter financial decisions and stay in control of their finances.

Table of Contents

Demo Video

Here’s a demo video showcasing the features of the app.

DaMoMe_demo.mp4

Features

Here are the 4 main features of the app:

  1. Overview - Easily view your financial summary, including total balance, income, and expenses. The data can be filtered by daily, weekly, monthly, or all-time on the Home screen.
  2. EasyAdd - Three options to add transactions: manually typing, selecting an image, or capturing a photo (for Android). Android users can also share images directly from the gallery or banking apps to simplify adding transactions.
  3. Records - View all transaction history categorized by month and year. Includes a search feature to quickly find specific transactions.
  4. DaMommy - A chatbot powered by Gemini API that helps you manage your finances and provides insights and personalized recommendations.

Architecture

The app follows the Model-View-ViewModel (MVVM) architecture to ensure a clean separation of concerns and maintainable code.

DaMoMe_architecture

About RAG

One of the weaknesses of Generative AI is its tendency to hallucinate, especially when it lacks relevant context. To address this issue, on the Android platform I combined the Gemini API with a vector database using ObjectBox for vector search. This approach helps provide context to queries and significantly improves accuracy.

The vector data model is defined as follows:

@HnswIndex(
    dimensions = 768,
    distanceType = VectorDistanceType.COSINE,
    neighborsPerNode = 30,
    indexingSearchCount = 200
)
override var embedding: FloatArray? = null

And the query workflow will be like the following:

DaMoMe_rag_workflow

Library Used

Here are some of the libraries used to build the app:

Category Library
UI Library Miuix
Navigation Navigation Compose
AI SDK Google Generative AI SDK
HTTP Client Ktor
Database ObjectBox and Room
Dependency Injection Koin

Installation

To build this project, you need the latest stable version of Android Studio and Kotlin Multiplatform Plugin installed.

  1. Clone or download the project and open it in Android Studio.

  2. Get your Gemini API key and add it to the AppSecret.kt file located in: src/commonMain/kotlin/com/harissabil/damome/core/secret like the following:

    package com.harissabil.damome.core.secret  
    
    object AppSecret {  
        const val GEMINI_API_KEY = "your api key here"  
    }
    

Run on Android

  1. In the list of run configurations, select composeApp.
  2. Choose your Android virtual or physical device and then click Run.

Run on Desktop

  1. Select Run | Edit Configurations from the main menu.

  2. Click the plus button and choose Gradle from the dropdown list.

  3. In the Tasks and arguments field, paste this command:

    composeApp:run
    
  4. Click OK.

  5. Use this configuration and then click Run.

License

DaMoMe is open-source and released under the MIT License.

Releases

No releases published

Packages

No packages published

Languages