Inspiration

The economy has become volatile in recent years and stable, trustworthy financial advice seems to be more important than ever. However, lower to middle-class citizens don't have the money or time to be able to hire a financial advisor for a one-on-one session. What if a resource like this was available for the general public?

What it does

Pennywise connects the mass majority to a sleek website that displays all of their accounts, transactions, and subscriptions. In addition, it contains advice based on the user's spending happens, recommending where to reduce spending, trends over time, and more. In addition, it contains a tab that connects users to an AI language model, which allows them to ask questions and receive trustworthy answers quickly and for free.

How we built it

With Python and MongoDB, we were able to create our own API using data gathered from Capital One's API Nessie. In doing so, this allowed us to formalize our own structure and schema, for ease in data processing and connection from our client and server. Our front-end was created using Next.js and React and connected to our back end by requesting to our own API. We used OpenAI's endpoint to create a financial assistant chatbot to help users manage their spending. Some of our sample code can be found below:

const res = await fetch("https://api.openai.com/v1/chat/completions", {
         headers: {
            "Content-Type": "application/json",
            Authorization: `Bearer {apiKey}`,
         },
         method: "POST",
         body: JSON.stringify({
            model: "gpt-3.5-turbo",
            messages: [
               {
                  role: "system",
                  content:
                     "You are a financial assistant helping people manage their money." +
                     "People have the goal of saving money and reducing their spending." +
                     "You are given a stringified JSON list of their recent transactions containing the merchant they bought from, how much they spent, and the date of the transaction. " +
                     "Based on these transactions, provide advice for how they can save money over the next month.",
               },
               {
                  role: "user",
                  content: JSON.stringify(txns),
               },
            ],
            max_tokens: 200,
            temperature: 0.3,
            presence_penalty: 0.2, //change to 1 for more creative, when doing more than 1 category
            frequency_penalty: 0.2,
         }),
      })

Challenges we ran into

While Nessie's Enterprise did provide read-only mock data, we needed to modify the transactions for our use case leading us to create our own data. This data creation requires a large number of calls to Nessie, leading to frequent timeout errors, indicating that Nessie limits the number of requests, causing the process of data creation to be inefficient. This issue also fed into our data processing and front-end fetching data, as Nessie would randomly just time out.

Accomplishments that we're proud of

We're proud of the workflow we were able to plan out during the initial stages of the project, as the design was well thought out, allowing us to use it as a blueprint with only some modifications as we created this project.

What we learned

The biggest key takeaway was that you should ALWAYS PLAN AHEAD. There were many instances where careful planning helped us avoid failure. We also learned how to create our own API and integrate MongoDB into our project.

What's next for Pennywise: An AI-Assisted Savings Assistant

Scaling up! With some more testing and usage of Pennywise, it truly could become a product that would give crucial financial advice to those without access to these resources before.

Finance

Banking and finance in general are confusing worlds to many people, but most banking applications do little to address this. We saw that financial advice for the general public was a severely underrepresented issue, even in this day of economic volatility. Pennywise addresses this by giving users access to an AI chatbot, in addition to an intuitive place to see all of their necessary financials. We used machine learning to track the user's spending habits and create advice using that data. We also created a subscriptions classifier that detects active subscriptions at different intervals (1 m, 3m, 6m, 1y). As such, our project addresses two of the financial prompts, all into one.

MongoDB

We used MongoDB Atlas as our main database, as it is fully managed and easily scalable for our NoSQL use case. This allowed us to manipulate the data get from Nessie in any way that we wanted.

Domain.com

Special thanks to Domain.com's free hosting: we were able to deploy our website to pennywisefinance.tech. It combines the core aspects of our project, financial advice for users, and the technology driving our product.

Built With

Share this project:

Updates