├── .cursorrules ├── .editorconfig ├── .gitignore ├── Procfile ├── README.md ├── docs ├── build.png ├── create_grant_user.png ├── createdb.png ├── generate_openapi.png ├── heroku_add_addons.png ├── heroku_config.png ├── heroku_connect_to_github.png ├── heroku_create.png ├── heroku_deploy.png ├── heroku_deploy_again.png ├── heroku_live.png ├── heroku_logs.png ├── ktor.png ├── postman_auth.png ├── postman_error.png ├── postman_get_api_key.png ├── postman_import.png ├── postman_login.png ├── postman_new_env.png ├── postman_register.png ├── psql.png ├── run.png ├── server1.png ├── server2.png └── view_table.png ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── nohup.out ├── settings.gradle.kts ├── src └── main │ ├── kotlin │ └── com │ │ └── example │ │ ├── Application.kt │ │ ├── apikey │ │ ├── ApiKey.kt │ │ └── ApiKeyRepository.kt │ │ ├── common │ │ ├── config │ │ │ ├── DatabaseConfig.kt │ │ │ └── JwtConfig.kt │ │ ├── exceptions │ │ │ └── CustomExceptions.kt │ │ └── utils │ │ │ ├── ErrorResponse.kt │ │ │ └── ImageUploadService.kt │ │ ├── dictionary │ │ ├── DictionaryEntry.kt │ │ ├── DictionaryRepository.kt │ │ ├── DictionaryRoutes.kt │ │ └── DictionaryService.kt │ │ ├── quotes │ │ ├── Quote.kt │ │ ├── QuoteRepository.kt │ │ ├── QuoteRoutes.kt │ │ └── QuoteService.kt │ │ └── user │ │ ├── AuthRoutes.kt │ │ ├── User.kt │ │ ├── UserRepository.kt │ │ └── UserService.kt │ └── resources │ ├── application.yaml │ ├── db │ └── migration │ │ ├── V1__Create_initial_tables.sql │ │ ├── V2__Add_resources_to_dictionary_entries.sql │ │ ├── V3__Create_api_keys_table.sql │ │ ├── V4__Remove_fields_from_quotes.sql │ │ └── V5__Insert_dictionary_entries.sql │ ├── dictionary_entries.json │ ├── logback.xml │ └── openapi │ └── documentation.yaml └── system.properties /.cursorrules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/.cursorrules -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/.editorconfig -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/.gitignore -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/Procfile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/README.md -------------------------------------------------------------------------------- /docs/build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/build.png -------------------------------------------------------------------------------- /docs/create_grant_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/create_grant_user.png -------------------------------------------------------------------------------- /docs/createdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/createdb.png -------------------------------------------------------------------------------- /docs/generate_openapi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/generate_openapi.png -------------------------------------------------------------------------------- /docs/heroku_add_addons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/heroku_add_addons.png -------------------------------------------------------------------------------- /docs/heroku_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/heroku_config.png -------------------------------------------------------------------------------- /docs/heroku_connect_to_github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/heroku_connect_to_github.png -------------------------------------------------------------------------------- /docs/heroku_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/heroku_create.png -------------------------------------------------------------------------------- /docs/heroku_deploy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/heroku_deploy.png -------------------------------------------------------------------------------- /docs/heroku_deploy_again.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/heroku_deploy_again.png -------------------------------------------------------------------------------- /docs/heroku_live.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/heroku_live.png -------------------------------------------------------------------------------- /docs/heroku_logs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/heroku_logs.png -------------------------------------------------------------------------------- /docs/ktor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/ktor.png -------------------------------------------------------------------------------- /docs/postman_auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/postman_auth.png -------------------------------------------------------------------------------- /docs/postman_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/postman_error.png -------------------------------------------------------------------------------- /docs/postman_get_api_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/postman_get_api_key.png -------------------------------------------------------------------------------- /docs/postman_import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/postman_import.png -------------------------------------------------------------------------------- /docs/postman_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/postman_login.png -------------------------------------------------------------------------------- /docs/postman_new_env.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/postman_new_env.png -------------------------------------------------------------------------------- /docs/postman_register.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/postman_register.png -------------------------------------------------------------------------------- /docs/psql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/psql.png -------------------------------------------------------------------------------- /docs/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/run.png -------------------------------------------------------------------------------- /docs/server1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/server1.png -------------------------------------------------------------------------------- /docs/server2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/server2.png -------------------------------------------------------------------------------- /docs/view_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/docs/view_table.png -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | kotlin.code.style=official 2 | -------------------------------------------------------------------------------- /gradle/libs.versions.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/gradle/libs.versions.toml -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/gradle/wrapper/gradle-wrapper.properties -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/gradlew -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/gradlew.bat -------------------------------------------------------------------------------- /nohup.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/nohup.out -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/settings.gradle.kts -------------------------------------------------------------------------------- /src/main/kotlin/com/example/Application.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/Application.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/apikey/ApiKey.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/apikey/ApiKey.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/apikey/ApiKeyRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/apikey/ApiKeyRepository.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/common/config/DatabaseConfig.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/common/config/DatabaseConfig.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/common/config/JwtConfig.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/common/config/JwtConfig.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/common/exceptions/CustomExceptions.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/common/exceptions/CustomExceptions.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/common/utils/ErrorResponse.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/common/utils/ErrorResponse.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/common/utils/ImageUploadService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/common/utils/ImageUploadService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/dictionary/DictionaryEntry.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/dictionary/DictionaryEntry.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/dictionary/DictionaryRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/dictionary/DictionaryRepository.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/dictionary/DictionaryRoutes.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/dictionary/DictionaryRoutes.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/dictionary/DictionaryService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/dictionary/DictionaryService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/quotes/Quote.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/quotes/Quote.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/quotes/QuoteRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/quotes/QuoteRepository.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/quotes/QuoteRoutes.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/quotes/QuoteRoutes.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/quotes/QuoteService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/quotes/QuoteService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/user/AuthRoutes.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/user/AuthRoutes.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/user/User.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/user/User.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/user/UserRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/user/UserRepository.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/example/user/UserService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/kotlin/com/example/user/UserService.kt -------------------------------------------------------------------------------- /src/main/resources/application.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/resources/application.yaml -------------------------------------------------------------------------------- /src/main/resources/db/migration/V1__Create_initial_tables.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/resources/db/migration/V1__Create_initial_tables.sql -------------------------------------------------------------------------------- /src/main/resources/db/migration/V2__Add_resources_to_dictionary_entries.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE dictionary_entries ADD COLUMN resources TEXT; -------------------------------------------------------------------------------- /src/main/resources/db/migration/V3__Create_api_keys_table.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/resources/db/migration/V3__Create_api_keys_table.sql -------------------------------------------------------------------------------- /src/main/resources/db/migration/V4__Remove_fields_from_quotes.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/resources/db/migration/V4__Remove_fields_from_quotes.sql -------------------------------------------------------------------------------- /src/main/resources/db/migration/V5__Insert_dictionary_entries.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/resources/db/migration/V5__Insert_dictionary_entries.sql -------------------------------------------------------------------------------- /src/main/resources/dictionary_entries.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/resources/dictionary_entries.json -------------------------------------------------------------------------------- /src/main/resources/logback.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/resources/logback.xml -------------------------------------------------------------------------------- /src/main/resources/openapi/documentation.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/androiddevnotes/ktor-demo-api-server/HEAD/src/main/resources/openapi/documentation.yaml -------------------------------------------------------------------------------- /system.properties: -------------------------------------------------------------------------------- 1 | java.runtime.version=17 --------------------------------------------------------------------------------