Back to list
bentefay

import

by bentefay

A web app to help you understand where your money is going.

2🍴 0📅 Jan 10, 2026

SKILL.md


name: import description: CSV and OFX transaction import parsing. Use when working on files in src/lib/import/.

Import Guidelines

Flow

File Drop → Parse (CSV/OFX) → Column Mapping → Formatting → Preview → Import

Money Handling

All amounts stored as integers in minor units:

import { toMinorUnitsForCurrency } from "@/lib/domain/currency";

toMinorUnitsForCurrency(12.34, "USD"); // 1234 (cents)
toMinorUnitsForCurrency(1234, "JPY");  // 1234 (0 decimals)
toMinorUnitsForCurrency(1.234, "KWD"); // 1234 (3 decimals)

Currency resolution order: OFX CURDEF → Account → User default → Vault default → USD

CSV Parser

Auto-detects: separator, headers, date/number formats.

Duplicate Detection

Uses Levenshtein distance: date window ±3 days, amount tolerance 1 cent, description 80% similarity.

Critical Rules

  • Never trust user input - validate all parsed data
  • Handle encoding: UTF-8, Latin-1, Windows-1252
  • Preserve originalRow for debugging
  • Handle negative formats like (123.45)
  • Return structured errors, don't throw

Testing

Test with real bank exports covering different date formats (US/EU/ISO), number formats, edge cases, large files.

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon