A standalone web application that allows users to upload sets of questions and create and take quizzes using them.
- Intellij
- Nix shell
- Openjdk 21 (Temurin OpenJDK-21)
nix-shell --run bash
git submodule init
git submodule update
gcc -fPIC -shared -o native/simple/libsimple.so native/simple/simple.c
# build sqlite amalgamation, See reference 13
cd $PROJECT_ROOT/external/sqlite \
&& ./configure && make sqlite3.c \
&& cp -f $PROJECT_ROOT/external/sqlite/sqlite3.c $PROJECT_ROOT/native/sqlite-amalgamation-3500400/sqlite3.c \
&& cp -f $PROJECT_ROOT/external/sqlite/sqlite3.h $PROJECT_ROOT/native/sqlite-amalgamation-3500400/sqlite3.h \
&& git clean -fdx \
&& cd $PROJECT_ROOT
# build sqlite dynamic library
cd $PROJECT_ROOT/native/sqlite-amalgamation-3500400 \
&& gcc -fPIC -shared -o libsqlite3.so sqlite3.c \
&& cd $PROJECT_ROOT
# build libbcrypt dynamic library
cd $PROJECT_ROOT/external/libbcrypt \
&& ( make EXTRA_CFLAGS="-fPIC" || [ -e ./libbcrypt.so.1.0.0 ] ) \
&& cp -f $PROJECT_ROOT/external/libbcrypt/bcrypt.h $PROJECT_ROOT/native/bcrypt/bcrypt.h \
&& cp -f $PROJECT_ROOT/external/libbcrypt/libbcrypt.so.1.0.0 $PROJECT_ROOT/native/bcrypt/libbcrypt.so.1 \
&& git clean -fdx \
&& cd $PROJECT_ROOT./gradlew build -PbuildType=DEBUG
# IntelliJ idea: create debug profile for JAR - $PROJECT_ROOT/quiz-flow-server/entrypoint/build/packaged/quiz-flow-0.0.1.jar
# Run executable
$PROJECT_ROOT/quiz-flow-server/entrypoint/build/packaged/quiz-flow-0.0.1.kexe
# or jvm target
java -jar $PROJECT_ROOT/quiz-flow-server/entrypoint/build/packaged/quiz-flow-0.0.1.jar
# Since DEBUG_APPLICATION_ROOT_FOLDER env variable was specified in shell.nix
# the app can be run directly using Intellij.
# clean and build
./gradlew clean build -PbuildType=DEBUG -Pkotlin.native.cacheKind=none
# Run user acceptance tests:
./gradlew :quiz-flow-server-acceptance-test:testMain
./gradlew :quiz-flow-server-acceptance-test:testMain \
--tests "com.iv127.quizflow.server.acceptance.test.SumTest"
./gradlew :quiz-flow-server-acceptance-test:testMain \
--tests "com.iv127.quizflow.server.acceptance.test.SumTest.testSum" \
--tests "com.iv127.quizflow.server.acceptance.test.SumTest.testMul" npm install --prefix $PROJECT_ROOT/quiz-flow-ui
npm run start --prefix $PROJECT_ROOT/quiz-flow-ui./gradlew clean :quiz-flow-ui:runNpmBuild build \
-PbuildType=RELEASE \
-Pkotlin.native.cacheKind=none# Run native executable
$PROJECT_ROOT/quiz-flow-server/entrypoint/build/packaged/quiz-flow-0.0.1.kexe
# May need to set
LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" ./quiz-flow-0.0.1.kexe
# Run jvm bundle
java -jar $PROJECT_ROOT/quiz-flow-server/entrypoint/build/packaged/quiz-flow-0.0.1.jar- https://github.com/ktorio/ktor-documentation/blob/3.2.3/codeSnippets/snippets/embedded-server-native/README.md
- https://github.com/Kotlin/kmp-logic-sharing-simple-example/tree/main
- https://regex101.com/
- https://nequalsonelifestyle.com/2020/11/16/kotlin-native-file-io/
- https://stackoverflow.com/questions/59596589/how-to-set-up-a-kotlin-native-project-so-that-it-places-resources-alongside-the
- Lilleaas, August (2023). Pro Kotlin Web Apps from Scratch.
- https://thejoeflow.com/post/handling-multipart-requests-with-ktor
- https://dev.to/programadorthi/kotlin-routing-routing-everything-1f4j
- https://stackoverflow.com/questions/66232760/how-to-implement-in-kotlin-native-fileseek-getfilelength-and-readintobuffer
- https://discourse.nixos.org/t/how-to-refer-to-current-directory-in-shell-nix/9526/2
- BEST https://flyingbytes.github.io/programming/android/kotlin/native/c/interop/interoperability/2022/09/10/Kotlin-Native-C-Interop.html
- https://stackoverflow.com/questions/47618276/how-to-use-sqlite-in-kotlin-native 12.1. https://github.com/Kotlin/kotlinconf-spinner/tree/b1e66920ac7216d3dbc4b6b4625fb77efe23cff8/sql
- https://jvns.ca/blog/2019/10/28/sqlite-is-really-easy-to-compile/
- https://www.conventionalcommits.org/en/v1.0.0/
- https://sqlite.org/amalgamation.html
- https://www.w3schools.com/git/git_submodules.asp
- https://stackoverflow.com/questions/1777854/how-can-i-specify-a-branch-tag-when-adding-a-git-submodule
- https://stackoverflow.com/questions/20342058/which-uuid-version-to-use
- https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-test/
- https://www.youtube.com/watch?v=nKCsIHWircA
- https://www.npmjs.com/package/uuidv7
- https://github.com/huarangmeng/uuid
- https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper
- https://github.com/codzsword/sidebar-html-css-js
- https://react-redux.js.org/tutorials/typescript-quick-start
- https://github.com/wopian/kitsu-season-trends/tree/master