Skip to content

Repository files navigation

KtorTaskBackend

A RESTful Task Management Backend built with Kotlin and Ktor. This project demonstrates CRUD (Create, Read, Update, Delete) operations using JSON serialization and in-memory data storage.

🚀 Features

  • Create Task
  • Retrieve All Tasks
  • Update Existing Task
  • Delete Task
  • RESTful API
  • JSON Serialization
  • In-Memory Storage

🛠 Tech Stack

  • Kotlin
  • Ktor
  • Netty
  • Kotlinx Serialization
  • Gradle

📌 API Endpoints

Method Endpoint Description
GET /task Get all tasks
POST /task Create a task
PUT /task/{id} Update a task
DELETE /task/{id} Delete a task

📤 Sample Request

POST /task

{
  "name": "Learn Ktor",
  "description": "Build a REST API",
  "priority": "HIGH"
}

Response

{
  "id": 1,
  "name": "Learn Ktor",
  "description": "Build a REST API",
  "priority": "HIGH"
}

▶️ Run Locally

Clone the repository:

git clone https://github.com/rudram837/KtorTaskBackend.git

Move into the project directory:

cd KtorTaskBackend

Run the application:

./gradlew run

Server URL:

http://localhost:8088

🧪 Tested Using

  • Postman
  • Browser

📈 Future Improvements

  • Database Integration (MySQL/PostgreSQL)
  • JWT Authentication
  • Request Validation
  • Global Exception Handling
  • Unit Testing

Author

👤 Rudra Maurya

About

A RESTful Task Management API built with Kotlin and Ktor, featuring CRUD operations, JSON serialization, and clean backend architecture.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages