A Modern Kotlin-Ktor RESTful API example. Connects to a PostgreSQL database and uses Exposed framework for database operations.

Overview

kotlin-ktor-rest-api

A Modern Kotlin-Ktor RESTful API example. Connects to a PostgreSQL database and uses Exposed framework for database operations. Focused on Clean Architecture, SOLID Principles and feautre based development.

  • Ktor Framework
  • Kotlin
  • Dependency Injection -> Koin
  • Authorization -> JWT
  • Database -> PostgreSQL
  • ORM SQL Framework -> Exposed
  • Ktor Client -> For External API calls
  • Build Tool -> Gradle
  • Server -> Tomcat

Architecture

github (6)

Database Creditentials

resources/application.conf

    database {
        exampleDatabaseUrl="jdbc:postgresql://localhost:5432/exampleDatabase"
        exampleDatabaseDriver="org.postgresql.Driver"
        exampleDatabaseUser="postgres"
        exampleDatabasePassword="Test1234"
    }

Features

- Health Check

GET /healthCheck/
  Just returns a simple object

- Authentication

POST /createUser/
  Registers a user to the db
POST /login/
  Returns a jwt token if success
GET /userInfo/ (Needs Authroization token from login as Authorization header)
  Return user information

- Star Wars

GET /movie/
  An External API call example. Returns a movie information from an external api

You might also like...
ExposedDropdownMenu - Android Exposed Dropdown Menus
ExposedDropdownMenu - Android Exposed Dropdown Menus

Exposed Dropdown Menu Exposed dropdown menus display the currently selected menu

Microservices-demo - Microservices demo project using Spring, Kotlin, RabbitMQ, PostgreSQL and Gradle and deployed to Azure Kubernetes
Starter project to create a simple RESTful web service in Kotlin

Modified: Adding Koin for DI Using JWT for authentication and authorization Dropping proprietary FlyAway tool Single Page Application support Starter

Android Note app that uses the "ktor-note-app" backend

KtorNoteApp Android Notes app that uses Ktor back end server Technologies employed: Kotlin MVVM Coroutines Custom REST API build with Ktor Responds to

A Certificate Authority with RESTful interface and WEB UI
A Certificate Authority with RESTful interface and WEB UI

minica A Certificate Authority with RESTful interface and WEB UI Home page View CA detail View Cert Detail With RESTful interface, you can manage cert

Demo Spting REST Service on Kotlin. Works with PostgreSQL via Spring Data. Data initialization provided by liquibase

Spring Boot REST API with Kotlin Spring Boot REST API service. Spring Data with PostgreSQL. Data initialization with Liquibase. Swagger UI Reference D

Spring-with-maven - Spring Boot App with Postgresql and maven

Spring Boot Api Aplikasi ini dibuat menggunakan bahasa kotlin dan untuk database

Restful Toolkit for IntelliJ IDEA

restful-toolkit Template ToDo list Create a new IntelliJ Platform Plugin Template project. Get known with the template documentation. Verify the plugi

Test tv - A marketing company needs a simple pluggable application with a RESTful interface

Demo project A marketing company needs a simple pluggable application with a RES

Owner
Selim Atasoy
Senior Software Engineer (Android)
Selim Atasoy
Kotlin backend based on the Clean Architecture principles. Ktor, JWT, Exposed, Flyway, KGraphQL/GraphQL generated endpoints, Gradle.

Kotlin Clean Architecture Backend Kotlin backend based on the Clean Architecture principles. The application is separated into three modules: Domain,

null 255 Jan 3, 2023
The Okila server project uses the Spring boot framework and uses the Kotlin language

Okila-Server The Okila server project uses the Spring boot framework and uses the Kotlin language Format Response //The response successfully format

Nankai 1 Oct 25, 2021
Spring-kotlin - Learning API Rest with Kotlin, Spring and PostgreSQL

Kotlin, Spring, PostgreSQL and Liquibase Database Migrations Learning Kotlin for

Andre L S Ferreira 2 Feb 14, 2022
Integration Testing Kotlin Multiplatform Kata for Kotlin Developers. The main goal is to practice integration testing using Ktor and Ktor Client Mock

This kata is a Kotlin multiplatform version of the kata KataTODOApiClientKotlin of Karumi. We are here to practice integration testing using HTTP stub

Jorge Sánchez Fernández 29 Oct 3, 2022
🌱 A test implementation of a Minecraft server using RESTful API taking advantage of the interoperability between Kotlin and Java.

?? Norin A test implementation of a Minecraft server using RESTful API taking advantage of the interoperability between Kotlin and Java. This project

Gabriel 1 Jan 4, 2022
Cargo service: REST API, Spring Boot, Kotlin, JDBC, PostgreSQL

cargo-jdbc Cargo service, training project with Spring Boot, JDBC and Kotlin. To

Valeriy Emelyanov 1 Dec 7, 2022
Simple Todo list API using Spring-Boot, Webflux, Kotlin, Coroutines, & PostgreSQL

Simple Todo list API using Spring-Boot, Webflux, Kotlin, Coroutines, & PostgreSQL

Sami Eljabali 9 Jul 26, 2022
AppToDo is a simple Android project that performs the basic database CRUD operations that creates a todo task list

AppToDo is a simple Android project that performs the basic database CRUD operations that creates a todo task list

Rafiul Hye 1 Mar 13, 2022
KTor-Client---Android - The essence of KTor Client for network calls

KTor Client - Android This project encompasses the essence of KTor Client for ne

Mansoor Nisar 2 Jan 18, 2022
🍓CookHelper - food social network. The Api and Websocket are based on Ktor framework. Dependency injection with Koin library.

CookHelper [ ?? Work in Progress ?? ] CookHelper is a cross-platform application that will allow you to cook a delicious dish from an existing recipe

Arthur 11 Nov 9, 2022