Files
rental_income_tracker/README.md
T
hans 2e703c6722 Refactor environment variable handling and update build instructions
- Introduced a Makefile for building the release APK with `make build release`.
- Updated README to reflect new build command and usage of `--dart-define-from-file=.env`.
- Removed dotenv dependency and switched to using Dart's `--dart-define` for API key management.
- Adjusted ForexRateAPI key loading logic to improve error handling and clarity.

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2026-03-20 09:55:07 +01:00

2.0 KiB

rental_income_tracker

Simple Flutter app to track US rental income and convert to SEK for Swedish tax reporting.

What it does

  • Stores a default monthly rent amount in USD.
  • Shows year-based monthly rows in a table (January to current month for current year, full year for past years).
  • Marks each month as Paid on time, Paid late, Not paid, Pending, or Not occupied.
  • Saves USD amount, SEK amount, and USD->SEK rate when a payment is logged.
  • Schedules local rent check notifications with Yes/No actions.
  • Retries one time on the next eligible day if not confirmed.
  • Supports one-click backfill for last year using 1st-of-month EST rates.
  • Exports local data as a data file.

Important business rules implemented

  • On-time means payment is confirmed on or before the 1st at 23:59 EST.
  • Notification cycle starts after EST midnight and respects local quiet hours (no reminders after local 23:00).
  • If a notification would fall after local quiet hours, it is deferred to 09:00 local.
  • If occupancy is turned off, notifications stop and current/future months are marked Not occupied.
  • Updating rent amount applies to future payment logs.

Setup

  1. Create .env in the project root with your FX API key:
FOREX_RATE_API_KEY=REPLACE_WITH_YOUR_FOREXRATE_API_KEY
  1. Install dependencies:
flutter pub get
  1. Run:
flutter run --dart-define-from-file=.env
  1. Build release APK:
make build release

Usage

  1. Open Settings and set monthly rent in USD.
  2. Keep Unit occupied enabled while the property is rented.
  3. Use Backfill last year to import the previous year in one click.
  4. Use Create backup to export a JSON backup into Downloads or any directory you choose.
  5. Use Import backup file to restore from a JSON backup you pick with the file chooser.
  6. Use year arrows on the main screen to switch yearly views.

Notes

  • Data is stored locally on-device using shared preferences.
  • Notification action handling when the app is terminated may depend on OS behavior.