-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Björn Urban
committed
Aug 3, 2023
0 parents
commit feec5bb
Showing
50 changed files
with
4,081 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
bin/ | ||
!**/src/main/**/bin/ | ||
!**/src/test/**/bin/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### VS Code ### | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Cardmaster | ||
|
||
This tool is designed to work as a point tracker for the card game doppelkopf. | ||
|
||
## Planned features | ||
|
||
- [ ] Track points of your games of each person | ||
- [ ] Set fine per point and manage club finances | ||
- [ ] Analytics | ||
|
||
## Tech Stack | ||
|
||
- Kotlin/Ktor | ||
- Svelte | ||
- SurrealDB | ||
- Kubernetes | ||
- Pulumi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
val ktor_version: String by project | ||
val kotlin_version: String by project | ||
val logback_version: String by project | ||
val surrealdbVersion: String by project | ||
|
||
|
||
plugins { | ||
kotlin("jvm") version "1.9.0" | ||
id("io.ktor.plugin") version "2.3.2" | ||
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.0" | ||
} | ||
|
||
|
||
group = "com.cardmaster" | ||
version = "0.0.1" | ||
application { | ||
mainClass.set("com.cardmaster.ApplicationKt") | ||
val isDevelopment: Boolean = project.ext.has("development") | ||
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment") | ||
|
||
} | ||
|
||
|
||
repositories { | ||
mavenCentral() | ||
maven { url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-js-wrappers") } | ||
} | ||
|
||
dependencies { | ||
implementation("io.ktor:ktor-server-core-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-server-auth-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-client-core-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-client-apache-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-server-sessions-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-server-host-common-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-server-status-pages-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-server-call-logging-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-server-content-negotiation-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-serialization-kotlinx-json-jvm:$ktor_version") | ||
implementation("io.ktor:ktor-server-html-builder-jvm:$ktor_version") | ||
implementation("org.jetbrains:kotlin-css-jvm:1.0.0-pre.129-kotlin-1.4.20") | ||
implementation("io.ktor:ktor-server-netty-jvm:$ktor_version") | ||
//Injection | ||
implementation("io.insert-koin:koin-ktor:3.4.1") | ||
// https://mvnrepository.com/artifact/io.insert-koin/koin-logger-slf4j | ||
|
||
implementation("io.insert-koin:koin-logger-slf4j:3.4.1") | ||
|
||
//Database Surreal DB | ||
implementation("com.surrealdb:surrealdb-driver:$surrealdbVersion") | ||
//SurrealDB java needs Java websockets | ||
implementation("org.java-websocket:Java-WebSocket:1.5.4") | ||
|
||
|
||
implementation("ch.qos.logback:logback-classic:$logback_version") | ||
testImplementation("io.ktor:ktor-server-tests-jvm:$ktor_version") | ||
testImplementation("io.insert-koin:koin-test:3.4.1") | ||
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version") | ||
} | ||
|
||
|
||
tasks.wrapper { | ||
gradleVersion = "8.2.1" | ||
// You can either download the binary-only version of Gradle (BIN) or | ||
// the full version (with sources and documentation) of Gradle (ALL) | ||
distributionType = Wrapper.DistributionType.ALL | ||
} | ||
|
||
tasks.compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = "17" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
root: true, | ||
env: {browser: true, es2020: true}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react-hooks/recommended', | ||
], | ||
ignorePatterns: ['dist', '.eslintrc.cjs'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['react-refresh'], | ||
rules: { | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{allowConstantExport: true}, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# React + TypeScript + Vite | ||
|
||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
|
||
Currently, two official plugins are available: | ||
|
||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) | ||
uses [Babel](https://babeljs.io/) for Fast Refresh | ||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast | ||
Refresh | ||
|
||
## Expanding the ESLint configuration | ||
|
||
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: | ||
|
||
- Configure the top-level `parserOptions` property like this: | ||
|
||
```js | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
project: ['./tsconfig.json', './tsconfig.node.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
``` | ||
|
||
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` | ||
or `plugin:@typescript-eslint/strict-type-checked` | ||
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` | ||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and | ||
add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<link href="/vite.svg" rel="icon" type="image/svg+xml"/> | ||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/> | ||
<title>Vite + React + TS</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script src="/src/main.tsx" type="module"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.