Refactor: split handlers/mod.rs, templates/mod.rs, services/mod.rs into per-entity modules #12
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_biz#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Three files in
hero_biz_uido all the work for all entity types and have grown to an unmanageable size:src/web/handlers/mod.rssrc/web/templates/mod.rssrc/services/mod.rsEvery route handler, every HTML template, and every DB operation for every entity (persons, companies, instruments, contracts, transactions, contacts, opportunities, deals, projects, tasks, milestones, comments, …) is concatenated into these three files.
This is the direct cause of the bugs tracked in issue #11. When all entity code lives in one flat file, per-entity inconsistencies — some handlers resolve related names, others don't; some update handlers preserve link fields, others hardcode
None— are structurally invisible. There is no boundary that makes the omission obvious.Contrast with
hero_biz_appThe
hero_biz_appcrate already does this correctly:One file per entity. The
hero_biz_uiweb layer should follow the same pattern.Proposed structure
Why this matters beyond cleanliness