• Overview
  • Technical Features
  • Takeaways
  • Finance Dashboard

    Personal Finance & Expense Tracker

    Next.js | TypeScript | Google Sheets API | OpenAI

    Link: Project | GitHub

    Overview

    Introduction

    Finance Dashboard is a full-stack personal finance management application built with modern web technologies. It helps users track expenses, manage budgets, and analyze spending patterns through an intuitive dashboard interface. The application leverages Google Sheets as a backend database and integrates OpenAI for intelligent transaction parsing from receipt images. To prevent unwanted access, you must request access before using this web app.

    Problem & Solution

    Traditional expense tracking requires tedious manual entry. This application solves that problem by enabling users to simply upload bank statement screenshots or transaction receipts—the AI automatically extracts and categorizes transaction details. Combined with Google Sheets integration, users get a powerful, accessible finance tracking system without complex database setup.

    Key Features

    • Upload bank statements and receipts for automatic transaction parsing via OpenAI
    • Manual expense entry with dedicated forms for quick data input
    • Bi-weekly budget tracking with visual spending charts and analytics
    • Real-time synchronization with Google Sheets for persistent storage
    • Optimistic UI updates using SWR for instant feedback
    • Google OAuth authentication for secure access
    • Responsive dashboard with balance summaries and recent transactions

    Technical Features

    AI-Powered Transaction Parsing

    Integrated OpenAI's vision models to extract transaction data from uploaded images. The parser identifies transaction dates, amounts, descriptions, and categories with high accuracy. Server-side sanitization prevents formula injection attacks when writing to Google Sheets, ensuring data security.

    Google Sheets Backend Integration

    Implemented a service-account-based Google Sheets integration that serves as the primary data store. This approach provides several benefits: version-controlled data accessible through Google Drive, no database hosting costs, and familiar spreadsheet interface for data review and manual adjustments. Used the Google Sheets API v4 with JWT authentication for secure, programmatic access.

    Next.js App Router & API Routes

    Built using Next.js 15's App Router architecture with TypeScript for type safety. Created API routes for transaction management (/api/transactions, /api/parse-transactions) that handle CRUD operations and image processing. Implemented server-side validation and error handling to ensure data integrity.

    Optimistic UI with SWR

    Leveraged SWR (stale-while-revalidate) for client-side caching and optimistic updates. When users add transactions, the UI updates immediately while the request processes in the background, providing a snappy user experience. Automatic revalidation ensures data consistency across all dashboard components.

    Authentication & Authorization

    Implemented NextAuth.js with Google OAuth provider for secure authentication. The application uses an email allowlist middleware to control access, making it suitable for personal use while maintaining a foundation that can scale to multi-user deployments with per-user data isolation.

    Security Considerations

    • Formula Injection Prevention: Server-side sanitization strips leading special characters (=, +, -, @) to prevent malicious formulas in Google Sheets
    • Environment Variables: All sensitive credentials (API keys, OAuth secrets) stored securely in environment variables
    • File Upload Controls: Implemented file size limits and type validation to prevent abuse of the parsing endpoint
    • PII Awareness: Designed with consideration for personally identifiable information in uploaded images

    Takeaways

    Technical Growth

    This project deepened my understanding of full-stack TypeScript development and serverless architecture. Working with Google Sheets as a database taught me creative solutions to data persistence challenges and highlighted trade-offs between traditional databases and alternative storage solutions. Integrating OpenAI's API provided hands-on experience with LLM-powered features and the importance of prompt engineering for structured data extraction.

    Product Thinking

    Building a personal finance tool required balancing functionality with simplicity. The AI parsing feature significantly reduces friction in expense tracking, but providing manual entry options ensures users aren't blocked if image parsing fails. Designing for a single user first, with multi-user scalability in mind, demonstrates pragmatic product development—ship value quickly while maintaining architectural flexibility.

    Future Enhancements

    • Migrate from Google Sheets to PostgreSQL for multi-user support
    • Add recurring transaction detection and budget alerts
    • Implement category-based spending insights and trends
    • Build mobile-responsive progressive web app (PWA) features
    • Add data export and reporting capabilities
    • Implement background job processing for image parsing with retry logic