Inspiration
We were inspired by the growing need for a truly intelligent personal finance tool that could demystify complex financial decisions for everyday users. We saw an opportunity to leverage the power of cutting-edge AI to provide personalized, actionable advice that goes beyond simple transaction tracking. The goal was to create a comprehensive platform where users could not only manage their traditional finances but also explore modern investment avenues like cryptocurrencies, all with the guidance of a smart, AI-driven assistant.
What it does
Spendly is an AI-powered personal finance management platform designed to empower users to take control of their financial lives. It offers:
- Smart Budgeting: AI-driven budget planning and expense tracking, with suggestions tailored to user habits and goals and locations.
- Transaction Analysis: Tools to categorize and understand spending patterns, including capabilities for processing data from uploaded financial documents (like PDFs).
- Goal Setting & Tracking: Users can set financial goals (e.g., saving for a down payment, retirement) and monitor their progress.
- AI-Powered Investment Advice: Spendly provides insights and suggestions for stocks, mutual funds, and cryptocurrencies by integrating with advanced AI models from Perplexity. Users can ask complex financial questions and receive citable, data-backed advice.
- Interactive Financial Chatbot: An intuitive chat interface allows users to query their financial data and get AI-generated advice in a conversational manner.
- Smart Contracts: Implemeted automated buy/sell of cryptos
- Decentralized: All the transactions stay on an IPFS system for privacy. ## How we built it
Spendly is a full-stack application built with a modern, AI-first architecture:
- Frontend: Next.js (React, TypeScript) for a responsive and interactive user experience, styled with Tailwind CSS and utilizing Shadcn/UI components.
- Backend API: Next.js API routes manage core application logic, user authentication, and database interactions.
- AI Core:
- A Python microservice built with FastAPI serves as a dedicated backend for handling complex AI queries, specifically interfacing with the Perplexity API for in-depth stock and mutual fund analysis that requires web search and citation capabilities.
- Database: MongoDB is used for persistent data storage, managed via Mongoose schemas for users, transactions, goals, etc.
- Authentication: NextAuth.js provides secure user authentication and session management.
- Web3 Components: We've laid the groundwork for Web3 integration using Hardhat and Solidity to develop smart contracts (e.g.,
PriceFeedOracle,ReactiveBuySell), aiming to introduce decentralized financial features. - Development & Tooling: The project was developed using Git for version control within a VSCode environment.
Challenges we ran into
Building Spendly was an exciting and challenging journey:
- Deployment:* We couldn't deploy spendly as we had to deploy our microservices for that aswell and having web3 integrated along with those bulky microservices we couldn't figure out the errors that were coming so we kept the project local only as demonstrated in the video provided.
- User Validation:* Making the application as user appealing as possible was a challenge as we had to have the managers as custom as possible, read articles, fed articles into vector databases for context when distributing budget for a user based off their preferences.
- AI Integration Complexity: Orchestrating multipleAPIs (Perplexity, yfinance, mfapi) and ensuring they delivered consistent, accurate, and well-formatted responses was a primary challenge. Prompt engineering and response parsing, especially for citable financial data from Perplexity, required significant iteration.
- Microservice Communication: Ensuring smooth and robust communication between the Next.js frontend/backend and the Python FastAPI microservice for Perplexity required careful API design and error handling.
- State Management: Managing complex application state in Next.js, especially with asynchronous data fetching from multiple sources (database, AI APIs), needed careful consideration.
- News sentiment and threshold mechanism: Making a js script communicate with a smart contract was quite a task and using news sentiment as one of the weights while recommending stocks/mfs/crypto was a eureka moment for us as we saw it is quite in demand in the defi world
Accomplishments that we're proud of
Despite the challenges, we're incredibly proud of what we've achieved with Spendly:
- Functional AI-Powered Advice: Successfully integrating Perplexity to provide users with genuinely useful and context-aware advice on stocks, mutual funds, and budgeting.
- Seamless User Experience: Creating an intuitive interface that makes complex financial information and AI interactions accessible and easy to understand.
- Robust Microservice Architecture: Developing a stable Python FastAPI microservice that effectively handles specialized AI tasks, demonstrating a scalable approach to AI integration.
- Problem-Solving AI Citations: Overcoming the hurdles with the Perplexity API to ensure financial analyses are backed by citable sources, enhancing the trustworthiness of the advice.
- Full-Stack Implementation: Building a complete, end-to-end application that combines a modern web frontend, a Node.js backend, a Python microservice, and a NoSQL database.
- Foundation for Web3: Initiating the Web3 aspect of the project, opening doors for future innovation in decentralized finance.
What we learned
This project has been a tremendous learning experience:
- MicroService-Architecture: Using a different microservice for every component especially the automatic crypto buy and sell using meta-mask was the best feeling.
- Advanced LLM Interaction: We gained deep insights into the nuances of prompting, response handling, and extracting structured data from sophisticated LLMs like those powering Perplexity
- Iterative Development for AI: AI features often require more iteration than traditional software components. We learned to adapt our prompts and logic based on observed AI behavior to achieve the desired output quality.
- Importance of real-time data in finance: As the market goes up and down in an instant its very important to have your suggestions real-time.
What's next for Spendly
We're excited about the future of Spendly and have many ideas for its evolution:
- Expanded AI Capabilities: Broaden the scope of AI-driven advice to include areas like insurance optimization, loan management, and tax planning.
- Enhanced Data Ingestion: Improve the PDF data extraction to make transaction logging even more seamless and automated.
- Activate Web3 Features: Fully develop and deploy the smart contracts to offer users innovative decentralized finance options, such as automated DeFi savings strategies or crypto investment tools.
- Advanced Analytics & Visualizations: Introduce more sophisticated charts, dashboards, and predictive analytics to give users deeper insights into their financial health.
- Greater Personalization: Implement machine learning models to further personalize financial advice and product recommendations based on individual user behavior and long-term goals.
- Mobile First: Develop native mobile applications (iOS and Android) for on-the-go financial management.
- Community & Social Finance: Explore features that allow users to (anonymously) share financial milestones, tips, or participate in savings challenges.
Built With
- ethers.js
- fastapi
- git
- github
- groq-api-platforms-&-cloud-services:-node.js
- hardhat
- javascript
- mongodb
- mongoose
- next.js
- perplexity-ai-api
- python
- react
- shadcn/ui
- solidity
- tailwind-css
- typescript
- vercel
- vscode
Log in or sign up for Devpost to join the conversation.