Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/codelytv/kotlin-api-skeleton

πŸ’Ž Kotlin Hexagonal HTTP API template to create your new projects
https://github.com/codelytv/kotlin-api-skeleton

api hexagonal kotlin spring spring-boot testing

Last synced: 3 days ago
JSON representation

πŸ’Ž Kotlin Hexagonal HTTP API template to create your new projects

Awesome Lists containing this project

README

        



Codely logo


πŸ’Ž Kotlin HTTP API Skeleton


Build status
Codely Open Source
CodelyTV Courses


Template intended to serve as a starting point if you want to bootstrap a Kotlin HTTP API.




Take a look, play and have fun with this.
Stars are welcome 😊

This is a repository intended to serve as a starting point if you want to bootstrap an API in Kotlin.

## ☝️ Introduction

It could be useful if you want to start from scratch a kata or a little exercise or project. The idea is that you don't have to worry about the boilerplate
* Latest stable kotlin version
* Latest stable Springboot version
* Latest stable java version
* Best practices applied
* Some useful resources to start coding

## 🌎 How To Start

You could manually clone [this repo](https://github.com/CodelyTV/kotlin-api-skeleton) or just us it as a template

### Cloning the repository

We recommend to follow the next step by step process in order to avoid adding the bootstrap project commits to your project Git history:

1. [Use this repositoy template](https://github.com/CodelyTV/kotlin-api-skeleton/generate)
2. Clone your project
3. Move to the project directory: `cd your-project-name`
4. Build the project for the first time: `./gradlew build`
5. Run all the checks: `./gradlew check`. This will do some checks that you can perform with isolated commands:
1. [Klint](https://ktlint.github.io/) using [Spotless](https://github.com/diffplug/spotless): `./gradlew spotlessCheck`. If you want to fix style issues automatically: `./gradlew spotlessApply`.
2. [Kotlin test](https://kotlinlang.org/api/latest/kotlin.test/): `./gradlew test`.
6. To just run the project execute: `./gradlew run`
7. Start coding!

## πŸ‘Œ Helpful resources

### Kotlin

* [Kotlin Coding Conventions](https://kotlinlang.org/docs/coding-conventions.html)
* [Comparison between Kotlin and Java](https://kotlinlang.org/docs/comparison-to-java.html)

### Kotlin test

* [Test code using JUnit in JVM - tutorial](https://kotlinlang.org/docs/jvm-test-using-junit.html)
* [JUnit5 assertions](https://junit.org/junit5/docs/5.0.1/api/org/junit/jupiter/api/Assertions.html)

## πŸ‘Œ Codely Code Quality Standards

Publishing this package we are committing ourselves to the following code quality standards:

- 🀝 Respect **Semantic Versioning**: No breaking changes in patch or minor versions
- 🀏 No surprises in transitive dependencies: Use the **bare minimum dependencies** needed to meet the purpose
- 🎯 **One specific purpose** to meet without having to carry a bunch of unnecessary other utilities
- βœ… **Tests** as documentation and usage examples
- πŸ“– **Well documented ReadMe** showing how to install and use
- βš–οΈ **License favoring Open Source** and collaboration

## πŸ”€ Related skeleton templates

Opinionated TypeScript skeletons ready for different purposes:

- [πŸ”·πŸŒ± TypeScript Basic Skeleton](https://github.com/CodelyTV/typescript-basic-skeleton)
- [πŸ”·πŸ•ΈοΈ TypeScript Web Skeleton](https://github.com/CodelyTV/typescript-web-skeleton)
- [πŸ”·πŸŒ TypeScript API Skeleton](https://github.com/CodelyTV/typescript-api-skeleton)
- [πŸ”·βœ¨ TypeScript DDD Skeleton](https://github.com/CodelyTV/typescript-ddd-skeleton)

This very same basic skeleton philosophy implemented in other programming languages:

- [✨ JavaScript Basic Skeleton](https://github.com/CodelyTV/javascript-basic-skeleton)
- [β˜• Java Basic Skeleton](https://github.com/CodelyTV/java-basic-skeleton)
- [πŸ“ Kotlin Basic Skeleton](https://github.com/CodelyTV/kotlin-basic-skeleton)
- [🧬 Scala Basic Skeleton](https://github.com/CodelyTV/scala-basic-skeleton)
- [🦈 C# Basic Skeleton](https://github.com/CodelyTV/csharp-basic-skeleton)
- [🐘 PHP Basic Skeleton](https://github.com/CodelyTV/php-basic-skeleton)