Structuring

How to structure projects / modules

First of: Collect your requirements, and determine if what you are building falls into one of these categories:

  • Multiplatform library → See Libraries
  • JVM-only library → See Libraries
  • JVM-only Service → See How to structure ktor services
  • Standalone application (e.g. CLI) → No general recommendation can be given, depends on the module
  • Non-JVM application (e.g. Web Frontends) → No general recommendation can be given, depends on the module, for Web Frontends see Web Frontends

How to structure ktor services

See Ktor structuring

Libraries

For libraries / micro-frameworks no standard structuring can be applied, it depends on the use-case. In general, your structure should fit with the library authors' guidelines.

Web Frontends

For Nuxt applications, stick to the default structure.