# Structuring a Ktor project

DevFeed: [Structuring a Ktor project](<https://devfeed.tech/articles/structuring-a-ktor-project-25562.md>)

Original publisher: [Read original article](<https://www.marcogomiero.com/posts/2021/ktor-project-structure/>)

Author: Marco Gomiero

Published: 2021-04-07T00:00:00Z

Content type: article

Language: en

Sources: [Posts on Marco Gomiero](<https://devfeed.tech/sources/posts-on-marco-gomiero.md>)

Topics: [Ktor](<https://devfeed.tech/topics/ktor.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [project layout](<https://devfeed.tech/topics/project-layout.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>)

Tags: [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [backend](<https://devfeed.tech/tags/backend.md>), [backend-development](<https://devfeed.tech/tags/backend-development.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [database](<https://devfeed.tech/tags/database.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [features](<https://devfeed.tech/tags/features.md>), [framework](<https://devfeed.tech/tags/framework.md>), [in-memory-database](<https://devfeed.tech/tags/in-memory-database.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [ktor](<https://devfeed.tech/tags/ktor.md>), [logs](<https://devfeed.tech/tags/logs.md>), [migrations](<https://devfeed.tech/tags/migrations.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-developer](<https://devfeed.tech/tags/mobile-developer.md>), [project](<https://devfeed.tech/tags/project.md>), [quartz](<https://devfeed.tech/tags/quartz.md>), [series](<https://devfeed.tech/tags/series.md>), [swagger](<https://devfeed.tech/tags/swagger.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

The article introduces a Ktor backend project structure, with a focus on dependency injection, configuration, and testing. It describes Ktor as a lightweight, asynchronous Kotlin framework using coroutines and a configurable Kotlin DSL, and explains that a new project can be generated with the IntelliJ wizard or start.ktor.io. The example project enables Call Logging, Content Negotiation, kotlinx.serialization, Locations, and Routing. The excerpt ends as the author begins describing the backend, so it does not provide the detailed implementation or testing setup.

## Source excerpt

SERIES: Building a backend with Ktor Part 1: Structuring a Ktor project Part 2: How to persist Ktor logs Part 3: How to use an in-memory database for testing on Ktor Part 4: How to handle database migrations with Liquibase on Ktor Part 5 Generate API documentation from Swagger on Ktor Part 6: How to schedule jobs with Quartz on Ktor Part 7: Moving from mobile to backend development with Ktor It's been a few months since I've started working with Ktor to build the backend of Revelop. We decided to go with Ktor because it is a lightweight framework, easy to use and with a gentle learning curve even for a mobile developer.