Kotlin Android Backend

Kotlin

Full-stack Kotlin application with Android frontend and Spring Boot backend

Tech Stack

Kotlin 2.0
Spring Boot
Android 14
Gradle
Room DB

Features

Android frontend
Spring Boot backend
Coroutines for async
Kotlin DSL
REST API layer
Room persistence

Code Sample

UserController.kt
@RestController
@RequestMapping("/api/users")
class UserController(private val userService: UserService) {

    @GetMapping
    suspend fun getAll(): List<UserDto> =
        userService.findAll()

    @PostMapping
    suspend fun create(@RequestBody request: CreateUserRequest): UserDto =
        userService.create(request)

    @GetMapping("/{id}")
    suspend fun getById(@PathVariable id: Long): UserDto =
        userService.findById(id)

    @PutMapping("/{id}")
    suspend fun update(
        @PathVariable id: Long,
        @RequestBody request: UpdateUserRequest
    ): UserDto = userService.update(id, request)
}
View Source Docker Hub Live Demo