diff --git a/docker-compose.yaml b/docker-compose.yaml
index 63cf40a..0ef0f1d 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -1,16 +1,18 @@
-networks:
- rush-character-net:
-
services:
+
+ proxy:
+ image: traefik
+ command: --providers.docker
+ ports:
+ - 80:80
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+
frontend:
build:
context: ./
dockerfile: ./frontend/Dockerfile
command: npm run dev
- networks:
- - rush-character-net
- ports:
- - 8080:3000
develop:
watch:
- action: sync
@@ -22,15 +24,14 @@ services:
path: ./frontend/package.json
- action: rebuild
path: ./frontend/Dockerfile
+ labels:
+ traefik.http.routers.client.rule: "Host(`localhost`)"
+
vault:
build:
context: ./
dockerfile: ./vault/Dockerfile
command: npm run dev
- networks:
- - rush-character-net
- ports:
- - 8081:8080
environment:
MONGO_URI: mongodb://rushvault:rushvault@mongo:27017/
depends_on:
@@ -46,6 +47,10 @@ services:
path: ./vault/package.json
- action: rebuild
path: ./vault/Dockerfile
+ labels:
+ traefik.http.routers.api.rule: "Host(`localhost`) && PathPrefix(`/api`)"
+ traefik.http.routers.api.middlewares: "api-stripprefix"
+ traefik.http.middlewares.api-stripprefix.stripprefix.prefixes: "/api"
mongo:
image: mongo
@@ -54,19 +59,16 @@ services:
MONGO_INITDB_ROOT_USERNAME: rushvault
MONGO_INITDB_ROOT_PASSWORD: rushvault
MONGO_INITDB_DATABASE: DB
- networks:
- - rush-character-net
+
mongo-express:
image: mongo-express
restart: always
- networks:
- - rush-character-net
- ports:
- - 8083:8081
depends_on:
- mongo
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: rushvault
ME_CONFIG_MONGODB_ADMINPASSWORD: rushvault
ME_CONFIG_MONGODB_URL: mongodb://rushvault:rushvault@mongo:27017/
- ME_CONFIG_BASICAUTH: false
\ No newline at end of file
+ ME_CONFIG_BASICAUTH: false
+ labels:
+ traefik.http.routers.mexp.rule: "Host(`mexp.localhost`)"
\ No newline at end of file
diff --git a/frontend/.prettierrc.json b/frontend/.prettierrc.json
index 29a2402..ea9f4ac 100644
--- a/frontend/.prettierrc.json
+++ b/frontend/.prettierrc.json
@@ -2,5 +2,5 @@
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"singleQuote": true,
- "printWidth": 100
+ "printWidth": 80
}
diff --git a/frontend/Dockerfile b/frontend/Dockerfile
index 32246a9..58bdc55 100644
--- a/frontend/Dockerfile
+++ b/frontend/Dockerfile
@@ -18,6 +18,6 @@ RUN npm i -g serve
RUN npm run build
-EXPOSE 8080
+EXPOSE 3000
CMD ["serve", "-s", "dist"]
\ No newline at end of file
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index e1f9c5b..e2867cb 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -8,13 +8,11 @@
"name": "frontend",
"version": "0.0.0",
"dependencies": {
- "@protobuf-ts/grpcweb-transport": "^2.11.0",
- "@protobuf-ts/plugin": "^2.11.0",
- "google-protobuf": "^3.21.4",
- "grpc-web": "^1.5.0",
"vue": "^3.5.13"
},
"devDependencies": {
+ "@protobuf-ts/grpcweb-transport": "^2.11.0",
+ "@protobuf-ts/plugin": "^2.11.0",
"@tsconfig/node22": "^22.0.1",
"@types/google-protobuf": "^3.15.12",
"@types/node": "^22.15.31",
@@ -24,6 +22,8 @@
"@vue/tsconfig": "^0.7.0",
"eslint": "^9.22.0",
"eslint-plugin-vue": "~10.0.0",
+ "google-protobuf": "^3.21.4",
+ "grpc-web": "^1.5.0",
"jiti": "^2.4.2",
"npm-run-all2": "^7.0.2",
"prettier": "3.5.3",
@@ -546,12 +546,14 @@
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.5.2.tgz",
"integrity": "sha512-foZ7qr0IsUBjzWIq+SuBLfdQCpJ1j8cTuNNT4owngTHoN5KsJb8L9t65fzz7SCeSWzescoOil/0ldqiL041ABg==",
+ "dev": true,
"license": "(Apache-2.0 AND BSD-3-Clause)"
},
"node_modules/@bufbuild/protoplugin": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-2.5.2.tgz",
"integrity": "sha512-7d/NUae/ugs/qgHEYOwkVWGDE3Bf/xjuGviVFs38+MLRdwiHNTiuvzPVwuIPo/1wuZCZn3Nax1cg1owLuY72xw==",
+ "dev": true,
"license": "Apache-2.0",
"dependencies": {
"@bufbuild/protobuf": "2.5.2",
@@ -563,6 +565,7 @@
"version": "5.4.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
+ "dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
@@ -1353,6 +1356,7 @@
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@protobuf-ts/grpcweb-transport/-/grpcweb-transport-2.11.0.tgz",
"integrity": "sha512-tTra0dPTQFSwEiSkM6q5nVfW35xOOh2NfYEdLfEPoCsKLgl5q9W5dd41t0ovDeI6CTae3SFOZqAqKeKO6g/cjg==",
+ "dev": true,
"license": "Apache-2.0",
"dependencies": {
"@protobuf-ts/runtime": "^2.11.0",
@@ -1363,6 +1367,7 @@
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.11.0.tgz",
"integrity": "sha512-Y+p4Axrk3thxws4BVSIO+x4CKWH2c8k3K+QPrp6Oq8agdsXPL/uwsMTIdpTdXIzTaUEZFASJL9LU56pob5GTHg==",
+ "dev": true,
"license": "Apache-2.0",
"dependencies": {
"@bufbuild/protobuf": "^2.4.0",
@@ -1381,6 +1386,7 @@
"version": "3.9.10",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
"integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
+ "dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
@@ -1394,6 +1400,7 @@
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.11.0.tgz",
"integrity": "sha512-GYfmv1rjZ/7MWzUqMszhdXiuoa4Js/j6zCbcxFmeThBBUhbrXdPU42vY+QVCHL9PvAMXO+wEhUfPWYdd1YgnlA==",
+ "dev": true,
"license": "Apache-2.0",
"bin": {
"protoc": "protoc.js"
@@ -1403,12 +1410,14 @@
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.11.0.tgz",
"integrity": "sha512-DfpRpUiNvPC3Kj48CmlU4HaIEY1Myh++PIumMmohBAk8/k0d2CkxYxJfPyUAxfuUfl97F4AvuCu1gXmfOG7OJQ==",
+ "dev": true,
"license": "(Apache-2.0 AND BSD-3-Clause)"
},
"node_modules/@protobuf-ts/runtime-rpc": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.11.0.tgz",
"integrity": "sha512-g/oMPym5LjVyCc3nlQc6cHer0R3CyleBos4p7CjRNzdKuH/FlRXzfQYo6EN5uv8vLtn7zEK9Cy4YBKvHStIaag==",
+ "dev": true,
"license": "Apache-2.0",
"dependencies": {
"@protobuf-ts/runtime": "^2.11.0"
@@ -2036,6 +2045,7 @@
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.1.tgz",
"integrity": "sha512-JwoxboBh7Oz1v38tPbkrZ62ZXNHAk9bJ7c9x0eI5zBfBnBYGhURdbnh7Z4smN/MV48Y5OCcZb58n972UtbazsA==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"debug": "^4.1.1"
@@ -2708,6 +2718,7 @@
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
@@ -3406,6 +3417,7 @@
"version": "3.21.4",
"resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz",
"integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==",
+ "dev": true,
"license": "(BSD-3-Clause AND Apache-2.0)"
},
"node_modules/graceful-fs": {
@@ -3426,6 +3438,7 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/grpc-web/-/grpc-web-1.5.0.tgz",
"integrity": "sha512-y1tS3BBIoiVSzKTDF3Hm7E8hV2n7YY7pO0Uo7depfWJqKzWE+SKr0jvHNIJsJJYILQlpYShpi/DRJJMbosgDMQ==",
+ "dev": true,
"license": "Apache-2.0"
},
"node_modules/has-flag": {
@@ -3895,6 +3908,7 @@
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
"license": "MIT"
},
"node_modules/muggle-string": {
@@ -4739,6 +4753,7 @@
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
+ "devOptional": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
diff --git a/frontend/package.json b/frontend/package.json
index 73ee0c3..31d05d3 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -14,13 +14,11 @@
"format": "prettier --write src/"
},
"dependencies": {
- "@protobuf-ts/grpcweb-transport": "^2.11.0",
- "@protobuf-ts/plugin": "^2.11.0",
- "google-protobuf": "^3.21.4",
- "grpc-web": "^1.5.0",
"vue": "^3.5.13"
},
"devDependencies": {
+ "@protobuf-ts/grpcweb-transport": "^2.11.0",
+ "@protobuf-ts/plugin": "^2.11.0",
"@tsconfig/node22": "^22.0.1",
"@types/google-protobuf": "^3.15.12",
"@types/node": "^22.15.31",
@@ -30,6 +28,8 @@
"@vue/tsconfig": "^0.7.0",
"eslint": "^9.22.0",
"eslint-plugin-vue": "~10.0.0",
+ "google-protobuf": "^3.21.4",
+ "grpc-web": "^1.5.0",
"jiti": "^2.4.2",
"npm-run-all2": "^7.0.2",
"prettier": "3.5.3",
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index d05208d..5c5b53d 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -1,19 +1,42 @@
-
-
-
-
-
+
+ butts
+
+
+
-
+
diff --git a/frontend/src/components/TheWelcome.vue b/frontend/src/components/TheWelcome.vue
index 6092dff..c8af803 100644
--- a/frontend/src/components/TheWelcome.vue
+++ b/frontend/src/components/TheWelcome.vue
@@ -17,7 +17,9 @@ const openReadmeInEditor = () => fetch('/__open-in-editor?file=README.md')
Documentation
Vue’s
- official documentation
+ official documentation
provides you with all information you need to get started.
@@ -28,22 +30,35 @@ const openReadmeInEditor = () => fetch('/__open-in-editor?file=README.md')
Tooling
This project is served and bundled with
- Vite . The
- recommended IDE setup is
- VSCode
+ Vite . The recommended IDE setup is
+ VSCode
+
- Vue - Official . If
- you need to test your components and web pages, check out
+ Vue - Official . If you need to test your components and web pages, check out
Vitest
and
Cypress
/
- Playwright .
+ Playwright .
More instructions are available in
- README.mdREADME.md.
@@ -55,11 +70,21 @@ const openReadmeInEditor = () => fetch('/__open-in-editor?file=README.md')
Get official tools and libraries for your project:
Pinia ,
- Vue Router ,
- Vue Test Utils , and
- Vue Dev Tools . If
- you need more resources, we suggest paying
- Awesome Vue
+ Vue Router ,
+ Vue Test Utils , and
+ Vue Dev Tools . If you need more resources, we suggest paying
+ Awesome Vue
a visit.
@@ -72,10 +97,15 @@ const openReadmeInEditor = () => fetch('/__open-in-editor?file=README.md')
Got stuck? Ask your question on
Vue Land
(our official Discord server), or
- StackOverflow . You should also follow the official
- @vuejs.org
+ @vuejs.org
Bluesky account or the
@vuejs
X account for latest news in the Vue world.
@@ -87,8 +117,10 @@ const openReadmeInEditor = () => fetch('/__open-in-editor?file=README.md')
Support Vue
- As an independent project, Vue relies on community backing for its sustainability. You can help
- us by
- becoming a sponsor .
+ As an independent project, Vue relies on community backing for its
+ sustainability. You can help us by
+ becoming a sponsor .
diff --git a/frontend/src/components/icons/IconCommunity.vue b/frontend/src/components/icons/IconCommunity.vue
index 2dc8b05..ea8ddef 100644
--- a/frontend/src/components/icons/IconCommunity.vue
+++ b/frontend/src/components/icons/IconCommunity.vue
@@ -1,5 +1,10 @@
-
+
diff --git a/frontend/src/components/icons/IconDocumentation.vue b/frontend/src/components/icons/IconDocumentation.vue
index 6d4791c..63a8534 100644
--- a/frontend/src/components/icons/IconDocumentation.vue
+++ b/frontend/src/components/icons/IconDocumentation.vue
@@ -1,5 +1,10 @@
-
+
diff --git a/frontend/src/components/icons/IconEcosystem.vue b/frontend/src/components/icons/IconEcosystem.vue
index c3a4f07..385a202 100644
--- a/frontend/src/components/icons/IconEcosystem.vue
+++ b/frontend/src/components/icons/IconEcosystem.vue
@@ -1,5 +1,10 @@
-
+
diff --git a/frontend/src/components/icons/IconSupport.vue b/frontend/src/components/icons/IconSupport.vue
index 7452834..7db961e 100644
--- a/frontend/src/components/icons/IconSupport.vue
+++ b/frontend/src/components/icons/IconSupport.vue
@@ -1,5 +1,10 @@
-
+
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 1cf380e..0ac3a5f 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -1,8 +1,5 @@
import './assets/main.css'
-// import * as grpc from 'grpc';
-import { Character } from './proto/character'
-
import { createApp } from 'vue'
import App from './App.vue'
diff --git a/vault/src/app.ts b/vault/src/app.ts
index 3ab511b..d1a6884 100644
--- a/vault/src/app.ts
+++ b/vault/src/app.ts
@@ -19,7 +19,8 @@ const databaseService = new DatabaseService(
const characterService = new CharacterService(databaseService)
const app = new Server()
+characterService.addToServer(app)
+
app.bindAsync(address, ServerCredentials.createInsecure(), () => {
- characterService.addToServer(app)
console.log(`Starting server at ${address}`)
})
diff --git a/vault/src/character_service.ts b/vault/src/character_service.ts
index ff5d373..b27ffee 100644
--- a/vault/src/character_service.ts
+++ b/vault/src/character_service.ts
@@ -1,4 +1,4 @@
-import { Server, ServerUnaryCall, sendUnaryData } from '@grpc/grpc-js'
+import { Server, ServerUnaryCall, sendUnaryData, StatusBuilder } from '@grpc/grpc-js'
import { ReflectionService } from '@grpc/reflection'
import { loadSync } from '@grpc/proto-loader'
import { MongoClient, Collection, Db } from 'mongodb'
@@ -75,13 +75,14 @@ export class CharacterService {
call: ServerUnaryCall,
callback: sendUnaryData,
) {
- let characters = await this.databaseService.listCharacters(
- call.request.playerName,
- call.request.characterName,
- )
+ // let characters = await this.databaseService.listCharacters(
+ // call.request.playerName,
+ // call.request.characterName,
+ // )
+ console.log("potato")
- callback(null, {
- characters,
+ callback(new StatusBuilder().withDetails("fek").build(), {
+ characters: [],
})
}
}