Skip to content

Architecture Best Practices

github-actions[bot] edited this page Oct 14, 2025 · 1 revision

Architecture Best Practices

  • DRY (Don’t Repeat Yourself) – eliminate duplicated logic by extracting shared utilities and modules.
  • Separation of Concerns – each module should handle one distinct responsibility.
  • Single Responsibility Principle (SRP) – every class/module/function/file should have exactly one reason to change.
  • Clear Abstractions & Contracts – expose intent through small, stable interfaces and hide implementation details.
  • Low Coupling, High Cohesion – keep modules self-contained, minimize cross-dependencies.
  • Scalability & Statelessness – design components to scale horizontally and prefer stateless services when possible.
  • Observability & Testability – build in logging, metrics, tracing, and ensure components can be unit/integration tested.
  • KISS (Keep It Simple, Sir) - keep solutions as simple as possible.
  • YAGNI (You're Not Gonna Need It) – avoid speculative complexity or over-engineering.
  • Don't Swallow Errors by catching expections, silently filling in required but missing values or adding timeouts when something hangs unexpectedly. All of those are exceptions that should be thrown so that the errors can be seen, root causes can be found and fixes can be applied.
  • No Placeholder Code - we're building production code here, not toys.
  • No Comments for Removed Functionality - the source is not the place to keep history of what's changed; it's the place to implement the current requirements only.
Clone this wiki locally