Project

README

Repository setup, architecture, and API overview. Rendered from the root README.md.

Tip

This page mirrors the GitHub README. Prefer the product guides above for in-app workflows; use this for Docker, env vars, and self-host.
TrackIt Logo

๐Ÿ’ฐ TrackIt: Your Personal Finance Command Center

Take control of your finances with intelligent expense tracking, learned categorization, and powerful analytics

Vue.js Python FastAPI PostgreSQL

TypeScript Docker Tailwind Chart.js Vite pnpm

CI License PRs Welcome Maintained


๐Ÿ“‹ Table of Contents


๐ŸŽฏ Why TrackIt?

Managing personal finances shouldn't be complicated. TrackIt transforms the way you handle money by:

  • โšก Automating the Mundane: Import CSVs and categorize with learned rules, history, and patterns
  • ๐Ÿ“Š Revealing Insights: Discover spending patterns you never noticed
  • ๐Ÿค– Asking Your Data: Chat with a finance agent grounded in your transactions
  • ๐Ÿ”’ Keeping Data Private: Per-user isolation; your data stays in your database
  • ๐Ÿ“ฑ Working Everywhere: Access from any device with a modern browser

โœจ Features

๐Ÿฆ Core Financial Management

Multi-Account Support

Connect all your accounts in one place

Bank Credit Savings

Transaction Import

Bulk CSV import with duplicate detection

CSV Preview Confirm

Finance Agent

Ask natural-language questions about your spending

Gemini Groq Tools

Multi-Institution

Support for major banks and cards

CIBC AMEX WS RBC BMO

๐Ÿง  Intelligence & Automation

Smart Categorization

Learns from your corrections; no per-row LLM on import

Exact History RULES Fuzzy

Learned Rules

Per-user merchant mappings with confidence

Apply to Other Edit

Suggestions

Scored category recommendations for Other rows

Similarity

Grounded Agent

Tool-backed answers and category proposals

Accept Dismiss

๐Ÿ“Š Analytics & Insights

Powerful Analytics

Monthly, category, and trend analysis

Beautiful Charts

Interactive Chart.js visualizations

Real-time Dashboard

Live updates as you categorize

Spending Trends

Track patterns over time


๐Ÿ›  Tech Stack

Backend Technologies

Technology Version Purpose
Python 3.14+ Core Language
FastAPI 0.139 Web Framework
PostgreSQL 17 Database
SQLModel 0.0.39 ORM
Uvicorn 0.51 ASGI Server
Ruff 0.16 Lint (CI)

Frontend Technologies

Technology Version Purpose
Vue.js 3.5 UI Framework
TypeScript 6.0 Type Safety
Vite 8 Build Tool
Tailwind 4.3 Styling
Chart.js 4.5 Charts
pnpm 10 Packages

DevOps & Tools

Technology Purpose
Docker Containerization
GitHub Actions CI / deploy
Git Version Control

๐Ÿš€ Quick Start

Using Docker (Recommended)

# Clone and start
git clone https://github.com/Nandan-18/trackit.git
cd trackit
./nginx/generate-certs.sh   # requires mkcert
docker compose up -d

Live demo: trackit-sigma-taupe.vercel.app ยท Product docs: trackit-sigma-taupe.vercel.app/docs

Prefer a new tab? Open on YouTube.

Open the live demo ยท Guest walkthrough

Authentication setup (required)

TrackIt uses Google OAuth and isolates data per user. Copy .env.example to .env in the repo root and fill in values:

cp .env.example .env

Required keys (see .env.example for the full template):

# Google OAuth credentials
GOOGLE_CLIENT_ID="YOUR_GOOGLE_OAUTH_CLIENT_ID"
VITE_GOOGLE_CLIENT_ID="YOUR_GOOGLE_OAUTH_CLIENT_ID"

# JWT secret
JWT_SECRET="CHANGE_ME_TO_A_LONG_RANDOM_SECRET"

# Finance agent keys and defaults
GEMINI_API_KEY=""
GROQ_API_KEY=""
AGENT_DEFAULT_PROVIDER="gemini"
GEMINI_MODEL="gemini-3.1-flash-lite"
GROQ_MODEL="llama-3.3-70b-versatile"

# DB import (optional)
PROD_DATABASE_URL=""

Add 127.0.0.1 local.trackit.com to /etc/hosts if needed, then open:


๐Ÿ”„ How It Works

