You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> ### Kotlin + Javalin codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the [RealWorld](https://github.com/gothinkster/realworld) spec and API.
8
-
7
+
> ### Kotlin + Javalin codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the [RealWorld](https://github.com/gothinkster/realworld) spec and API
This codebase was created to demonstrate a fully fledged fullstack application built with **Kotlin + Javalin + Koin + Exposed** including CRUD operations, authentication, routing, pagination, and more.
14
12
15
13
We've gone to great lengths to adhere to the **Kotlin + Javalin** community styleguides & best practices.
16
14
17
15
For more information on how to this works with other frontends/backends, head over to the [RealWorld](https://github.com/gothinkster/realworld) repo.
18
16
19
-
20
17
# How it works
21
18
22
19
The application was made mainly to demo the functionality of Javalin framework [71](https://github.com/tipsy/javalin/issues/71).
23
20
24
21
The application was built with:
25
22
26
-
-[Kotlin](https://github.com/JetBrains/kotlin) as programming language
27
-
-[Javalin](https://github.com/tipsy/javalin) as web framework
28
-
-[Koin](https://github.com/InsertKoinIO/koin) as dependency injection framework
29
-
-[Jackson](https://github.com/FasterXML/jackson-module-kotlin) as data bind serialization/deserialization
30
-
-[Java-jwt](https://github.com/auth0/java-jwt) for JWT spec implementation
31
-
-[HikariCP](https://github.com/brettwooldridge/HikariCP) as datasource to abstract driver implementation
32
-
-[H2](https://github.com/h2database/h2database) as database
33
-
-[Exposed](https://github.com/JetBrains/Exposed) as Sql framework to persistence layer
34
-
-[slugify](https://github.com/slugify/slugify)
23
+
-[Kotlin](https://github.com/JetBrains/kotlin) as programming language
24
+
-[Javalin](https://github.com/tipsy/javalin) as web framework
25
+
-[Koin](https://github.com/InsertKoinIO/koin) as dependency injection framework
26
+
-[Jackson](https://github.com/FasterXML/jackson-module-kotlin) as data bind serialization/deserialization
27
+
-[Java-jwt](https://github.com/auth0/java-jwt) for JWT spec implementation
28
+
-[HikariCP](https://github.com/brettwooldridge/HikariCP) as datasource to abstract driver implementation
29
+
-[H2](https://github.com/h2database/h2database) as database
30
+
-[Exposed](https://github.com/JetBrains/Exposed) as Sql framework to persistence layer
31
+
-[slugify](https://github.com/slugify/slugify)
35
32
36
33
Tests:
37
34
38
-
-[junit](https://github.com/junit-team/junit4)
39
-
-[Unirest](https://github.com/Kong/unirest-java) to call endpoints in tests
35
+
-[junit](https://github.com/junit-team/junit4)
36
+
-[Unirest](https://github.com/Kong/unirest-java) to call endpoints in tests
40
37
41
-
42
-
#### Layers:
38
+
#### Structure
43
39
+ config/
44
40
All app setups. Javalin, Koin and Database
45
41
+ domain/
@@ -57,7 +53,7 @@ Tests:
57
53
Router definition to features and exceptions
58
54
- App.kt <- The main class
59
55
60
-
# Database
56
+
####Database
61
57
62
58
It uses a H2 in memory database (for now), can be changed easily in the `koin.properties` for any other database.
63
59
You'll need to add the correct dependency for the needed `Driver` in `build.gradle`.
@@ -72,15 +68,14 @@ Build:
72
68
> ./gradlew clean build
73
69
74
70
Start the server:
75
-
>./gradlew run
76
-
71
+
> ./gradlew run
77
72
78
73
In the project have the [spec-api](https://github.com/Rudge/kotlin-javalin-realworld-example-app/tree/master/spec-api) with the README and collections to execute backend tests specs [realworld](https://github.com/gothinkster/realworld).
79
74
80
75
Execute tests and start the server:
81
-
>./gradlew run & APIURL=http://localhost:7000/api ./spec-api/run-api-tests.sh
82
76
83
-
# Help
77
+
> ./gradlew run & APIURL=http://localhost:7000/api ./spec-api/run-api-tests.sh
0 commit comments