<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/vertical-slices-their-ownership-and-external-dependencies-c1z1aieuo" -->

---
title: Vertical slices, their ownership and external dependencies
description: Vertical Slice Architecture (VSA) raises recurring questions about ownership, shared data, and external dependencies. This deep-dive clarifies the vocabulary...
canonical: https://daily.dev/posts/vertical-slices-their-ownership-and-external-dependencies-c1z1aieuo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Vertical slices, their ownership and external dependencies | daily.dev
og:description: Vertical Slice Architecture (VSA) raises recurring questions about ownership, shared data, and external dependencies. This deep-dive clarifies the vocabulary...
og:url: https://daily.dev/posts/vertical-slices-their-ownership-and-external-dependencies-c1z1aieuo
og:image: https://api.daily.dev/og/posts/c1Z1AieuO.png
og:image:alt: Vertical slices, their ownership and external dependencies
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Vertical slices, their ownership and external dependencies

**[Architecture Weekly](https://daily.dev/sources/architectureweekly)** · 20 min read · 2 upvotes · 0 comments

## Summary

Vertical Slice Architecture (VSA) raises recurring questions about ownership, shared data, and external dependencies. This deep-dive clarifies the vocabulary confusion between slices, modules, and bounded contexts, arguing that most application areas are slices or modules within a single context — not autonomous bounded contexts. The core pattern: each slice declares narrow function types for its dependencies (in its own vocabulary), and a single composition root wires everything together. This eliminates cycles between modules, enables easy testing without mocking frameworks, and keeps business logic per entity, read models per query, and database schemas per module. The approach also applies to frontend composition, where pages or backend-for-frontend slices stitch data from multiple modules. Concrete TypeScript examples illustrate handler dependency injection, structural typing, and stub-based testing.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.architecture-weekly.com/p/vertical-slices-their-ownership-and>

## Questions this post answers

### How should a vertical slice handle a dependency on another module or an external system?

A slice should declare a narrow function type expressing exactly what it needs, in its own vocabulary, rather than importing a wide interface from the provider. The handler takes dependencies as its first argument and the message as the second; a composition root near the entry point wires real implementations, HTTP clients, or stubs into that declared shape without either side needing to change.

_Anyone structuring vertical slices around explicit dependencies can compare approaches and patterns on daily.dev._

### How do you avoid circular imports between two modules that both need data from each other, like orders and pricing needing contractor information?

Avoid the cycle by having each module declare its own narrow dependency type instead of importing the other module directly. For example, orders declares a CheckContractor type while pricing declares its own GetCompletedOrders type; the composition root supplies a function mapping one module's data into the shape the other module asked for, so neither module imports the other and no cycle exists.

_Developers debugging module boundary cycles can dig into architecture patterns like this on daily.dev._

### What is the difference between a bounded context, a module, and a vertical slice in DDD-style architecture?

A vertical slice is one piece of functionality cut through the whole application, like 'verify a transport order.' A module is a logical grouping of related slices, such as an Orders module holding registering, verifying, and confirming operations. A bounded context is a linguistic boundary where a word means one consistent thing; most applications' feature areas are slices or modules within a single bounded context, not separate contexts.

_Teams debating how to carve up a codebase into slices, modules, or contexts can explore these design tradeoffs on daily.dev._

## Similar posts on daily.dev

- [Where Vertical Slices Fit Inside the Modular Monolith Architecture](https://daily.dev/posts/where-vertical-slices-fit-inside-the-modular-monolith-architecture-tz11rkcko) · Milan Jovanović · 35 upvotes · 0 comments
- [Vertical Slice Architecture in Node.js: One Folder Per Use Case](https://daily.dev/posts/vertical-slice-architecture-in-node-js-one-folder-per-use-case-a1su2a1gx) · The T-Shaped Dev · 2 upvotes · 0 comments
- [Fractal Architecture, Cognitive Load, Vertical Slices and other terms that do\(n't\) fit your head](https://daily.dev/posts/fractal-architecture-cognitive-load-vertical-slices-and-other-terms-that-do-n-t-fit-your-head-vtl3yjldq) · Event-Driven by Oskar Dudycz · 0 upvotes · 1 comments
- [Vertical Slice Architecture Webinar](https://daily.dev/posts/vertical-slice-architecture-webinar-b5lv89hzi) · The Barley Architect · 0 upvotes · 0 comments
- [How to Test Vertical Slice Architecture](https://daily.dev/posts/how-to-test-vertical-slice-architecture-j5kybyrnx) · Milan Jovanović · 7 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#typescript](https://daily.dev/tags/typescript), [#dependency-injection](https://daily.dev/tags/dependency-injection), [#domain-driven-design](https://daily.dev/tags/domain-driven-design)

[View this post on daily.dev](https://daily.dev/posts/vertical-slices-their-ownership-and-external-dependencies-c1z1aieuo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Vertical slices, their ownership and external dependencies","url":"https://daily.dev/posts/vertical-slices-their-ownership-and-external-dependencies-c1z1aieuo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/vertical-slices-their-ownership-and-external-dependencies-c1z1aieuo"},"datePublished":"2026-08-10T15:19:11.375Z","dateModified":"2026-09-14T08:44:28.847Z","description":"Vertical Slice Architecture (VSA) raises recurring questions about ownership, shared data, and external dependencies. This deep-dive clarifies the vocabulary...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7b7123bdd9e6f542099b0d382cf87ed7?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7b7123bdd9e6f542099b0d382cf87ed7?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Architecture Weekly","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Architecture Weekly","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/de7f791943f4475191187c902742d2f7","url":"https://daily.dev/sources/architectureweekly"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/vertical-slices-their-ownership-and-external-dependencies-c1z1aieuo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,typescript,dependency-injection,domain-driven-design","timeRequired":"PT20M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Architecture Weekly","item":"https://daily.dev/sources/architectureweekly"},{"@type":"ListItem","position":3,"name":"Vertical slices, their ownership and external dependencies"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/vertical-slices-their-ownership-and-external-dependencies-c1z1aieuo#faq","mainEntity":[{"@type":"Question","name":"How should a vertical slice handle a dependency on another module or an external system?","acceptedAnswer":{"@type":"Answer","text":"A slice should declare a narrow function type expressing exactly what it needs, in its own vocabulary, rather than importing a wide interface from the provider. The handler takes dependencies as its first argument and the message as the second; a composition root near the entry point wires real implementations, HTTP clients, or stubs into that declared shape without either side needing to change. Anyone structuring vertical slices around explicit dependencies can compare approaches and patterns on daily.dev."}},{"@type":"Question","name":"How do you avoid circular imports between two modules that both need data from each other, like orders and pricing needing contractor information?","acceptedAnswer":{"@type":"Answer","text":"Avoid the cycle by having each module declare its own narrow dependency type instead of importing the other module directly. For example, orders declares a CheckContractor type while pricing declares its own GetCompletedOrders type; the composition root supplies a function mapping one module's data into the shape the other module asked for, so neither module imports the other and no cycle exists. Developers debugging module boundary cycles can dig into architecture patterns like this on daily.dev."}},{"@type":"Question","name":"What is the difference between a bounded context, a module, and a vertical slice in DDD-style architecture?","acceptedAnswer":{"@type":"Answer","text":"A vertical slice is one piece of functionality cut through the whole application, like 'verify a transport order.' A module is a logical grouping of related slices, such as an Orders module holding registering, verifying, and confirming operations. A bounded context is a linguistic boundary where a word means one consistent thing; most applications' feature areas are slices or modules within a single bounded context, not separate contexts. Teams debating how to carve up a codebase into slices, modules, or contexts can explore these design tradeoffs on daily.dev."}}]}
```

