The most important programming-style and architectural decisions I make as a frontend (or full-stack) developer building a complex application:
-
TypeScript types are the glue that holds the application together and ensure changes can be made quickly later when you revisit older code. Server-client communication is secured with end-to-end type-safety (also a classic source of bugs in applications — the API changes but you forget to update the dependent clients).
-
Domain-driven design is the architectural foundation for any complex application, as it ensures related functionality lives together and is not spread across distant and overcrowded folders. Concretely this means a subfolder in
src/modules/(or whatever you prefer) that contains everything related tousers,subscriptions,posts, and so on. Each module is built as follows: