Skip to content

Latest commit

Β 

History

History
132 lines (97 loc) Β· 3.65 KB

File metadata and controls

132 lines (97 loc) Β· 3.65 KB

Loot πŸ’°

screenshot

A personal finance tracker to explore your expenses and understand where your money goes. Track spending on coffee, dining, travel, and more with powerful categorization and insights.

Features

  • πŸ“Š Expense Tracking - Import and analyze your bank transactions from CSV files
  • 🏷️ Smart Categorization - Auto-categorize transactions using custom keywords and patterns
  • πŸ“ˆ Visual Insights - Interactive charts and graphs to visualize spending patterns
  • πŸ” Advanced Search - Quickly find and filter transactions
  • ❌ Exclude Transactions - Hide recurring bills or unwanted items from your analysis
  • πŸ’‘ Category Management - Create and manage custom spending categories with keyword matching

Tech Stack

  • Framework: Next.js 16.1.1 (App Router)
  • Language: TypeScript
  • Database: SQLite with Prisma ORM
  • Styling: Tailwind CSS
  • UI Components: Radix UI
  • Charts: Recharts
  • CSV Parsing: PapaParse

Installation

Prerequisites

  • Node.js 18+ and npm

Setup

  1. Clone the repository

    git clone <repository-url>
    cd loot
  2. Install dependencies

    npm install
  3. Set up the database

    # Create the database file
    touch prisma/dev.db
    
    # Generate Prisma client
    npx prisma generate
    
    # Run migrations
    npx prisma migrate dev
  4. Start the development server

    npm run dev
  5. Open the app Navigate to http://localhost:3000 in your browser

Usage

Importing Transactions

  1. Export your bank transactions as a CSV file
  2. Navigate to the Import page (/import)
  3. Upload your CSV file
  4. Transactions will be automatically imported and categorized

Managing Categories

  1. Go to the Categories page (/categories)
  2. Add new categories and define keywords for automatic matching
  3. Keywords help automatically categorize transactions (e.g., "Starbucks" β†’ "Coffee")

Excluding Transactions

  • Click the exclude button on any transaction to hide it from your analysis
  • Manage excluded items in Settings (/settings)

Project Structure

loot/
β”œβ”€β”€ app/                    # Next.js app router pages
β”‚   β”œβ”€β”€ categories/        # Category management
β”‚   β”œβ”€β”€ import/            # CSV import functionality
β”‚   β”œβ”€β”€ search/            # Transaction search
β”‚   β”œβ”€β”€ settings/          # App settings
β”‚   └── transactions/      # Transaction views
β”œβ”€β”€ components/            # React components
β”œβ”€β”€ lib/                   # Utility functions and actions
β”‚   β”œβ”€β”€ actions.ts        # Server actions
β”‚   β”œβ”€β”€ utils.ts          # Helper functions
β”‚   └── prismaClient.ts   # Prisma client instance
β”œβ”€β”€ prisma/               # Database schema and migrations
β”‚   └── schema.prisma     # Database models
β”œβ”€β”€ public/               # Static assets
└── types/                # TypeScript type definitions

Database Schema

  • Transactions - Store imported bank transactions
  • Category - User-defined spending categories
  • Keyword - Keywords for automatic categorization
  • Exclude - Excluded transaction patterns

Scripts

# Development
npm run dev          # Start dev server
npm run build        # Build for production
npm run start        # Start production server

# Database
npx prisma studio    # Open Prisma Studio (database GUI)
npx prisma migrate dev   # Run migrations

Contributing

This is a personal project, but contributions are welcome! Feel free to open issues or submit pull requests.

License

MIT