# Composition Root: Where Providers Are Defined

> You start to see how the code is organized, and you find the one place that knows both the contracts and the implementations, for Android and iOS alike.

- URL: https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/04-clean-architecture-integration/lesson-05-wire-dependencies-at-composition-root
- Course: [Mobile Action Pro](https://dantech.academy/en/courses/kotlin-accelerator.md)
- Module: Clean Architecture and Integration
- Duration: 10 min
- Difficulty: intermediate
- Access: Enrolled students
- Tiếng Việt: https://dantech.academy/courses/kotlin-accelerator/engineer-builder/04-clean-architecture-integration/lesson-05-wire-dependencies-at-composition-root.md

## Objectives

- Read a DI module as a table that pairs contracts with implementations
- Choose single or factory by asking about lifetime instead of out of habit
- Follow startSharedApp and appKoinModules to see both platforms share one graph

## In this lesson

1. Lesson Goal
2. Part 1: One Module List For Two Platforms
3. Part 2: single Or factory? The Question Is Lifecycle
4. Part 3: The Power Of Constructor Injection
5. Part 4: One Test Locks The Whole Graph
6. Part 5: Not Everything Needs To Be Provided And Injected
7. Code Reading Path
8. Bad Smells
9. Key Takeaways

## Study with an AI agent

The full lesson is for students of this course. Students open the lesson on the web and press **Markdown** to copy all of it, then paste it into Claude, ChatGPT, Cursor or whichever agent you use. Faster: mint a token at `/profile/ai-agents` and your agent reads lessons over MCP.

- [Join the course](https://dantech.academy/en/kotlin-accelerator/checkout)

---

- Previous lesson: [How You Change The AI Provider With 1 Line Of Code](https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/04-clean-architecture-integration/lesson-04-swap-ai-provider-with-one-line.md)
- Next lesson: [Test Reducers And Use Cases](https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/05-testing-security-release/lesson-01-test-reducers-and-use-cases.md)
