Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
da46e8a
Use SuspendApp (#68)
nomisRev Aug 18, 2022
62334d1
Update gradle/gradle-build-action action to v2.2.4 (#69)
renovate[bot] Aug 19, 2022
09450a0
Update gradle/gradle-build-action action to v2.2.5 (#70)
renovate[bot] Aug 21, 2022
386454c
Arrow 1.1.3 (#72)
nomisRev Sep 15, 2022
b8d072d
Update all dependencies (#71)
renovate[bot] Sep 19, 2022
a17884a
Update all dependencies to v1.1.3 (#73)
renovate[bot] Sep 21, 2022
b919a78
Update gradle/gradle-build-action action to v2.3.1 (#74)
renovate[bot] Sep 22, 2022
361dd35
Update actions/setup-java action to v3.5.1 (#75)
renovate[bot] Sep 26, 2022
0d77037
Update all dependencies (#76)
renovate[bot] Oct 4, 2022
9b9dac7
Update dependency org.testcontainers:postgresql to v1.17.5 (#77)
renovate[bot] Oct 5, 2022
c3369a2
Update all dependencies to v5.5.1 (#78)
renovate[bot] Oct 10, 2022
0ff2b36
Update dependency ch.qos.logback:logback-classic to v1.4.4 (#79)
renovate[bot] Oct 10, 2022
e776906
Update all dependencies (#80)
renovate[bot] Oct 14, 2022
1cde417
Update all dependencies (#81)
renovate[bot] Oct 18, 2022
b4001c4
Update actions/upload-artifact action to v3.1.1 (#82)
renovate[bot] Oct 22, 2022
24aa6e1
Update gradle/gradle-build-action action to v2.3.3 (#83)
renovate[bot] Oct 23, 2022
089b78f
Update all dependencies to v5.5.2 (#84)
renovate[bot] Oct 24, 2022
6657f88
Update all dependencies (#85)
renovate[bot] Oct 29, 2022
94dd909
Update plugin com.gradle.enterprise to v3.11.3 (#86)
renovate[bot] Oct 31, 2022
f2bd03e
Update all dependencies to v5.5.4 (#87)
renovate[bot] Nov 4, 2022
ac3b158
Update all dependencies (#88)
renovate[bot] Nov 8, 2022
1bba5d3
Add LICENSE (#90)
nomisRev Nov 10, 2022
6f3f94a
Re-add health endpoint
nomisRev Nov 14, 2022
78ecec1
Update dependency org.testcontainers:postgresql to v1.17.6 (#92)
renovate[bot] Nov 17, 2022
05f375b
Update dependency ch.qos.logback:logback-classic to v1.4.5 (#93)
renovate[bot] Nov 19, 2022
8d3941c
Update all dependencies (#94)
renovate[bot] Nov 21, 2022
ca6cd3a
Update all dependencies (#95)
renovate[bot] Nov 26, 2022
0d43ef0
Update all dependencies to v1.7.22 (#96)
renovate[bot] Nov 28, 2022
501bb32
Update all dependencies (#97)
renovate[bot] Dec 2, 2022
590d232
Update actions/setup-java action to v3.8.0 (#98)
renovate[bot] Dec 6, 2022
812b508
Update all dependencies (#99)
renovate[bot] Dec 8, 2022
ea97f59
Update actions/checkout action to v3.2.0 (#100)
renovate[bot] Dec 13, 2022
ad54e2b
Update actions/setup-java action to v3.9.0 (#101)
renovate[bot] Dec 14, 2022
aa9e027
Update plugin com.gradle.enterprise to v3.12.1 (#102)
renovate[bot] Dec 21, 2022
fd99985
Update dependency io.github.nefilim.kjwt:kjwt-core to v0.6.0 (#103)
renovate[bot] Dec 22, 2022
f88c733
Update all dependencies (#104)
renovate[bot] Jan 26, 2023
955d0cc
Update dependency io.arrow-kt:suspendapp to v0.4.0 (#105)
renovate[bot] Jan 26, 2023
3a64128
Update plugin com.gradle.enterprise to v3.12.3 (#106)
renovate[bot] Jan 30, 2023
89871ca
Update all dependencies (#107)
renovate[bot] Feb 1, 2023
3d99fc3
Update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v1.8.1…
renovate[bot] Feb 3, 2023
2f31291
Update dependency org.postgresql:postgresql to v42.5.3 (#109)
renovate[bot] Feb 3, 2023
701a65d
Update dependency io.kotest.multiplatform to v5.5.5 (#110)
renovate[bot] Feb 5, 2023
56b9381
Remove VERSION_CATALOGS
nomisRev Feb 18, 2023
c1a1634
Update dependency gradle to v8 (#112)
renovate[bot] Feb 19, 2023
5a8e967
Update with new libraries, and version. Add Cohort (#113)
nomisRev Feb 19, 2023
ec777e4
Fix and bump kjwt
nomisRev Feb 19, 2023
6713ad3
Update all dependencies (#111)
renovate[bot] Feb 19, 2023
efb9331
Update UserPersistence
nomisRev Feb 19, 2023
1e9ab11
Update dependency com.diffplug.spotless to v6.16.0 (#115)
renovate[bot] Feb 28, 2023
b6f9f5b
Update all dependencies to v2.2.4 (#116)
renovate[bot] Mar 2, 2023
82ed9d7
Update plugin com.gradle.enterprise to v3.12.4 (#117)
renovate[bot] Mar 2, 2023
dfa53a7
Update all dependencies (#118)
renovate[bot] Mar 4, 2023
d175cf1
Update dependency com.diffplug.spotless to v6.17.0 (#119)
renovate[bot] Mar 13, 2023
31fe20c
Update dependency ch.qos.logback:logback-classic to v1.4.6 (#120)
renovate[bot] Mar 15, 2023
7152e97
Update dependency org.postgresql:postgresql to v42.6.0 (#121)
renovate[bot] Mar 18, 2023
e114453
Remove DomainError.Unexpected (#122)
nomisRev Mar 20, 2023
67a8da7
Update all dependencies (#123)
renovate[bot] Mar 21, 2023
55b0de9
Update all dependencies to v1.1.6-alpha.63 (#124)
renovate[bot] Mar 22, 2023
0adb8be
Update all dependencies (#125)
renovate[bot] Mar 24, 2023
f7fd768
Update all dependencies to v1.1.6-alpha.70 (#126)
renovate[bot] Mar 25, 2023
2ec9919
Update all dependencies to v1.1.6-alpha.73 (#127)
renovate[bot] Mar 27, 2023
5bbc25c
Update all dependencies to v1.1.6-alpha.77 (#128)
renovate[bot] Mar 30, 2023
cbc08af
Update all dependencies (#129)
renovate[bot] Mar 31, 2023
a61e6eb
Update all dependencies to v1.3.1 (#130)
renovate[bot] Apr 1, 2023
3f1d055
Update all dependencies (#131)
renovate[bot] Apr 4, 2023
dbadf63
Update dependency com.diffplug.spotless to v6.18.0 (#133)
renovate[bot] Apr 6, 2023
708a417
Update all dependencies (#135)
renovate[bot] Apr 15, 2023
1a9bc97
Update all dependencies (#136)
renovate[bot] Apr 24, 2023
5557229
Update all dependencies to v1.8.21 (#137)
renovate[bot] Apr 25, 2023
9121315
Update dependency com.github.slugify:slugify to v3.0.4 (#138)
renovate[bot] Apr 26, 2023
9db3daf
Update all dependencies (#139)
renovate[bot] May 8, 2023
9ccb8c2
Update all dependencies to v2 (major) (#140)
renovate[bot] May 9, 2023
1f3ea19
Update plugin com.gradle.enterprise to v3.13.2 (#141)
renovate[bot] May 9, 2023
dfe7619
Update all dependencies to v2.0.2 (#142)
renovate[bot] May 10, 2023
e391636
Update all dependencies to v5.6.2 (#143)
renovate[bot] May 11, 2023
fccd433
Update dependency org.testcontainers:postgresql to v1.18.1 (#144)
renovate[bot] May 11, 2023
74471dd
Update all dependencies to v1.7.1 (#145)
renovate[bot] May 15, 2023
0f9ecf3
Update dependency org.jetbrains.kotlinx.kover to v0.7.0 (#146)
renovate[bot] May 17, 2023
62b0e1e
Update dependency io.kotest.extensions:kotest-extensions-testcontaine…
renovate[bot] Jun 19, 2023
7e324bd
Update deprecated code with either (#149)
yahorbarkouski Aug 28, 2023
324c11e
Expand login test suite (#150)
yahorbarkouski Aug 28, 2023
47dee26
Update all dependencies (#147)
renovate[bot] Aug 29, 2023
674aa2d
Fix IP, and spotless
nomisRev Sep 25, 2023
b82b935
Update all dependencies (#151)
renovate[bot] Sep 25, 2023
46ea817
Update README.MD
nomisRev Sep 25, 2023
2cdc90d
Update actions/checkout action to v4 (#152)
renovate[bot] Sep 25, 2023
27ce1aa
Add CONTRIBUTING.MD
nomisRev Sep 26, 2023
0102928
Update README.MD
nomisRev Sep 26, 2023
d2e2efe
Add suspend fun (#172)
nomisRev Sep 27, 2023
5916f13
Update dependency com.diffplug.spotless to v6.22.0 (#174)
renovate[bot] Sep 29, 2023
962b1b5
Update dependency org.testcontainers:postgresql to v1.19.1 (#175)
renovate[bot] Oct 3, 2023
03ffb1e
Update dependency gradle to v8.4 (#179)
renovate[bot] Oct 5, 2023
e17eb04
Get Tags #157 (#176)
arioston Oct 5, 2023
43faa11
Ktor: type safe routing (#178)
organize Oct 5, 2023
6daa478
Fix build
nomisRev Oct 5, 2023
1258fcf
Add /api/ prefix to routes (#182)
organize Oct 10, 2023
2eefe59
Update all dependencies (#180)
renovate[bot] Oct 11, 2023
c3cac16
Refactor validation functions to use Either instead of Validated (#177)
Alfhir Oct 12, 2023
1774d8e
Update dependency com.github.slugify:slugify to v3.0.6 (#185)
renovate[bot] Oct 12, 2023
654f6a2
Update all dependencies to v1.9.10 (#187)
renovate[bot] Oct 16, 2023
e5299f9
Get article by slug (#192)
javimartinez Oct 28, 2023
d505208
GET /articles/feed (#189)
Kaaveh Oct 29, 2023
55b2f7e
DELETE unfollow profile (#190)
pabloaguilarmartinez Oct 29, 2023
3bcb3db
Post article (#184)
arioston Nov 2, 2023
959092a
[fix] duplicate `Profile` (#195)
Kaaveh Nov 2, 2023
4c27ef8
Feature/get profile by username (#186)
MarinJuricev Nov 2, 2023
8f4d5a1
Fix build, and tests
nomisRev Nov 2, 2023
3fc2efb
Update all dependencies (#196)
renovate[bot] Nov 4, 2023
e436127
Update all dependencies to v2.3.6 (#197)
renovate[bot] Nov 7, 2023
2707b3e
Update all dependencies (#198)
renovate[bot] Nov 15, 2023
0bb8af6
POST follow profile (#194)
organize Nov 23, 2023
8f77c1d
Update all dependencies (#199)
renovate[bot] Nov 23, 2023
193b0ff
Refactor to kotlin.assert and power-assert: example (#191)
tibtof Nov 23, 2023
ab34429
Update actions/setup-java action to v4 (#201)
renovate[bot] Dec 6, 2023
b3d965f
Update github/codeql-action action to v3 (#203)
renovate[bot] Dec 14, 2023
cc5a98b
Update actions/upload-artifact action to v4 (#204)
renovate[bot] Dec 20, 2023
147b864
Update gradle/gradle-build-action action to v3 (#207)
renovate[bot] Jan 30, 2024
13a432c
Get articles comments (#206)
arioston Feb 17, 2025
920b609
Post article comment (#205)
arioston Feb 17, 2025
3cb0f26
Update all major versions (#209)
nomisRev Feb 17, 2025
7a9b70c
Update versions (#210)
nomisRev Mar 29, 2025
8f4679c
Implement missing routes (#211)
nomisRev Mar 29, 2025
2f248e7
Update dependency gradle to v8.13 (#200)
renovate[bot] Mar 29, 2025
5b81cb0
Update all dependencies (#212)
renovate[bot] May 13, 2025
de5e799
Initialize JetBrains Junie 🚀 (#214)
jetbrains-junie[bot] May 22, 2025
0c96638
Merge remote-tracking branch 'origin/main' into suspendapp-t
i-walker Sep 25, 2025
22a3420
fix issue and slightly address security issues in testcontainers in C…
i-walker Oct 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Java",
"image": "mcr.microsoft.com/devcontainers/java:1-21",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
"mavenVersion": "3.8.6",
"installGradle": "true"
}
}
}
22 changes: 22 additions & 0 deletions .github/workflows/junie.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Junie
run-name: Junie run ${{ inputs.run_id }}

permissions:
contents: write
pull-requests: write

on:
workflow_dispatch:
inputs:
run_id:
description: "id of workflow process"
required: true
workflow_params:
description: "stringified params"
required: true

jobs:
call-workflow-passing-data:
uses: jetbrains-junie/junie-workflows/.github/workflows/ej-issue.yml@main
with:
workflow_params: ${{ inputs.workflow_params }}
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: "build"

on: push
on: [push, pull_request]

env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx5g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"

jobs:
build:
runs-on: 'ubuntu-latest'

steps:
- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v3.4.1
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
java-version: 19

- name: Build
uses: gradle/gradle-build-action@v2.2.3
uses: gradle/gradle-build-action@v3
with:
arguments: build --full-stacktrace

- name: Upload reports
if: always()
uses: actions/upload-artifact@v3.1.0
uses: actions/upload-artifact@v4
with:
name: 'reports-${{ matrix.os }}'
path: '**/build/reports/**'

- name: Upload Code Scanning code analysis report
if: always()
uses: github/codeql-action/upload-sarif@v2
if: ${{ hashFiles('build/reports/detekt/main.sarif') != '' }}
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'build/reports/detekt/main.sarif'
54 changes: 54 additions & 0 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Contributing to Ktor Arrow Example

I want to encourage everyone to contribute to Ktor Arrow Example,
if you're unsure if you did everything correctly please just submit a PR, and ask for advice.
I'll be more than happy to help you out!

If you have any suggestions, or ideas feel free to open an issue or open a PR immediately.
I'm happy to receive any suggestions, or feedback and we can discuss on the issue or PR on how to procced.

## Implementing a new feature

All issues are end-to-end, meaning that when solving an issue you probably need to:
1. Add respective operation in the repository layer (repo package).
2. (optional) If operation is more complex than a single database operation, add service layer function that implements the operation
3. Add route that handles, and validates requests, and calls the respective service or repository layer function.
4. Writing a couple of tests that verify the correct behavior. See [writing tests](#writing-tests)

Step 2 is optional because I personally don't like unnecessary wrapping repository layer functions in a service layer.

## Writing tests

When writing tests we typically want to test more than the happy path. So ideally we test following scenarios:
- Check happy path
- Check with incorrect, or missing, query/path parameters
- Check different error responses, and/or not found responses.
- If route is authenticated: test what happens if unauthorised

## Creating new files

The project currently uses the traditional packaging by layer approach,
the app exists out of 3 _main_ layers:

- repo: All persistence layer code belongs here. 1 file/interface per table.
- service: All service layer code, this is code combining persistence layers in higher-level functionality
- routes: All Ktor routing belongs in this package. Files are split amongst their respective endpoint

## Formatting the project

The project uses Spotless and KtFmt for formatting the code.
To format the code simply run `./gradlew spotlessApply`, this is being checked and verified on GitHub Actions.

## Running the project

To run the project, you first need to start the environment.
This can be done with `docker-compose up`,
and then you can start the Ktor server with `./gradlew run`.

```shell
docker-compose up
./gradlew run
curl -i 0.0.0.0:8080/readiness
```

Beware that `./gradlew run` doesn't properly run JVM Shutdown hooks, and the port remains bound.
201 changes: 201 additions & 0 deletions LICENSE.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
29 changes: 22 additions & 7 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
# Ktor Arrow Real World Example

> While most "todo" demos provide an excellent cursory glance at a framework's capabilities, they typically don't convey the knowledge & perspective required to actually build real applications with it.
> While most "todo" demos provide an excellent cursory glance at a framework's capabilities, they typically don't convey
> the knowledge & perspective required to actually build real applications with it.

*Read the [full blog post announcing RealWorld on Medium.](https://medium.com/@ericsimons/introducing-realworld-6016654d36b5)*
*Read
the [full blog post announcing RealWorld on Medium.](https://medium.com/@ericsimons/introducing-realworld-6016654d36b5)*

Over 100 implementations have been created using various languages, libraries, and frameworks.

Explore them on [**CodebaseShow**](https://codebase.show/projects/realworld).

In order for Real World back-end and front-end examples to be able to work together we need to follow a predefined [openapi.yml](https://github.com/gothinkster/realworld/blob/main/api/openapi.yml).
In order for Real World back-end and front-end examples to be able to work together we need to follow a
predefined [openapi.yml](https://github.com/gothinkster/realworld/blob/main/api/openapi.yml).

## Looking to contribute?

If you're looking to contribute check-out [CONTRIBUTING.MD](CONTRIBUTING.MD).
Also, this project participates in hacktoberfest!

I will provide personal guidance, and support to everyone that is interested in learning about Ktor, Arrow and Kotlin by
contributing to this repository!

## How it works

This example uses [Kotlin](https://kotlinlang.org/docs/home.html) with [Ktor](https://ktor.io/) and [Arrow](https://arrow-kt.io/) as the main building blocks.
This example uses [Kotlin](https://kotlinlang.org/docs/home.html) with [Ktor](https://ktor.io/)
and [Arrow](https://arrow-kt.io/) as the main building blocks.
Other technologies used:
- [SqlDelight](https://cashapp.github.io/sqldelight/) for the persistence layer
- [Kotest](https://kotest.io/) for testing

- [SqlDelight](https://cashapp.github.io/sqldelight/) for the persistence layer
- [Kotest](https://kotest.io/) for testing

## Running the project

Expand All @@ -26,5 +39,7 @@ and then you can start the Ktor server with `./gradlew run`.
```shell
docker-compose up
./gradlew run
curl 0.0.0.0:8080/health
curl -i 0.0.0.0:8080/readiness
```

Beware that `./gradlew run` doesn't properly run JVM Shutdown hooks, and the port remains bound.
Loading
Loading