Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bog-walk/self-quest
:books: Desktop study quiz generator built with Compose for Desktop, backed by Ktor & Exposed.
https://github.com/bog-walk/self-quest
compose-for-desktop exposed h2-database hikaricp jetpack-compose kotlin ktor ktor-client ktor-server
Last synced: 4 days ago
JSON representation
:books: Desktop study quiz generator built with Compose for Desktop, backed by Ktor & Exposed.
- Host: GitHub
- URL: https://github.com/bog-walk/self-quest
- Owner: bog-walk
- License: mit
- Created: 2022-10-18T01:57:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-04T02:01:30.000Z (2 months ago)
- Last Synced: 2024-12-17T21:44:27.456Z (about 2 months ago)
- Topics: compose-for-desktop, exposed, h2-database, hikaricp, jetpack-compose, kotlin, ktor, ktor-client, ktor-server
- Language: Kotlin
- Homepage:
- Size: 1.39 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# :rocket: Self Quest :star::books:
Enhance your study strategy by creating your own questions using a single window desktop application built
with **JetBrains** [Compose for Desktop](https://www.jetbrains.com/lp/compose-desktop/), [Ktor](https://ktor.io/), and [Exposed](https://github.com/JetBrains/Exposed).
![]()
## :memo: Desktop App details
A minimalist desktop application for generating quiz collections, using dual-mode interactive flash cards.
Every quiz question comes with an optional review slot that accepts detailed text (currently only with basic formatting),
as well as links to external resources.Switching to quiz mode currently only blocks access to the review slots and forces progression forward by requiring a
chosen answer for each question.
![]()
## :briefcase: Desktop features
- UI events trigger Ktor HTTP client [`SQClient`](common/src/commonMain/kotlin/dev/bogwalk/client/SQClient.kt) in common
module to make requests to server
- `Tab` layout allows easy switching between question and review slots or navigating an entire collection in either slot
- Pop-up dialogs triggered by either requesting data deletion or attempting to leave a form without saving
- Custom input forms with input validation
- Robust UI (unit and integration) test suites## :memo: Server details
A self-hosted Ktor server application with persistence via an [H2 embedded database](https://www.h2database.com/html/features.html#connection_modes).
Collections are saved in `build/demodb.mv.db`, based on specifications set in
[`application.conf`](server/src/main/resources/application.conf).## :briefcase: Server features
- [Exposed](https://github.com/JetBrains/Exposed) framework's typesafe DSL
- JDBC connection pooling using [HikariCP](https://github.com/brettwooldridge/HikariCP) framework
- Type-safe routing using the `Resources` plugin in[`Resources.kt`](common/src/commonMain/kotlin/dev/bogwalk/routes/Resources.kt)
- JSON deserialization into data objects using the `ContentNegotiation` plugin
- Both server DAO unit tests and routing tests using a custom `testApplication`## :computer: Run desktop application
- Clone the repository
- Open the project in IntelliJ IDEA and run `Server.kt` from the server module
- Once the server has started, run `Main.kt` from the desktop module
Note that the server will automatically shut down as a part of the application exit process.
## :microscope: Run tests
Clone the repository then pick an option:
- Open the project in IntelliJ IDEA then choose specific tests using gutter icons in either the desktop or server module
- Open the Gradle toolbar and select `server/Tasks/verification/test` to run server-side tests or select
`desktop/Tasks/verification/test` to run client-side tests- `./gradlew :server:test` or `./gradlew :desktop:test` from an open terminal in the root of the project