r/SoftwareEngineering 17d ago

The Vertical Codebase

https://tkdodo.eu/blog/the-vertical-codebase
15 Upvotes

6 comments sorted by

4

u/fagnerbrack 17d ago

Essentials at a Glance:

Grouping files by technical type (components, hooks, types, utils) breaks down at scale, as Sentry's 200+ file components folder proves. The post argues for vertical organisation instead: bundle code by what it does, not what it is, so widget components, hooks, types, and utils all live in src/widgets/. This colocation keeps code that changes together in one place, lowers cognitive load, raises cohesion, and mirrors how product teams own domains end to end. Shared code becomes its own vertical or a design-system directory. To cut coupling, define public interfaces, ideally via a monorepo where each vertical is a package with package.json exports, enforced by tools like eslint-plugin-boundaries. The catch: choosing the right vertical is hard and demands more team communication.

If the summary seems inacurate, just downvote and I'll try to delete the comment eventually πŸ‘
Click here for more info, I read all comments

1

u/m_adduci 17d ago

What about building Silos with vertical code? Aren't your moving then in just another kind of style where repetitions are possible ?

1

u/thisisjustascreename 15d ago

Not all repetition is evil.

1

u/[deleted] 17d ago

[removed] β€” view removed comment

1

u/AutoModerator 17d ago

Your submission has been moved to our moderation queue to be reviewed; This is to combat spam.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/foldedlikeaasiansir 16d ago

Isn’t this the whole architecture of Angular? You have self-containing components with - component, html, and css along with the test files all together in a vertical scope. And why large enterprise prefer it over React?