Inspiration
Managing personal finances is a challenge that affects millions of people, especially young professionals and students who struggle to track where their money goes. Traditional expense tracking apps are often tedious, requiring manual categorization and offering little actionable insight. We wanted to create something different—a smart financial companion that not only tracks expenses but actively helps users understand and improve their spending habits.
The breakthrough came when we realized we could harness Google Gemini's AI capabilities to transform raw transaction data into personalized financial advice. Instead of just showing pie charts, what if users could simply ask their app "Why am I always broke by month-end?" and get a thoughtful, personalized answer? That's the experience we set out to build.
What it does?
SpendX is an AI-powered personal finance manager that combines expense tracking with intelligent financial assistance: Track Expenses & Income: Log transactions with categories, view history, and see monthly summaries AI Chat Assistant: Have natural conversations with a Gemini-powered financial advisor. Ask questions like "How much did I spend on food?" or "Give me tips to save money" Smart Insights: Receive AI-generated analysis of spending patterns with actionable recommendations Expense Predictions: Get forecasts for next month's spending based on historical patterns Budget Management: Set budgets with category limits and track progress in real-time Multi-Currency Support: Switch between INR (₹) and USD ($) instantly
Cross-Platform: Works on Android, iOS, and web browsers with a responsive design
How we built it
Frontend (Mobile App) React Native + Expo SDK 54: Cross-platform development for iOS, Android, and web TypeScript: Type-safe code for better reliability Expo Router: File-based navigation system React Native Paper: Material Design components React Native Reanimated: Smooth, 60fps animations Axios: HTTP client for API communication AsyncStorage: Local data persistence for auth tokens and preferences
Backend (API Server) FastAPI: High-performance Python web framework SQLAlchemy + SQLite: Async database operations Pydantic: Request/response validation JWT Authentication: Secure token-based auth with refresh tokens Google Gemini API: AI-powered chat, insights, and predictions
AI Integration Built a production-ready Gemini wrapper with: Exponential backoff retry logic (3 attempts per model) Automatic fallback between Gemini models Rate limiting (10 requests/minute per user)
Graceful degradation with helpful fallback responses
Challenges we ran into
Gemini API Quota Limits The biggest challenge was handling Gemini's free-tier rate limits. We kept hitting "quota exceeded" errors even after creating new API keys. The solution was building a robust fallback system: Automatic retry with exponential backoff Model fallback chain (try multiple models before failing) Graceful degradation with meaningful fallback responses so users aren't left hanging
Mobile Device Connectivity Getting the mobile app to connect to the local backend was tricky. localhost doesn't work on physical devices. We solved this by: Running the backend with --host 0.0.0.0 to accept network connections Dynamically configuring the API URL with the computer's local IP Setting up CORS to allow all origins during development
Real-time Currency Switching We wanted currency changes to reflect instantly across all screens without requiring a restart. We built a custom useCurrency hook that: Reads the saved preference from AsyncStorage Provides the symbol to all components Refreshes automatically when navigating between screens
Responsive Design
Making the UI work seamlessly across phones, tablets, and desktop browsers required careful planning. We used responsive containers and conditional styling to adapt layouts appropriately.
Accomplishments that we're proud of
->Production-Ready AI Integration: Our Gemini wrapper handles real-world edge cases like rate limits, API failures, and network issues gracefully. Users never see raw error messages.
->Seamless Cross-Platform Experience: The same codebase runs on Android, iOS, and web browsers with a beautiful, responsive UI.
->Real Conversational AI: Users can have genuine multi-turn conversations with the AI about their finances. It remembers context and provides personalized advice based on actual transaction data.
->Premium UI/UX: Glassmorphism design, smooth animations, dark/light themes—the app looks and feels like a professional product, not a hackathon prototype.
->Complete Authentication Flow: Secure JWT-based auth with token refresh, protected routes, and proper session management.
->Dynamic Currency Support: Switch between currencies and see changes reflected instantly across the entire app.
What we learned?
AI Integration Requires Resilience: Production AI apps need retry logic, fallbacks, and graceful degradation. APIs fail, quotas get exceeded, and models change—your app needs to handle all of it.
Mobile Development Quirks: Things that "just work" on web (like localhost) need special handling for mobile devices. Always test on real devices, not just emulators.
State Management Matters: Sharing state like currency preferences across multiple screens requires thoughtful architecture. Hooks and context make this manageable in React Native.
Design Systems Save Time: Establishing a consistent color palette, spacing system, and component library early made building new screens much faster.
FastAPI is Incredible: Python async with FastAPI made building a robust backend surprisingly fast. The automatic API documentation is a game-changer.
What's next for SpendX?
Short-term Improvements 🔗 UPI Integration: Automatically import transactions from UPI apps (PhonePe, GPay, Paytm) 📊 Advanced Analytics: Category-wise trends, spending comparisons across months 🔔 Smart Notifications: Budget alerts, unusual spending detection, bill reminders 📸 Receipt Scanning: Use Gemini's vision capabilities to extract transaction details from photos Long-term Vision 🏦 Bank Account Linking: Secure read-only access to bank transactions via aggregators 👨👩👧 Family Budgeting: Shared budgets and expense tracking for households 📈 Investment Tracking: Portfolio overview and AI-powered investment insights 🌐 Multi-language Support: Hindi, Telugu, and other regional languages ☁️ Cloud Deployment: Move from SQLite to PostgreSQL and deploy to production Our goal is to make SpendX the default financial companion for anyone who wants to take control of their money without the complexity of traditional finance apps.
Built With
- exposdk54
- fastapi
- python
- reactnative
Log in or sign up for Devpost to join the conversation.