February 14th, 2026
Cleaning House: Architecture Consolidation & React Cleanup Today was a massive day for paying down technical debt. We restructured the entire backend API to be domain-centric and decomposed massive frontend screens into clean, testable hooks.🛠️ Backend Consolidation
validating the architectural decision to simplify the API layer. We moved away from scatteredget/list/create files to consolidated domain modules.
1. Commitments & Instances API
- Merged Operations:
commitments/get.ts+commitments/list.ts→commitments/read.tsinstances/get.ts+instances/list.ts→instances/read.ts
- Simplified Layer: Removed the unnecessary
core/commitments/queries.tsabstraction. The API now queries the DB directly, reducing boilerplate. - Conflict Logic: Relocated
conflictDetection.tsfromlib/tocore/commitments/to co-locate it with domain logic.
2. Full CRUD Implementation
- New Endpoints: Added
create.ts,update.ts, anddelete.tstoapi/instances/to support full lifecycle management of instances. - Consistency: Both
commitmentsandinstancesnow follow the exact same API structure (read,create,update,delete).
📱 Frontend Decomposition
We tackled the growing complexity of our main screens by extracting logic into custom hooks.1. Schedules Screen Refactor
TheSchedulesScreen was over 250 lines. We reduced it to ~100 lines by extracting:
2. Commits Screen Refactor
Similarly, theCommitsScreen was decomposed:
3. Skeleton Loading Polish
- Fix: Replaced the full-screen overlay in
CommitsScreenwith proper list-item skeletons. - Layout: used
Viewcontainers to prevent layout collapse during loading states.
📝 Key Takeaways
We adhered to the “Separation of Concerns” principle today.- Backend: Organized by Domain (Commitments vs Instances) rather than Action (Get/List).
- Frontend: Separated View (Render) from Logic (Hooks).