Kotlin Multimodule Template

A minimal, production-ready Kotlin multimodule template for Spring Boot applications with proper Spring-Kotlin integration, comprehensive testing, and GitHub template features.

🎯 Overview

This template provides a clean foundation for creating scalable Kotlin microservices with:

  • Simple 2-module architecture (service + application layers)
  • Spring-Kotlin integration with allopen plugin configured
  • Dependency locking for reproducible builds
  • Comprehensive testing setup with unit test grouping
  • GitHub template ready with customization scripts
  • Production-ready CI/CD and security scanning

πŸš€ Quick Start

1. Use This Template

Click β€œUse this template” button on GitHub to create your new repository.

2. Customize Your Project

# Linux/Mac
./customize.sh

# Windows PowerShell  
./customize.ps1

3. Build and Run

./gradlew build
./gradlew :springboot-application:bootRun

4. Test Your Setup

curl http://localhost:8080/api/example/health

πŸ“š Documentation Sections

Getting Started

Development

CI/CD & Deployment

Reference

πŸ—οΈ Architecture

Current Modules

  • service-module: Business logic and services with Spring annotations
  • springboot-application: REST controllers and application configuration

Key Features

  • βœ… Spring Bean Creation: Kotlin allopen plugin configured for Spring annotations
  • βœ… Dependency Injection: Works seamlessly with @Service, @Controller annotations
  • βœ… Transaction Management: @Transactional support with AOP proxies
  • βœ… Reproducible Builds: Dependency locking enabled
  • βœ… Modular Testing: Unit tests grouped by scope and performance

πŸ§ͺ Testing Strategy

This template includes comprehensive testing setup:

# Run all tests
./gradlew test

# Run specific test groups
./gradlew test --tests "*Unit*"
./gradlew test --tests "*Integration*"

# Performance tests
./gradlew jmh

πŸ“¦ Dependency Management

Uses Gradle dependency locking for reproducible builds:

# Update locks after adding dependencies
./gradlew resolveAndLockAll --write-locks

# Check for dependency updates
./gradlew dependencyUpdates

πŸ”’ Security

  • Dependency vulnerability scanning with OWASP
  • License compliance checking
  • GPG commit signing (optional)
  • Branch protection for main branches

πŸ“ˆ Getting Help


Copyright © 2025 Programmer Newbie IO. Distributed under the MIT License.