All Projects → Rudge → kotlin-ktor-realworld-example-app

Rudge / kotlin-ktor-realworld-example-app

Licence: MIT license
Real world backend API built in Kotlin with Ktor + Kodein + Exposed

Programming Languages

kotlin
9241 projects
shell
77523 projects

Projects that are alternatives of or similar to kotlin-ktor-realworld-example-app

ktor-hexagonal-benchmark
a experimental ktor application using hexagonal architecture
Stars: ✭ 32 (-72.65%)
Mutual labels:  exposed, ktor
Kodein Di
Painless Kotlin Dependency Injection
Stars: ✭ 2,692 (+2200.85%)
Mutual labels:  kodein, ktor
kmpapp
👨‍💻 Kotlin Mobile Multiplatform App (Android & iOS). One Code To Rule Them All. MVVM, DI (Kodein), coroutines, livedata, ktor, serialization, mockk, detekt, ktlint, jacoco
Stars: ✭ 34 (-70.94%)
Mutual labels:  kodein, ktor
CleanArchitecture
Kotlin backend based on the Clean Architecture principles. Ktor, JWT, Exposed, Flyway, OpenAPI/REST & KGraphQL/GraphQL generated endpoints, Gradle.
Stars: ✭ 271 (+131.62%)
Mutual labels:  exposed, ktor
Lastik
Kotlin Multiplatform + Jetpack Compose pet project, based on www.last.fm/api (in development)
Stars: ✭ 37 (-68.38%)
Mutual labels:  kodein, ktor
exposed-ktor-jwt
example of an exposed+ktor+jwt secured kotlin app sporting an angular frontend
Stars: ✭ 21 (-82.05%)
Mutual labels:  exposed, ktor
tv-maniac
Tv-Maniac is a Multiplatform app (Android & iOS) for viewing TV Shows from TMDB.
Stars: ✭ 55 (-52.99%)
Mutual labels:  ktor
Ktor-OpenAPI-Generator
Ktor OpenAPI/Swagger 3 Generator
Stars: ✭ 203 (+73.5%)
Mutual labels:  ktor
heterogeneous-microservices
Implementation of the same simple microservice on different frameworks
Stars: ✭ 43 (-63.25%)
Mutual labels:  ktor
Kodein-Log
Multiplatform lightweight logging library.
Stars: ✭ 25 (-78.63%)
Mutual labels:  kodein
kmm
Rick & Morty Kotlin Multiplatform Mobile: Ktor, Sqldelight, Koin, Flow, MVI, SwiftUI, Compose
Stars: ✭ 52 (-55.56%)
Mutual labels:  ktor
go-realworld-example-app
Exemplary real world application built with Go, Gin, and go-pg
Stars: ✭ 48 (-58.97%)
Mutual labels:  realworld-backend
kotlin-oauth2-server
Flexible OAuth2 server library. Support for multiple frameworks
Stars: ✭ 123 (+5.13%)
Mutual labels:  ktor
ComposeTodo
Sample project to play with Jetpack Compose on Android, Desktop and Web
Stars: ✭ 64 (-45.3%)
Mutual labels:  ktor
Sunset-hadith
Islamic app written with Kotlin, using KTOR + coroutines + flow + MVVM + Android Jetpack + Navigation component. Old version using RxJava + Retrofit + OKHttp
Stars: ✭ 26 (-77.78%)
Mutual labels:  ktor
JavaneseBackend
Javanese.online website back-end
Stars: ✭ 31 (-73.5%)
Mutual labels:  ktor
ktor-API-examples
Examples with ktor to create an API REST
Stars: ✭ 23 (-80.34%)
Mutual labels:  ktor
truthy
Open source headless CMS API written using NestJS, that has pre built modules like User Management, Role Management, Permission Management, Email Module, Account Settings, OTP, Throttling, RBAC support, Localization, and many more.
Stars: ✭ 200 (+70.94%)
Mutual labels:  realworld-backend
kotlin-ktor-mysql-template
This example shows how to run Anychart library with Kotlin and MySQL.
Stars: ✭ 20 (-82.91%)
Mutual labels:  ktor
golang-echo-realworld-example-app
Exemplary real world backend API built with Golang + Echo
Stars: ✭ 403 (+244.44%)
Mutual labels:  realworld-backend

Travis Codacy Badge BCH compliance

RealWorld Example App

Kotlin + Ktor codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API

RealWorld

This codebase was created to demonstrate a fully fledged fullstack application built with Kotlin + Ktor + Kodein + Exposed including CRUD operations, authentication, routing, pagination, and more.

We've gone to great lengths to adhere to the Kotlin + Ktor community styleguides & best practices.

For more information on how to this works with other frontends/backends, head over to the RealWorld repo.

How it works

The application was built with:

  • Kotlin as programming language
  • Ktor as web framework
  • Kodein as dependency injection framework
  • Jackson as data bind serialization/deserialization
  • Java-jwt for JWT spec implementation
  • HikariCP as datasource to abstract driver implementation
  • H2 as database
  • Exposed as Sql framework to persistence layer
  • slugify

Tests:

Structure

  + config/
      All app setups. Ktor, Kodein and Database
  + domain/
    + repository/
        Persistence layer and tables definition
    + service/
        Logic layer and transformation data
  + ext/
      Extension of String for email validation
  + utils/
      Jwt and Encrypt classes
  + web/
    + controllers
        Classes and methods to mapping actions of routes
    Router definition to features and exceptions
  - App.kt <- The main class

Getting started

You need just JVM installed.

The server is configured to start on 8080.

Build:

./gradlew clean build

Start the server:

./gradlew run

In the project have the spec-api with the README and collections to execute backend tests specs realworld.

Execute tests and start the server:

./gradlew run & APIURL=http://localhost:8080 ./spec-api/run-api-tests.sh

Help

Please fork and PR to improve the code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].