Eikaiwa Admin Dev Diary #1 - Freezing Lesson History
I recently attended the 5th Annual InTogether School Owners EXCHANGE in Gifu. I met a lot of knowledgeable people and a few that showed interest in my Eikaiwa Admin project. So I've decided to start a diary with updates on the current progress. I'll try to do this weekly!

Realizations
The integrity of this system's data is extremely important. If you look back at a billing record from two years ago, you would expect it to be 100% accurate for its time.
Until now, I've been relying on tracking changes to prices, tax rates, etc. and allowing the billing engine to calculate totals by cross-referencing lesson dates with those changes. For the most part this worked, but as the system grows, it becomes increasingly complex.
As an example, I added a toggle for including tax in tuition fees. For this not to break historical billing records, I'd need to track the time of each toggle flick.
And then there's the issue of historical lesson data. Lessons pull information such as textbook names and pricing from "programs". I was tracking pricing changes, but what if you change a textbook name, or rename a program? Looking at a past lesson would show the wrong names. You'd have to track every piece of data to avoid this, and the system would eventually collapse for trying to be too clever.
Solutions
I've started making architectural changes so that lesson and billing records are frozen in time. It's by far the most rock-solid way to guarantee the data remains true. And they will still be editable in case a school manager needs to correct a mistake. I expect to work on this over the next two or three weeks.
Coming up
Following that, the next big challenge will be to implement shadow planning. Essentially, the system will be divided into academic years so that while 2026/27 is the live dataset, a school manager will be able to switch to 2027/28, prepare for the school rollover next spring, and set it live when the time comes.