Menu

Post image 1
Post image 2
1 / 2
0

Feature Based Clean Architecture. Part 3: The Architectural Risk of Cycles in NestJS: ROI of Decisions on a Five-Year Horizon

DEV Community·Victor Shkirov·22 days ago
#wEwgyvU7
Reading 0:00
15s threshold

An architectural doctrine for NestJS projects: a breakdown of typical codebase degradation scenarios and the structural constraints that keep them from emerging as the feature set grows. Now let's see what this "decomposition into services" actually costs on a horizon a little longer than one sprint. Our product already has a FollowsService — it lives tidily in its own module, drops "followerId → targetUserId" relations into its table, and knows nothing it shouldn't. In parallel — UsersModule , with the pieces split out into separate services: UserPrivacyService and UserSettingsService . Each is responsible for its own facet of the user. Single responsibility, the implementation is clean, review is a celebration. Then complaints start coming in through support: strangers send all kinds of nastiness in DMs, users want to hide their profiles from random eyes. The request is clear, human — the PM picks it up: we'll do private accounts.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More