Uploaded October 2026 | Updated November 2026, 14 hours ago
In this episode, I finally stop staring at the organization data model and build a real user interface on top of it.
The organization hierarchy has taken several videos, a pile of commits, multiple rounds with Cursor and CodeRabbit, and a lot of thinking about parents, children, deletes, inheritance, foreign keys, and transactions. At this point, the model feels solid—but I want more than unit tests. I want to see whether it actually feels natural when exposed through a UI.
So we build a simple organization manager inside the Tsugi admin interface. It starts with a tenant selector, then lets us create and reorganize a hierarchy of schools, departments, and centers while staying safely inside a single tenant.
Very quickly, the UI becomes a validator for the architecture. We create Engineering, Computer Science, Mechanical Engineering, a Center for AI, move organizations around, and confirm that non-empty organizations cannot simply be deleted. The UI naturally exposes the rules we spent days designing into the data model.
Then we take it one step further and attach courses to organizations. Now the organization manager shows both child organizations and courses, and refuses deletion until those dependents are moved or removed. That is exactly the behavior I wanted the underlying model to support.
Finally, we add a Panther functionality test so this new admin feature is covered by automated testing from the first commit.
The fun part is the asymmetry: the data model took several days of thought. Once the model was right, the basic UI came together in minutes. That is a pretty good reminder that getting the architecture right pays off later.
Topics include:
- Tsugi organization hierarchy
- Admin UI design
- Tenant-aware organization management
- CRUD interfaces
- Hierarchical data
- Parent and child organizations
- Moving organizations
- Safe deletion
- Courses inside organizations
- Data model validation
- Cursor AI
- CodeRabbit
- Panther tests
- Functional testing
- Integration testing
- Software architecture
- AI-assisted development
AI Coding with Dr. Chuck is an ongoing series where I build real software with AI, think through architecture out loud, test ideas in working code, and try to understand why the system works instead of simply generating code.
In this episode, I finally stop staring at the organization data model and build a real user interface on top of it.
The organization hierarchy has taken several videos, a pile of commits, multiple rounds with Cursor and CodeRabbit, and a lot of thinking about parents, children, deletes, inheritance, foreign keys, and transactions. At this point, the model feels solid—but I want more than unit tests. I want to see whether it actually feels natural when exposed through a UI.
So we build a simple organization manager inside the Tsugi admin interface. It starts with a tenant selector, then lets us create and reorganize a hierarchy of schools, departments, and centers while staying safely inside a single tenant.
Very quickly, the UI becomes a validator for the architecture. We create Engineering, Computer Science, Mechanical Engineering, a Center for AI, move organizations around, and confirm that non-empty organizations cannot simply be deleted. The UI naturally exposes the rules we spent days designing into the data model.
Then we take it one step further and attach courses to organizations. Now the organization manager shows both child organizations and courses, and refuses deletion until those dependents are moved or removed. That is exactly the behavior I wanted the underlying model to support.
Finally, we add a Panther functionality test so this new admin feature is covered by automated testing from the first commit.
The fun part is the asymmetry: the data model took several days of thought. Once the model was right, the basic UI came together in minutes. That is a pretty good reminder that getting the architecture right pays off later.
Topics include:
- Tsugi organization hierarchy
- Admin UI design
- Tenant-aware organization management
- CRUD interfaces
- Hierarchical data
- Parent and child organizations
- Moving organizations
- Safe deletion
- Courses inside organizations
- Data model validation
- Cursor AI
- CodeRabbit
- Panther tests
- Functional testing
- Integration testing
- Software architecture
- AI-assisted development
AI Coding with Dr. Chuck is an ongoing series where I build real software with AI, think through architecture out loud, test ideas in working code, and try to understand why the system works instead of simply generating code.










