Skip to content

team-dodn/spring-boot-kotlin-template

Repository files navigation

SpringBoot Kotlin Template

Twitter Youtube CI License

This is not the best structure. This is a good basic structure to use early in the project when productivity is important.

Remember, as your software grows, your structure must grow too.

Modules

Core

Each submodule of this module is responsible for one domain service.

This must make the modular structure grow with the growth of the service.

core:core-api

It is the only executable module in the project. It is structured to have domains to maximize initial development productivity.

It is also responsible for providing APIs and setting up frameworks for services.

core:core-enum

This module contains enums that are used by core-api and must be delivered to external modules.


Clients

Submodules of this module are responsible for integrating with external systems.

clients:clients-example

This module shows an example of HTTP communication with Spring-Cloud-Open-Feign.


Storage

Submodules of this module are responsible for integrating with the various storages.

storage:db-core

This module shows an example of connecting to MySql using Spring-Data-JPA.


Support

Submodules of this module are responsible for additional support.

support:logging

This module supports logging of service and has a dependency added for distributed tracing support.

It also includes dependencies to support Sentry.

support:monitoring

This module supports monitoring of services.


Tests

Submodules of this module are responsible for the convenience of writing test codes.

tests:api-docs

This module is for writing spring-rest-docs conveniently.


Dependency Management

All dependency versioning is done through gradle.properties file.

If you want to add a new dependency, put the version in gradle.properties and load it in build.gradle.kts.


Runtime Profiles

local

This profile aims to configure an environment that can be developed even if the network is disconnected.

local-dev

This profile aims configurations that allow me to connect to the DEV environment from my local machine.

dev

This profile exists for deploying Development environments.

staging

This profile exists for deploying Staging environments.

live

This profile exists for deploying Live environments.


Test Tasks & Tags