{"id":14977543,"url":"https://github.com/learningbyexample/kotlinreactivems","last_synced_at":"2026-02-28T06:54:38.731Z","repository":{"id":150632344,"uuid":"92105897","full_name":"LearningByExample/KotlinReactiveMS","owner":"LearningByExample","description":"An educational project to learn reactive programming with Spring 5 and Kotlin","archived":false,"fork":false,"pushed_at":"2018-03-26T12:22:08.000Z","size":573,"stargazers_count":33,"open_issues_count":0,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-01T11:24:43.816Z","etag":null,"topics":["api-rest","apis","flow","java","kotlin","microservices","reactive","reactive-microservices","reactive-programming","reactive-streams","reactor","spring","spring-boot","spring-framework","spring-reactive","spring-webflux","spring5","webflux"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LearningByExample.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-22T22:46:12.000Z","updated_at":"2025-01-03T21:46:10.000Z","dependencies_parsed_at":"2023-05-20T20:00:46.345Z","dependency_job_id":null,"html_url":"https://github.com/LearningByExample/KotlinReactiveMS","commit_stats":{"total_commits":88,"total_committers":1,"mean_commits":88.0,"dds":0.0,"last_synced_commit":"05acfe82f670d9a9aa31206ba4c6b3cffa506b9d"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LearningByExample%2FKotlinReactiveMS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LearningByExample%2FKotlinReactiveMS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LearningByExample%2FKotlinReactiveMS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LearningByExample%2FKotlinReactiveMS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LearningByExample","download_url":"https://codeload.github.com/LearningByExample/KotlinReactiveMS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238597386,"owners_count":19498396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-rest","apis","flow","java","kotlin","microservices","reactive","reactive-microservices","reactive-programming","reactive-streams","reactor","spring","spring-boot","spring-framework","spring-reactive","spring-webflux","spring5","webflux"],"created_at":"2024-09-24T13:55:51.122Z","updated_at":"2025-10-28T04:31:29.835Z","avatar_url":"https://github.com/LearningByExample.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Kotlin Reactive Micro Services Example\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](/LICENSE)\n[![Build Status](https://travis-ci.org/LearningByExample/KotlinReactiveMS.svg?branch=master)](https://travis-ci.org/LearningByExample/KotlinReactiveMS)\n[![codecov](https://codecov.io/gh/LearningByExample/KotlinReactiveMS/branch/master/graph/badge.svg)](https://codecov.io/gh/LearningByExample/KotlinReactiveMS)\n[![codebeat badge](https://codebeat.co/badges/de19292d-7dbf-49fd-b261-fb07b8522d3d)](https://codebeat.co/projects/github-com-learningbyexample-kotlinreactivems-master)\n\n_IntelliJ code coverage runner gives a 100%, unfortunately I've not managed to get the same results using codecov.io and JaCoCo_\n\n## info\nThis is an example of doing reactive MicroServices using spring 5 functional web framework and spring boot 2 using Kotlin.\n\nThis is a fork of the [original java version](https://github.com/LearningByExample/reactive-ms-example).\n\nThis service provide and API that will get the geo location and the sunrise and sunset times from an address.\n\n```Gherkin\nScenario: Get Location\n  Given I've an address\n  When I call the location service\n  Then I should get a geo location\n  And I should get the sunrise and sunset times\n```\nTo implement this example we consume a couple of REST APIs.\n\nThis example cover several topics: \n\n- Functional programing.\n- Reactive types.\n- Router Functions.\n- Static Web-Content.\n- Creation on Reactive Java Services/Components.\n- Error handling in routes and services.\n- Reactive Web Client to consume external REST Services.\n- Organizing your project in manageable packaging.\n\nIncludes and in depth look to testing using JUnit5:\n- Unit, Integration and System tests.\n- Mocking, including reactive functions and JSON responses.\n- BDD style assertions.\n- Test tags with maven profiles.\n\n## Sample requests\n\nGet from address\n```shell\n$ curl -X GET \"http://localhost:8080/api/location/Trafalgar%20Square%2C%20London%2C%20England\" -H  \"accept: application/json\"\n```\n\nPost from JSON\n```shell\n$ curl -X POST \"http://localhost:8080/api/location\" -H  \"accept: application/json\" -H  \"content-type: application/json\" -d \"{  \\\"address\\\": \\\"Trafalgar Square, London, England\\\"}\"\n```\n\nBoth will produce something like:\n```json\n{\n  \"geographicCoordinates\": {\n    \"latitude\": 51.508039,\n    \"longitude\": -0.128069\n  },\n  \"sunriseSunset\": {\n    \"sunrise\": \"2017-05-21T03:59:08+00:00\",\n    \"sunset\": \"2017-05-21T19:55:11+00:00\"\n  }\n}\n```\n_All date and times are ISO 8601 UTC without summer time adjustment_\n\n## API\n[![View in the embedded Swagger UI](https://avatars0.githubusercontent.com/u/7658037?v=3\u0026s=20) View in the embedded Swagger UI](http://localhost:8080/index.html)\n\n[![Run in Postman](https://lh4.googleusercontent.com/Dfqo9J42K7-xRvHW3GVpTU7YCa_zpy3kEDSIlKjpd2RAvVlNfZe5pn8Swaa4TgCWNTuOJOAfwWY=s20) Run in Postman](https://app.getpostman.com/run-collection/498aea143dc572212f17)\n\n## Project Structure\n\n- [main/kotlin](/src/main/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS)\n    - [/application](/src/main/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/application) : Main Spring boot application and context configuration.  \n    - [/extensions](/src/main/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/extensions) : Custom kotlin extensions and high level functions.\n    - [/routers](/src/main/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/routers) : Reactive routing functions.\n    - [/handlers](/src/main/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/handlers) : Handlers used by the routers.\n    - [/services](/src/main/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/services) : Services for the business logic needed by handlers.\n    - [/exceptions](/src/main/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/exceptions) : Businesses exceptions.\n    - [/model](/src/main/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/model) : Data classes.\n- [test/kotlin](/src/test/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS)\n    - [/application](/src/test/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/application) : Application system and unit tests.\n    - [/extensions](/src/test/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/extensions) : Extensions unit tests.\n    - [/routers](/src/test/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/routers) : Integration tests for routes.\n    - [/handlers](/src/test/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/handlers) : Unit tests for handlers.\n    - [/services](/src/test/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/services) : Unit tests for services.\n    - [/test](/src/test/kotlin/org/learning/by/example/reactive/kotlin/microservices/KotlinReactiveMS/test) : Helpers and base classes for testing.\n\n\n## References\n- https://github.com/LearningByExample/reactive-ms-example\n- https://github.com/aesteve/todobackend-springboot2","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearningbyexample%2Fkotlinreactivems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flearningbyexample%2Fkotlinreactivems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearningbyexample%2Fkotlinreactivems/lists"}