Whenever you're ready, walk me through how you'd approach this.
Describe how you ensure your code is maintainable and scalable for long-term projects.
Give a practical codebase structure with clear layers, dependency direction, state ownership, dependency injection, and testing practices. Explain at least one trade-off against an alternative approach.