Import & categorization

CSV import does not call an LLM per row. Categories come from a deterministic pipeline (per user):

Yes

No

miss

miss

miss

miss

miss

hit

hit

hit

hit

hit

Upload CSV

Parse by institution

Duplicate?

Skip

Categorizer

High-conf exact mapping

History majority

RULES patterns

Low-conf exact

Fuzzy mapping

Other

Save

Confirm learns overrides

On confirm, if you change a category away from the auto suggestion, TrackIt learns a merchant mapping. Rules UI can Apply to Other to rewrite matching uncategorized rows. The Agent uses tools (and optional LLM) for Q&A - separate from import categorization.


RESTful Endpoints

๐Ÿ” Authentication
POST   /api/auth/google                 # Exchange Google ID token for TrackIt JWT
๐Ÿฆ Account Management
GET    /api/accounts                      # List current user's accounts
POST   /api/accounts                      # Create an account for current user
PATCH  /api/accounts/{id}                 # Rename or archive an account
๐Ÿ“ Learned Rules (mappings)
GET    /api/mappings                              # List learned merchant rules
POST   /api/mappings                              # Create a merchant rule
PATCH  /api/mappings/{id}                         # Update pattern and/or category
DELETE /api/mappings/{id}                         # Delete a merchant rule
POST   /api/mappings/{id}/apply-to-other          # Rewrite matching Other transactions
๐Ÿ’ณ Transaction Operations
POST   /api/transactions/upload/preview         # Preview CSV upload
POST   /api/transactions/upload/confirm         # Confirm CSV import (learns overrides)
GET    /api/transactions/debit                  # Debit transactions
GET    /api/transactions/credit                 # Credit transactions
PUT    /api/transactions/{id}/category          # Update category
POST   /api/transactions/suggest-category       # Get suggestions
GET    /api/transactions/other-review           # Proposed categories for Other txs
GET    /api/transactions/categories             # Categories list
๐Ÿ“Š Analytics & Reports
GET    /api/analytics/monthly-summary           # Monthly overview
GET    /api/analytics/category-breakdown        # Category analysis
GET    /api/analytics/spending-trends           # Trend analysis
GET    /api/analytics/month-details/{month}     # Detailed month view
GET    /api/analytics/available-months          # Available months
๐Ÿค– Agent
GET    /api/agent/providers                                    # Configured LLM providers
GET    /api/agent/conversations                                # List chats
POST   /api/agent/conversations                                # Create chat
GET    /api/agent/conversations/{id}                           # Chat + messages
DELETE /api/agent/conversations/{id}                           # Delete chat
POST   /api/agent/conversations/{id}/messages                  # Send message
POST   /api/agent/conversations/{id}/messages/{mid}/suggestions # Accept/dismiss suggestion
โค๏ธ Health
GET      /api/health                    # Liveness probe
GET      /                              # API root

๐Ÿ— Architecture

System Architecture

Database

Backend

Frontend

HTTP/REST + JWT

Learn

Read

Vue 3 + TypeScript

Vue Router

Chart.js

Tailwind CSS

FastAPI

Categorizer

Agent tools

SQLModel ORM

PostgreSQL

Users

Accounts

Transactions

CategoryMappings

Agent chats


Database Schema

owns

learns

has

has

contains

User

int

id

PK

string

email

string

google_sub

string

name

datetime

created_at

Account

int

id

PK

int

user_id

FK

string

name

string

account_type

string

institution

string

account_number

string

currency

boolean

is_active

datetime

created_at

CategoryMapping

int

id

PK

int

user_id

FK

string

merchant_pattern

string

category

float

confidence

int

usage_count

datetime

created_at

datetime

updated_at

AgentConversation

int

id

PK

int

user_id

FK

string

title

datetime

created_at

Transaction

int

id

PK

int

account_id

FK

datetime

date

string

description

decimal

amount

string

category

string

transaction_type

datetime

created_at

AgentMessage

int

id

PK

int

conversation_id

FK

string

role

string

content

string

suggestions

datetime

created_at


๐Ÿ“ Project Structure

