Mono Repo
* moveBackend * added Frontend * added env support for COM port * added frontend into monorepo
2
Backend/.env
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
VITE_APP_WEBSOCKET_IP=localhost
|
||||||
|
COM_PORT=COM3
|
||||||
1
.gitignore → Backend/.gitignore
vendored
@@ -37,3 +37,4 @@ build/
|
|||||||
### Mac OS ###
|
### Mac OS ###
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/.idea/
|
/.idea/
|
||||||
|
.env
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.schafkopf.cardreader;
|
package org.schafkopf.cardreader;
|
||||||
|
|
||||||
import com.fazecast.jSerialComm.SerialPort;
|
import com.fazecast.jSerialComm.SerialPort;
|
||||||
|
import io.github.cdimascio.dotenv.Dotenv;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import org.schafkopf.BackendServer;
|
import org.schafkopf.BackendServer;
|
||||||
|
|
||||||
@@ -8,6 +9,8 @@ import org.schafkopf.BackendServer;
|
|||||||
public class UsbCardReader extends CardReader {
|
public class UsbCardReader extends CardReader {
|
||||||
|
|
||||||
private volatile boolean isRunning = true;
|
private volatile boolean isRunning = true;
|
||||||
|
Dotenv dotenv = Dotenv.configure().directory("./").load();
|
||||||
|
private String PORT_NAME = dotenv.get("COM_PORT");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an Instance of the KartenLeser.
|
* Creates an Instance of the KartenLeser.
|
||||||
@@ -30,14 +33,14 @@ public class UsbCardReader extends CardReader {
|
|||||||
SerialPort selectedPort = null;
|
SerialPort selectedPort = null;
|
||||||
|
|
||||||
for (SerialPort port : ports) {
|
for (SerialPort port : ports) {
|
||||||
if (port.getSystemPortName().equals("COM13")) {
|
if (port.getSystemPortName().equals(this.PORT_NAME)) {
|
||||||
selectedPort = port;
|
selectedPort = port;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedPort == null) {
|
if (selectedPort == null) {
|
||||||
System.out.println("COM6 not found");
|
System.out.println(this.PORT_NAME + " not found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2,9 +2,7 @@ package org.schafkopf.player;
|
|||||||
|
|
||||||
import org.schafkopf.Schafkopf;
|
import org.schafkopf.Schafkopf;
|
||||||
import org.schafkopf.karte.Karte;
|
import org.schafkopf.karte.Karte;
|
||||||
import org.schafkopf.karte.KartenFarbe;
|
|
||||||
import org.schafkopf.karte.KartenListe;
|
import org.schafkopf.karte.KartenListe;
|
||||||
import org.schafkopf.karte.KartenSymbol;
|
|
||||||
import org.schafkopf.spielcontroller.SpielController;
|
import org.schafkopf.spielcontroller.SpielController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package org.schafkopf.spielcontroller;
|
package org.schafkopf.spielcontroller;
|
||||||
|
|
||||||
import org.schafkopf.karte.KartenFarbe;
|
|
||||||
import org.schafkopf.karte.KartenListe;
|
import org.schafkopf.karte.KartenListe;
|
||||||
import org.schafkopf.karte.KartenSymbol;
|
import org.schafkopf.karte.KartenSymbol;
|
||||||
import org.schafkopf.karte.KartenUtil;
|
import org.schafkopf.karte.KartenUtil;
|
||||||
|
Before Width: | Height: | Size: 815 KiB After Width: | Height: | Size: 815 KiB |
|
Before Width: | Height: | Size: 859 KiB After Width: | Height: | Size: 859 KiB |
|
Before Width: | Height: | Size: 971 KiB After Width: | Height: | Size: 971 KiB |
|
Before Width: | Height: | Size: 954 KiB After Width: | Height: | Size: 954 KiB |
|
Before Width: | Height: | Size: 797 KiB After Width: | Height: | Size: 797 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 603 KiB After Width: | Height: | Size: 603 KiB |
|
Before Width: | Height: | Size: 646 KiB After Width: | Height: | Size: 646 KiB |
|
Before Width: | Height: | Size: 730 KiB After Width: | Height: | Size: 730 KiB |
|
Before Width: | Height: | Size: 768 KiB After Width: | Height: | Size: 768 KiB |
|
Before Width: | Height: | Size: 905 KiB After Width: | Height: | Size: 905 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1008 KiB After Width: | Height: | Size: 1008 KiB |
|
Before Width: | Height: | Size: 870 KiB After Width: | Height: | Size: 870 KiB |
|
Before Width: | Height: | Size: 412 KiB After Width: | Height: | Size: 412 KiB |
|
Before Width: | Height: | Size: 470 KiB After Width: | Height: | Size: 470 KiB |
|
Before Width: | Height: | Size: 498 KiB After Width: | Height: | Size: 498 KiB |
|
Before Width: | Height: | Size: 626 KiB After Width: | Height: | Size: 626 KiB |
|
Before Width: | Height: | Size: 957 KiB After Width: | Height: | Size: 957 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1010 KiB After Width: | Height: | Size: 1010 KiB |
|
Before Width: | Height: | Size: 959 KiB After Width: | Height: | Size: 959 KiB |
|
Before Width: | Height: | Size: 686 KiB After Width: | Height: | Size: 686 KiB |
|
Before Width: | Height: | Size: 600 KiB After Width: | Height: | Size: 600 KiB |
|
Before Width: | Height: | Size: 704 KiB After Width: | Height: | Size: 704 KiB |
|
Before Width: | Height: | Size: 741 KiB After Width: | Height: | Size: 741 KiB |
|
Before Width: | Height: | Size: 881 KiB After Width: | Height: | Size: 881 KiB |
|
Before Width: | Height: | Size: 1009 KiB After Width: | Height: | Size: 1009 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1015 KiB After Width: | Height: | Size: 1015 KiB |
|
Before Width: | Height: | Size: 958 KiB After Width: | Height: | Size: 958 KiB |
|
Before Width: | Height: | Size: 496 B After Width: | Height: | Size: 496 B |
18
Frontend/.eslintrc.cjs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
"plugin:vue/vue3-recommended",
|
||||||
|
"prettier"
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
// override/add rules settings here, such as:
|
||||||
|
// 'vue/no-unused-vars': 'error'
|
||||||
|
},
|
||||||
|
parser: "vue-eslint-parser",
|
||||||
|
parserOptions: {
|
||||||
|
"parser": "@typescript-eslint/parser"
|
||||||
|
},
|
||||||
|
}
|
||||||
26
Frontend/.gitignore
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
.env
|
||||||
|
# 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?
|
||||||
|
|
||||||
BIN
Frontend/.prettierrc.json
Normal file
9
Frontend/README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Vue 3 + TypeScript + Vite
|
||||||
|
|
||||||
|
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
||||||
|
|
||||||
|
## Recommended Setup
|
||||||
|
|
||||||
|
- [VS Code](https://code.visualstudio.com/) + [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (previously Volar) and disable Vetur
|
||||||
|
|
||||||
|
- Use [vue-tsc](https://github.com/vuejs/language-tools/tree/master/packages/tsc) for performing the same type checking from the command line, or for generating d.ts files for SFCs.
|
||||||
12
Frontend/index.html
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>Vite + Vue + TS</title>
|
||||||
|
</head>
|
||||||
|
<body class="bg-zinc-800">
|
||||||
|
<div id="app"></div>
|
||||||
|
<script type="module" src="/src/main.ts"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
3856
Frontend/package-lock.json
generated
Normal file
29
Frontend/package.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"name": "frontend",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vue-tsc && vite build",
|
||||||
|
"preview": "vite preview"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"vue": "^3.4.21"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@typescript-eslint/parser": "^7.7.0",
|
||||||
|
"@vitejs/plugin-vue": "^5.0.4",
|
||||||
|
"autoprefixer": "^10.4.19",
|
||||||
|
"eslint": "^8.57.0",
|
||||||
|
"eslint-config-prettier": "^9.1.0",
|
||||||
|
"eslint-plugin-vue": "^9.25.0",
|
||||||
|
"postcss": "^8.4.38",
|
||||||
|
"prettier": "3.2.5",
|
||||||
|
"sass": "^1.75.0",
|
||||||
|
"tailwindcss": "^3.4.3",
|
||||||
|
"typescript": "^5.2.2",
|
||||||
|
"vite": "^5.2.0",
|
||||||
|
"vue-tsc": "^2.0.6"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
Frontend/postcss.config.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
export default {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {},
|
||||||
|
autoprefixer: {},
|
||||||
|
},
|
||||||
|
}
|
||||||
BIN
Frontend/public/assets/blatt_6.png
Normal file
|
After Width: | Height: | Size: 815 KiB |
BIN
Frontend/public/assets/blatt_7.png
Normal file
|
After Width: | Height: | Size: 859 KiB |
BIN
Frontend/public/assets/blatt_8.png
Normal file
|
After Width: | Height: | Size: 971 KiB |
BIN
Frontend/public/assets/blatt_9.png
Normal file
|
After Width: | Height: | Size: 954 KiB |
BIN
Frontend/public/assets/blatt_a.png
Normal file
|
After Width: | Height: | Size: 797 KiB |
BIN
Frontend/public/assets/blatt_k.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
Frontend/public/assets/blatt_o.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
Frontend/public/assets/blatt_u.png
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
Frontend/public/assets/blatt_x.png
Normal file
|
After Width: | Height: | Size: 1.0 MiB |