Ask a private tutor how they track fees and you'll usually hear about a notebook, a spreadsheet, or "I just remember." It works until one student is in two of your classes. Grade 10 Physics is paid weekly. A-Level Mathematics is paid monthly. Same student, same parent's phone number, two different due dates.
That case is where most simple tuition apps break, and it's the case we designed TutorTrack around. TutorTrack is our offline Flutter app for private tutors, home teachers and small coaching classes. It covers a student directory, a weekly timetable, attendance and upcoming fees, and it keeps everything on the device.
Here are the three decisions that shaped it.
Decision 1: the fee lives on the enrollment, not the student
The first version of any tutor app puts fee and nextDueDate on the student. Then a student joins a second class and you have nowhere to put the second fee.
So in TutorTrack, a student can join several classes, and each of those enrollments has its own fee and billing cycle. There are three cycles: per class, weekly or monthly.
// simplified
enum BillingCycle { perClass, weekly, monthly }
@HiveType(typeId: 4)
class Enrollment extends HiveObject {
@HiveField(0) late String studentId;
@HiveField(1) late String classId;
@HiveField(2) late double fee;
@HiveField(3) late BillingCycle cycle;
@HiveField(4) late DateTime nextFeeDate; // calculated, but editable by hand
}
The next fee date is calculated from the class billing cycle, and the tutor can still change it by hand. That last part matters more than it sounds. Real tutors give a family an extra week, or shift a date after a holiday. If the app fights them, they go back to the notebook.
// simplified
DateTime advance(DateTime from, BillingCycle cycle) => switch (cycle) {
BillingCycle.weekly => from.add(const Duration(days: 7)),
BillingCycle.monthly => DateTime(from.year, from.month + 1, from.day),
BillingCycle.perClass => from, // per-class billing left out of this sketch
};
The directory still feels like a list of students, not a list of enrollments. Each student shows colour tags for their classes, and every class gets one of 14 colours that's used across the schedule, the directory and those tags.
Decision 2: reminders are local, and deletes clean up after themselves
With no backend there's no push server, so fee reminders are local notifications. Each one fires at 9:00 AM the day before the due date, scheduled in the device's time zone with the timezone package. So 9:00 AM means 9:00 AM wherever the phone is set.
Local notifications have one trap: to cancel or replace a reminder you need its ID, and that ID has to be the same every time you compute it. Object.hash and String.hashCode aren't guaranteed to be stable across app launches, so they're the wrong tool. A small deterministic hash over the enrollment's keys does the job:
// simplified
int reminderId(String studentId, String classId) {
var h = 0x811c9dc5; // FNV-1a
for (final c in '$studentId|$classId'.codeUnits) {
h = ((h ^ c) * 0x01000193) & 0x7fffffff;
}
return h;
}
Notification IDs are one of the things the unit tests cover, along with fee date calculation and backup round trips.
The other half is deleting. Removing a student or a class also removes its time slots, attendance records and reminders. Without that, a student who left in March keeps triggering a "fee due tomorrow" notification in June, and the tutor stops trusting every reminder.
The Upcoming Fees screen sorts everyone by due date with overdue, due today, tomorrow and days-left labels. From a student's profile you can generate a PDF fee invoice on the device, or tap to call the parent.
Decision 3: encrypt the database, and treat restore as dangerous
Student records hold names, phone numbers and fees. They're stored in an AES-256 encrypted Hive CE database, with the key in flutter_secure_storage. The optional PIN lock is a 4-digit PIN stored as a salted PBKDF2 hash, with a lockout after repeated wrong attempts, and the app locks again when it goes to the background.
Backups are password-protected AES-256-GCM files that include students, classes, schedules, attendance and settings. The decision we care most about is on the way back in: a backup file is fully checked before it replaces any data. A half-restored database is worse than no restore at all. Older backup formats still restore, and if the encrypted database can't be opened, the app shows a recovery screen instead of crashing.
We also took the ads out. Version 1.1.2 removed Google AdMob completely, so there's no ad SDK and no ad unit ID anywhere in the package.
Where it stops
- One device, no accounts. There's no backend and no login. A backup file is how data moves to a new phone.
- Reminders need a phone. The web build is a preview of the screens. Notifications are switched off there, and fee reminders work on Android and iOS only.
- iOS builds need a Mac with Xcode.
- A small test suite. There are 13 unit and widget tests, covering backup round trips, fee date calculation and notification IDs. If you extend the app, you'll be writing more.
The stack: Flutter 3.47 or newer, Dart 3.11 or newer, Riverpod 3 with riverpod_generator, hive_ce, Android 7.0 (API 24) and up, iOS 13.0 and up.
Try it
- Web preview: https://guide.stacklynlabs.com/tutortrack/preview/
- Android APK: https://drive.google.com/file/d/1ZxP9t6VoI8Q4MWAAJmEUIjDb9qkt-_QX/view?usp=sharing
- Product page: https://stacklynlabs.com/product/tutortrack/
The full source is $29.
If you've built anything with billing, where did you put the fee: on the person, or on their relationship to the thing they pay for?


Top comments (0)