TrackIt/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ”œโ”€โ”€ accounts.py              # Account CRUD
โ”‚   โ”‚   โ”œโ”€โ”€ agent.py                 # Finance agent conversations
โ”‚   โ”‚   โ”œโ”€โ”€ analytics.py             # Analytics and reporting
โ”‚   โ”‚   โ”œโ”€โ”€ auth.py                  # Google OAuth โ†’ JWT
โ”‚   โ”‚   โ”œโ”€โ”€ mappings.py              # Learned merchant rules
โ”‚   โ”‚   โ””โ”€โ”€ transactions.py          # Import, list, suggestions
โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ””โ”€โ”€ constants.py             # Categories, RULES, thresholds
โ”‚   โ”œโ”€โ”€ core/
โ”‚   โ”‚   โ”œโ”€โ”€ agent/                   # Agent loop, tools, providers
โ”‚   โ”‚   โ”œโ”€โ”€ auth.py                  # JWT / current user
โ”‚   โ”‚   โ”œโ”€โ”€ categorizer.py           # Categorization engine
โ”‚   โ”‚   โ””โ”€โ”€ utils.py                 # CSV parsers (cached categorizer)
โ”‚   โ”œโ”€โ”€ db/
โ”‚   โ”‚   โ”œโ”€โ”€ database.py
โ”‚   โ”‚   โ”œโ”€โ”€ models.py
โ”‚   โ”‚   โ””โ”€โ”€ types.py
โ”‚   โ”œโ”€โ”€ deploy/                      # Dockerfile
โ”‚   โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ”œโ”€โ”€ requirements.txt             # Runtime deps
โ”‚   โ””โ”€โ”€ requirements-dev.txt         # Pytest, ruff, httpx2
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ agent/               # Agent chat UI
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ analytics/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ charts/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ monthly/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ onboarding/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ rules/               # Learned Rules UI
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ shared/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ transactions/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ widgets/             # Upload, create account
โ”‚   โ”‚   โ”œโ”€โ”€ composables/
โ”‚   โ”‚   โ”œโ”€โ”€ lib/                     # API client, auth, guest mode
โ”‚   โ”‚   โ”œโ”€โ”€ router/
โ”‚   โ”‚   โ”œโ”€โ”€ types/                   # Generated auto-import typings
โ”‚   โ”‚   โ”œโ”€โ”€ views/                   # Landing, Accounts, Transactions,
โ”‚   โ”‚   โ”‚                            # Analytics, Monthly, Rules, Agent
โ”‚   โ”‚   โ”œโ”€โ”€ App.vue
โ”‚   โ”‚   โ””โ”€โ”€ main.ts
โ”‚   โ”œโ”€โ”€ config/                      # Vite, ESLint, Prettier, Playwright
โ”‚   โ”œโ”€โ”€ deploy/                      # Dockerfile
โ”‚   โ”œโ”€โ”€ tests/                       # Vitest (unit/) + Playwright (e2e/)
โ”‚   โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ vercel.json
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ .github/workflows/               # CI + backend deploy
โ”œโ”€โ”€ nginx/                           # Local TLS reverse proxy
โ”œโ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ LICENSE.md
โ””โ”€โ”€ README.md

๐Ÿ” SEO and indexing

Public pages: / and /docs/*. App shell routes (/transactions, /analytics, /monthly, /agent, /rules, /account) are noindex and disallowed in frontend/public/robots.txt.

Asset URL
robots.txt https://trackit-sigma-taupe.vercel.app/robots.txt
sitemap.xml https://trackit-sigma-taupe.vercel.app/sitemap.xml
llms.txt https://trackit-sigma-taupe.vercel.app/llms.txt
Open Graph image https://trackit-sigma-taupe.vercel.app/og-image.jpg
Web app manifest https://trackit-sigma-taupe.vercel.app/manifest.webmanifest

After deploy, verify ownership in Google Search Console (HTML file upload into frontend/public/ or DNS), then submit the sitemap URL above. GitHub Actions builds and prerenders the frontend, then deploys that dist to Vercel (vercel deploy --prebuilt) and records the GitHub Production deployment. Vercel git auto-deploys are disabled so production always serves the CI prerendered HTML.


๐Ÿ”’ Security

HTTPS Auth Isolation SQL Injection CORS Input Validation


๐Ÿค Contributing

PRs welcome. Fork the repo, use a feature branch, and open a pull request against main.


Fork
Create your fork

Create
Feature branch

Commit
Conventional commits

PR
Open PR

๐Ÿ“„ License

Copyright (c) 2026 Nandan Ramesh. This project is licensed under the GNU Affero General Public License v3.0 โ€” see the LICENSE.md file for details.



Built with โค๏ธ by Nandan Ramesh