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.
🚧
In progress
🚧
Status: Requirements
- IntelliJ Idea
Architecture
Ktor Controller (http) -> Route (business) -> Repository (data)
Features
- Create Notes
- Update Notes
- Fetch Notes
- Delete Notes
- JWT Authentication
- Ktorm ORM for DB + Postgress
- Dependency Injection using Koin
- Automatic and easy deployment to Heroku
Coming soon -:
- Pagination
- Sorting results using parameters
- Unit Testing
- Middlewares for Validations
- 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
-
Create a new note
POST http://host:port/note
Content-Type: application/json
{
"note": "your-note",
}
-
Fetch all notes
GET http://host:port/notes
-
Fetch a particular note
GET http://host:port/notes/{id}
-
Delete a particular note
DELETE http://host:port/notes/{id}
-
Update a particular note
PUT http://host:port/notes/{id}
Onboarding
-
Register
POST http://host:port/register
Content-Type: application/json
{
"username": "username",
"password": "password"
}
-
Login
POST http://host:port/login
Content-Type: application/json
{
"username": "username",
"password": "password"
}
Multipart
-
Open
GET http://host:port/open
-
Download
GET http://host:port/download