RyanFirdaus
All work
Open sourceFlutterDartDriftSQLiteRiverpod

B4Due

B4Due is an Android app that tells you before a bill is due. It shows electricity, insurance, vehicle tax, loans, streaming, and subscriptions. You choose your main currency from 31 currencies. You can enter each bill in its own currency, and the app shows the amount in your main currency. The app reminds you 7 days, 3 days, and 1 day before the due date, and on the due date. You can mark a bill as paid from the reminder. Each bill is a coloured card in a wallet, and the most urgent card is at the front. For a loan, the app counts the payments and stops after the last payment. If you set a monthly budget, the home page shows a warning when your bills are more than the budget. A widget on the home screen shows how much you must pay this month and the next bill. The app has no account and no server, so it is free for all users. It is in English and Indonesian, and it has a light theme and a dark theme.

01 / 12Home with wallet cards and the monthly budget

Cost to use. No account, no ads
$0
Currencies you can use
31
Reminders before each due date
4
Tap to mark a bill as paid
1
Automated tests on each change
291

The problem

A reminder app is only useful if each reminder comes on time. B4Due has no server, so the phone must schedule every reminder. The reminders must stay after the phone restarts. They must also get past the battery savers on Xiaomi, OPPO, vivo, and other phones. The Paid button on a reminder works when the app is closed. It must never record the same payment two times. People pay bills in many currencies, so the app also needs current exchange rates. It must get them without an account and continue to work offline.

One function makes the full list of reminders from the bills, the settings, and the time. Each reminder gets a fixed ID. The app compares this list with the reminders on the phone and changes only the differences, so a reminder never shows two times. A tap on a reminder uses the same database as the app and records a payment in one safe step. Each bill keeps its own price, so a change of the main currency never loses an amount. The app keeps the exchange rates on the phone, so the totals stay correct offline.

Architecture

How it fits together

01

Reminders That Come on Time

Your phone keeps the schedule, not a server. The app does not need the internet for reminders. After a restart, an update, or a change to a bill, the app makes the schedule again. You never get the same reminder two times.

02

Pay From the Reminder

Tap Paid on the reminder. You do not have to open the app. The app records the payment and moves the bill to the next due date. If you tap two times, the app records the payment only one time.

03

Your Data Stays With You

There is no account, no server, and no ads. All bills and payments stay on your phone. The app uses the internet only to get exchange rates, and it sends no personal data. You keep your backups in your own storage.

Stack

What each piece does

  1. 01

    Flutter + Riverpod

    The app uses Flutter, with Riverpod for state and go_router for the five tabs. The business rules do not use Flutter. Thus, tests can check dates and reminders without a phone.

  2. 02

    Own UI Kit

    The app uses no Material or Cupertino widgets. It has its own wallet cards, buttons, text fields, date and time pickers, sheets, and messages. Tests check that no Material import comes back. Tests also check the colour contrast (WCAG AA) and compare screenshots in the light theme and the dark theme.

  3. 03

    Drift / SQLite

    Drift keeps the data in SQLite on the phone. Each change to the database structure has a migration. Tests check each migration from every earlier version with real data. The build makes SQLite from its source code, as F-Droid requires.

  4. 04

    Local Notifications

    Exact alarms schedule the reminders for the next 120 days on Android. A guide for each phone brand helps users stop battery savers. A test button and optional calendar alarms give more safety.

  5. 05

    Home-Screen Widget

    A 4x2 Android widget shows the amount to pay this month, a bar for the paid amount, and the most urgent bill. A tap opens that bill. Dart calculates the text, and the widget updates each time the reminders change. The widget needs no more permissions.

  6. 06

    Background Isolates

    Reminder actions and background tasks run in separate isolates. All of them use one shared database. Thus, a payment from a reminder shows on the open home page immediately. A test sends the same action six times at the same time and checks for one payment.

  7. 07

    Currencies and Exchange Rates

    You choose a main currency from the 31 currencies of the European Central Bank. Each bill can use its own currency. The app gets the daily rates, keeps them on the phone, and updates them every 12 hours. Each bill keeps its own price, and each payment keeps its currency. Thus, a change of the main currency never loses an amount.

  8. 08

    GitHub Actions

    Each change runs the analysis, the unit tests, the migration tests, and the screenshot tests. Then CI builds the APK and checks its permissions. Each green build on main gives a signed test version, and users can update with Obtainium.

Next projectSmartcool Monitoring