SkillAgentSearch skills...

CapitalGuard

A full stack Android personal finance and wealth management app built in Android Studio with Java, XML, Firebase Authentication and Realtime Database, Stanford CoreNLP, AnyChart JavaScript library, Google Cloud Functions written in Node.js, and the Plaid, Dialogflow, News, and Twitter (via Twitter4J) APIs.

Install / Use

/learn @ramanv0/CapitalGuard

README

CapitalGuard

A full stack Android personal finance and wealth management app built in Android Studio with Java, XML, Firebase Authentication and Realtime Database, Stanford CoreNLP, AnyChart JavaScript library, Google Cloud Functions written in Node.js, and the Plaid, Dialogflow, News, and Twitter (via Twitter4J) APIs. CapitalGuard allows you to connect all of your financial accounts into one space to get a complete picture of your financial health, help you gain control of your spending, and track and optimize your investments.

Key Features

  • Email and password based authentication with custom UI using the Firebase Authentication SDK
  • Client-side integration to the Plaid API via Plaid Link that handles credential validation, authenticates users' bank account information, and connects users' financial accounts to Plaid
  • Alert users about suspicious activity or overspending if the transaction data retrieved using the Plaid API exceeds their spending limit
  • Data analysis and interactive visualization on users' spending data retrieved with the Plaid API using custom adapters, various UI layouts, and the AnyChart JavaScript library
  • Financial assistant chatbot with a custom chat UI built using the Dialogflow API and Google Cloud Functions written in Node.js that query users' financial data from the Plaid API stored in the Firebase database
  • Provide advice to users about potential investment opportunities based on sentiment analysis performed on news articles retrieved using the News API and Twitter tweets retrieved using the Twitter API (via the Twitter4J Java library) using the Stanford CoreNLP library

Technologies Used

Languages

  • Java
  • XML
  • JavaScript (Node.js)
  • Regex

Back end

  • Firebase Realtime Database
    • CapitalGuard uses Google's Firebase Realtime Database to store and sync user data as JSON in realtime. To use the Firebase Database, first add Firebase to your cloned version of CapitalGuard by following this guide. Then, install and setup the Realtime Database SDK using this reference.

APIs

  • Plaid API

    • The following Plaid API product endpoints were used to build CapitalGuard (Note: all Plaid API endpoint requests return standard JSON responses):
      • Institutions: retrieve data (e.g. the institution's id, name, supported Plaid products, logo, etc.) about supported financial institutions
      • Account: fetch account information (e.g. the accounts's id, name, balance, type, etc.) and schemas (the account, currency code, and investment transaction types and corresponding subtypes recognized by Plaid)
      • Token: obtain a link_token to initialize Plaid Link, which is the client-side component that the user interacts with in order to connect their financial accounts with the Plaid API. Once Link is initialized and the user has successfully created an Item (Note: Item is a Plaid term for a login at a financial institution), it will return a public_token through an onSuccess callback that can be exchanged for a Plaid API access_token. The access_token must be obtained in order to call Plaid API endpoints and retrieve information about an Item.
      • Transactions: receive paginated user-authorized transaction data for credit, depository, and loan-type accounts
      • Auth: retrieve and verify bank account and identification numbers (e.g. routing numbers), and high-level account auth data
      • Balance: obtain real-time balance data for each of an Item's financial accounts
      • Identity: retrieve and verify the user's identity (name, address, phone number, email) against obtained bank account information
      • Assets: access the user's financial information to create and retrieve Asset Reports that contain detailed information about the user's assets and transactions, which can be used for loan underwriting
      • Investments: get user-authorized stock position and transaction data from the user's investment accounts
    • To use the Plaid API in CapitalGuard, you will need to receive API keys by signing up here. Once you have signed up, you will have access to two API keys: client_id and secret. You can find your Plaid API keys here. Then, in MainActivityJava.java, you must set the value of clientUserId in the createLinkToken method to your client_id and insert your client_id and secret as the first and second arguments of clientIdAndSecret, respectively, in the createPlaidClient method. You will also see that there are three different environments in which you can use the Plaid API: Sandbox, Development, and Production. CapitalGuard was built in the Sandbox environment, which gives you access to test credentials and life-like data.
      • Sandbox environment simple test credentials -> username: user_good, password: pass_good, pin: credential_good (when required). You can learn more about Sandbox test credentials here.
    • The Plaid API was installed in CapitalGuard with the following Gradle dependencies:
    implementation 'com.plaid.link:sdk-core:3.2.6'
    
    implementation 'com.plaid:plaid-java:8.1.0'
    
  • Dialogflow API

    • CapitalGuard uses the Dialogflow API to build a personal finance assistant that is able to answer users' questions about their financial health based on their financial data retrieved via the Plaid API and stored in the Firebase database.
    • Since CapitalGuard uses a custom-built, in-app conversation platform, and not one of Dialogflow's integrations, I had to write code that directly interacts with the end-user. I also had to directly and asynchronously interact with the Dialogflow API for each conversational turn in order to send end-user expressions to Dialogflow and receive information about intent matches. You can learn more about the processing flow when interacting with the Dialogflow API here.
    • To use the Dialogflow API in CapitalGuard, you will need to set up a Google Cloud Platform (GCP) project and authentication. To do so, follow the steps in the GCP Setup quickstart: It will guide you through all of the steps required to start using the Dialogflow API, such as creating a Dialogflow project, GCP billing, enabling the Dialogflow API and audit logs, setting up authentication with service accounts and keys (for more information about authentication, you can also read this), initializing the Google Cloud SDK (the Cloud SDK provides many useful tools for managing resources hosted on Google Cloud), and installing the Dialogflow API client library.
      • CapitalGuard uses the most common option for calling GCP APIs (in this case, the Dialogflow API): Google supported client libraries. There are two other options for calling the Dialogflow API: REST and gRPC (you can read more about them here). The Dialogflow API client library was installed in CapitalGuard with the following Gradle dependencies:
      implementation platform('com.google.cloud:libraries-bom:20.8.0')
      
      implementation 'com.google.cloud:google-cloud-dialogflow'
      
      If you choose to setup your CapitalGuard project with Maven or sbt, you can learn how to install the Dialogflow API here.
    • After you setup your GCP project and authentication, you will need to build agents, which are virtual agents that are trained to handle expected conversations with end-users, using the Dialogflow Console. You can learn more about how Dialogflow agents work here.
      • To build an agent:
        1. Go to your Dialogflow Console and sign in
        2. Click "Create Agent" in the left sidebar menu
        3. Enter the requested information (agent's name, language, time zone)
        4. Select "Create a new Google project"
        5. Click "Create"
    • Once you created your agent, you will need to define and train intents to categorize end-user intentions for each conversation turn. The combined intents of a successful agent should be able to handle a complete conversation with the end-user. When the end-user writes a question to CapitalGuard'
View on GitHub
GitHub Stars11
CategoryData
Updated4mo ago
Forks4

Languages

Java

Security Score

77/100

Audited on Nov 25, 2025

No findings