Yearly Budget: Built Smarter
Building Yearly Budget involved more than creating a subscription tracker. Along the way, we developed a notification system using Google Apps Script, GitHub Actions and Firebase, before rebuilding the app as a native Android application.
The finished app combines yearly subscription tracking, secure accounts, cloud storage and Android notifications with a softer, more modern design.
A Simple Way to Manage Yearly Subscriptions
Yearly Budget helps users organise yearly subscriptions and upcoming payments in one place.
Users can add subscriptions, enter payment amounts and months, edit or delete entries, and see their monthly and yearly totals. Dated reminders help keep track of upcoming payments and cancellation dates.
The native Android version preserves the familiar organisation of the original app while introducing floral headers, rounded cards, gentle colours and Android controls.
Secure Accounts and Cloud Storage
Firebase Authentication handles registration, sign-in, password resets and email verification. Subscriptions and reminders are stored in Cloud Firestore under the user's account, with security rules controlling access.
Existing users can sign in with their original accounts and continue using their saved budgets.
The app also supports an optional Remember my login feature through Android Credential Manager. When enabled, tapping a login field can open the device's saved-password chooser. Selecting a saved login fills both fields and starts sign-in.
Passwords are managed by the user's password manager, rather than being saved in app preferences or Firestore. The chooser's appearance and availability depend on Android and the installed password manager.
The Original Apps Script Notification System
Before the native rebuild, Yearly Budget ran as a Progressive Web App, with an Android version packaged through Bubblewrap.
One development challenge was sending automatic reminders without paid scheduled Firebase Cloud Functions. GitHub Actions scheduling did not behave reliably enough during our testing, so we introduced Google Apps Script to start the daily process.
The system worked like this:
- Google Apps Script used a time-based trigger to start the process around 9:30 AM UK time.
- It triggered a GitHub Actions workflow using a restricted GitHub token stored privately in Script Properties.
- The workflow authenticated with Google Cloud using Workload Identity Federation and checked Firestore for unfinished reminders due the following day.
- Firebase Cloud Messaging sent notifications to devices registered to the relevant account.
- The web app's service worker displayed the notifications on supported devices.
Apps Script handled the timing rather than reading the database itself. The workflow included checks to reduce duplicate notifications and handle invalid device registrations.
Testing the Web Notification System
During development, we tested the complete route from an automatic Apps Script trigger through GitHub Actions and Firebase.
A notification appeared on an Android phone with the message:
“Ice cream is due tomorrow.”
This demonstrated that the web notification system could deliver a real reminder to a registered device. Delivery still depended on notification permissions, connectivity and browser support.
Keeping the Work as a Reusable Template
Although the finished native app no longer uses that notification route, we kept the Apps Script work for future projects.
The script was renamed App notification template and disconnected from Yearly Budget's website reminder workflow. It is inactive by default and requires deliberate configuration and activation before it can trigger another workflow.
The template preserves the scheduling approach, configuration checks and duplicate-run protection. It is a starting point for a future notification system, rather than a complete notification service on its own.
The retired Yearly Budget web workflows and scheduler source were removed from the website repository. The separate Apps Script template remains available for reuse.
How Notifications Work in the Native App
The finished Yearly Budget app uses Android notifications managed through Android WorkManager. It no longer needs Google Apps Script, GitHub Actions, browser service workers or the old GitHub notification token to deliver its reminders.
When reminders are enabled, the app schedules background checks. After approximately 9:30 AM UK time, it checks the signed-in user's unfinished reminders dated for the following day and creates the relevant Android notifications.
Reminders can be entered well in advance, including dates a year away. The app checks the actual reminder date as it approaches. These are dated reminders; they do not automatically repeat every year.
Notification permission must be allowed, and the background check needs an internet connection to retrieve reminders from Firestore. Android battery restrictions, force-stopping the app and other device settings can delay or prevent a check. Notifications are therefore not guaranteed at an exact time.
Reminders that only specify a month need an exact date before they can produce a day-before notification.
Keeping Running Costs Manageable
The original web notification system was developed while the Firebase project used the free Spark plan. The project has since moved to Firebase's Blaze pay-as-you-go plan.
Blaze includes no-cost usage allowances, but charges can apply when billable usage exceeds them. Yearly Budget does not require paid scheduled Cloud Functions for its native reminder checks.
A £5 monthly budget alert is configured specifically for the Yearly Budget project. It sends an alert when recorded spending reaches £5.
This is a spending notification, not a hard limit. Billing information can be delayed, and charges can continue beyond the alert amount. Database use also depends on the number of users, devices and actions performed in the app.
From Website to Native Android App
Yearly Budget is now a native Android application, rather than a website displayed inside an Android wrapper.
The old website has been replaced with a Google Play download page. A small cleanup worker remains to retire old web installations and clear Yearly Budget's own offline cache.
The native source code is preserved in a private GitHub repository for future maintenance. The existing application ID and signing workflow were retained for updates.
The project began with a working web notification system and ended with a native app that uses Android's background scheduling and notification features. Keeping the Apps Script system as a template preserves that earlier work for projects where it may still be useful.
Download Yearly Budget on Google Play.
Built and developed by Ventsharm.
Currently a developer myself, is anyone else developing apps and how is it going for you? ๐
ReplyDelete