Blog post

Clean Code Alone Is Not Enough

Clean code could not hold the codebase together; enforced boundaries did. A practical path: Modulith.

Two-panel cover card: a circular dependency between Products and Users causing change fear, versus a Modulith with build-enforced module boundaries

There was a time I believed writing clean code was enough. Functions tidy, variable names meaningful, folder structure in order. But when the project grew big, I learned that none of this can hold the real problem back.

The real problem arrives when the codebase has no enforced boundary. Products imports from Users, Users imports from Products. A circular dependency takes shape. From then on, touching Products breaks Users. The two features cannot be tested in isolation. Under deadline pressure, nobody in code review looks at that dependency graph either. Everyone checks whether the code is clean and whether there is a bug.

Two years later, working in that codebase means fearing every single change.

One practical way out of this problem is the Modulith architecture. The whole application stays one deployable unit, but inside, each module’s boundary is explicitly defined. Dependencies always flow one way, never backward. If anyone crosses that boundary, the build itself fails. It is not left to human review; the tool enforces it.

There is a bonus advantage too. When somebody new joins the team, they read the codebase and immediately understand which feature lives where and which module depends on whom. Onboarding needs no separate walk-through.

Many people see thinking about architecture as extra work. But it is really one of those jobs where skipping it wastes far more time later.

Tags

Software ArchitectureFrontend DevelopmentClean Architecture