Skip to content

This repo is for showcasing how to build server in Kotlin using Ktor

License

Notifications You must be signed in to change notification settings

rooparsh/NotesApp

Repository files navigation

NotesApp

NotesApp is a project which demonstrates the power of Kotlin's Ktor in developing powerful REST APIs with all basic as well as advanced features.

Project is live at Heroku Link.

Status: 🚧 In progress 🚧

Requirements

  1. IntelliJ Idea

Architecture

Ktor Controller (http) -> Route (business) -> Repository (data)

Features

  1. Create Notes
  2. Update Notes
  3. Fetch Notes
  4. Delete Notes
  5. JWT Authentication
  6. Ktorm ORM for DB + Postgress
  7. Dependency Injection using Koin
  8. Automatic and easy deployment to Heroku

Coming soon -:

  1. Pagination
  2. Sorting results using parameters
  3. Unit Testing
  4. Middlewares for Validations
  5. Searching

Installation

Use IntelliJ IDEA, community or enterprise edition to open the project and follow these steps to run the Application.

Notes -: Customise the application.conf file. Fill your own secret, audience, issuer, realm to configure the JWT. Similarly,specify your port and host inside the application.conf file in which you want to run the server. Also mention you database connection string in key jdbc_db_url

You can use whatever db you are comfortable in MySql, Postgres.

Usage

Notes API

  1. Create a new note
POST http://host:port/note
Content-Type: application/json

{
  "note": "your-note",
}
  1. Fetch all notes
GET http://host:port/notes
  1. Fetch a particular note
GET http://host:port/notes/{id}
  1. Delete a particular note
DELETE http://host:port/notes/{id}
  1. Update a particular note
PUT http://host:port/notes/{id}

Onboarding

  1. Register
POST http://host:port/register
Content-Type: application/json

{
  "username": "username",
  "password": "password"
}
  1. Login
POST http://host:port/login
Content-Type: application/json

{
  "username": "username",
  "password": "password"
}

Multipart

  1. Open
GET http://host:port/open
  1. Download
GET http://host:port/download

Releases

No releases published

Packages

No packages published

Languages