Inspiration

Managing personal finances often feels like a chore. Spreadsheet fatigue is real, and generic budgeting apps rarely tell you why you're over budget or how to fix it. We were inspired to build a tool that moves beyond simple tracking to provide actionable intelligence. We wanted an app that doesn't just show you a graph but can actually talk to you about your spending habits, acting as a personalized financial consultant available 24/7.

What it does

SmartBudget is a comprehensive personal finance application that combines traditional tracking with modern AI:

Visual Dashboard: Users get an immediate, high-level view of their financial health with interactive pie charts for spending breakdowns and progress bars for category limits.

Smart Budgeting: Users can create custom budget categories (e.g., "Groceries," "Rent") with specific monthly limits and color tags. The app automatically flags categories that are over budget.

Transaction Logging: A clean interface allows users to easily log income and expenses, which instantly updates the dashboard analytics.

Context-Aware AI Advisor: This is the core innovation. We integrated Google Gemini as a conversational assistant. Unlike generic chatbots, our AI has read-access to the user's live database. You can ask, "How much do I have left for dining out?" or "Why is my savings rate low?" and it provides answers based on your actual real-time data.

How we built it

We architected a modern full-stack solution:

Frontend: Built with React and Vite for a blazing-fast user experience. We used Recharts for the data visualization components and Lucide React for a clean, modern UI.

Backend: The core logic runs on Java Spring Boot. We used Spring Data JPA to manage our object-relational mapping, ensuring robust data handling.

Database: A MySQL database stores all user budgets, transactions, and financial goals.

AI Integration: We built a custom service that fetches the user's financial state from the database and constructs a context-rich prompt. This prompt is sent to the Google Gemini API, allowing the LLM to generate hyper-personalized financial advice.

Challenges we ran into

The "Gap" Between Frontend & Backend: Connecting our React frontend (running on port 3000) to our Java backend (port 8080) required careful configuration of CORS (Cross-Origin Resource Sharing) policies to allow secure communication.

Database Security Protocols: We encountered a specific "Public Key Retrieval is not allowed" error with MySQL 8.0, which forced us to dive deep into JDBC connection string security flags to establish a successful connection.

AI Context Management: The biggest challenge was preventing the AI from hallucinating. We had to design a system to efficiently feed the "live" budget state into the AI's context window so its advice was always mathematically accurate.

Accomplishments that we're proud of

Full-Stack Cohesion: We successfully built and integrated a complete CRUD application with a polished frontend and a robust backend in a very short timeframe.

The "Magic" Moment: Seeing the AI Chatbot correctly answer a specific question about a transaction we just added to the database was a huge win. It proved our context-injection strategy worked.

Real-Time Analytics: The dashboard updates instantaneously when transactions are added, providing immediate feedback to the user.

What we learned

Spring Boot Architecture: We deepened our understanding of dependency injection, REST Controllers, and Service layers in Java.

LLM Integration: We learned that "Prompt Engineering" isn't just about writing text; it's about programmatically structuring data so an AI can understand and act on it.

Full-Stack Debugging: Tracing an error from a button click in React through the network tab, into the Java controller, and down to the MySQL query gave us a holistic view of software development.

What's next for Gemini, give me a name

User Authentication: Implementing Spring Security with JWT to allow multiple users to securely store their private data.

Built With

Share this project:

Updates