diff --git a/.gitignore b/.gitignore
index cb447f4..4ae0e5c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
.venv
poetry.lock
-files/*
\ No newline at end of file
+files/*
+.vscode/
\ No newline at end of file
diff --git a/.vscode/PythonImportHelper-v2-Completion.json b/.vscode/PythonImportHelper-v2-Completion.json
index 4e0c243..c4a002a 100644
--- a/.vscode/PythonImportHelper-v2-Completion.json
+++ b/.vscode/PythonImportHelper-v2-Completion.json
@@ -1,39 +1,4 @@
[
- {
- "label": "annotations",
- "importPath": "__future__",
- "description": "__future__",
- "isExtraImport": true,
- "detail": "__future__",
- "documentation": {}
- },
- {
- "label": "os",
- "kind": 6,
- "isExtraImport": true,
- "importPath": "os",
- "description": "os",
- "detail": "os",
- "documentation": {}
- },
- {
- "label": "site",
- "kind": 6,
- "isExtraImport": true,
- "importPath": "site",
- "description": "site",
- "detail": "site",
- "documentation": {}
- },
- {
- "label": "sys",
- "kind": 6,
- "isExtraImport": true,
- "importPath": "sys",
- "description": "sys",
- "detail": "sys",
- "documentation": {}
- },
{
"label": "json",
"kind": 6,
@@ -132,6 +97,15 @@
"detail": "gyp.common",
"documentation": {}
},
+ {
+ "label": "os",
+ "kind": 6,
+ "isExtraImport": true,
+ "importPath": "os",
+ "description": "os",
+ "detail": "os",
+ "documentation": {}
+ },
{
"label": "posixpath",
"kind": 6,
@@ -275,6 +249,15 @@
"detail": "code",
"documentation": {}
},
+ {
+ "label": "sys",
+ "kind": 6,
+ "isExtraImport": true,
+ "importPath": "sys",
+ "description": "sys",
+ "detail": "sys",
+ "documentation": {}
+ },
{
"label": "hashlib",
"kind": 6,
@@ -1613,6 +1596,22 @@
"detail": "django.db",
"documentation": {}
},
+ {
+ "label": "migrations",
+ "importPath": "django.db",
+ "description": "django.db",
+ "isExtraImport": true,
+ "detail": "django.db",
+ "documentation": {}
+ },
+ {
+ "label": "models",
+ "importPath": "django.db",
+ "description": "django.db",
+ "isExtraImport": true,
+ "detail": "django.db",
+ "documentation": {}
+ },
{
"label": "models",
"importPath": "django.db",
@@ -1797,105 +1796,6 @@
"detail": "django.core.wsgi",
"documentation": {}
},
- {
- "label": "cv2",
- "kind": 6,
- "isExtraImport": true,
- "importPath": "cv2",
- "description": "cv2",
- "detail": "cv2",
- "documentation": {}
- },
- {
- "label": "numpy",
- "kind": 6,
- "isExtraImport": true,
- "importPath": "numpy",
- "description": "numpy",
- "detail": "numpy",
- "documentation": {}
- },
- {
- "label": "bin_dir",
- "kind": 5,
- "importPath": ".venv.bin.activate_this",
- "description": ".venv.bin.activate_this",
- "peekOfCode": "bin_dir = os.path.dirname(abs_file)\nbase = bin_dir[: -len(\"bin\") - 1] # strip away the bin part from the __file__, plus the path separator\n# prepend bin to PATH (this file is inside the bin directory)\nos.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"interactive-table-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))",
- "detail": ".venv.bin.activate_this",
- "documentation": {}
- },
- {
- "label": "base",
- "kind": 5,
- "importPath": ".venv.bin.activate_this",
- "description": ".venv.bin.activate_this",
- "peekOfCode": "base = bin_dir[: -len(\"bin\") - 1] # strip away the bin part from the __file__, plus the path separator\n# prepend bin to PATH (this file is inside the bin directory)\nos.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"interactive-table-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)",
- "detail": ".venv.bin.activate_this",
- "documentation": {}
- },
- {
- "label": "os.environ[\"PATH\"]",
- "kind": 5,
- "importPath": ".venv.bin.activate_this",
- "description": ".venv.bin.activate_this",
- "peekOfCode": "os.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"interactive-table-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix",
- "detail": ".venv.bin.activate_this",
- "documentation": {}
- },
- {
- "label": "os.environ[\"VIRTUAL_ENV\"]",
- "kind": 5,
- "importPath": ".venv.bin.activate_this",
- "description": ".venv.bin.activate_this",
- "peekOfCode": "os.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"interactive-table-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base",
- "detail": ".venv.bin.activate_this",
- "documentation": {}
- },
- {
- "label": "os.environ[\"VIRTUAL_ENV_PROMPT\"]",
- "kind": 5,
- "importPath": ".venv.bin.activate_this",
- "description": ".venv.bin.activate_this",
- "peekOfCode": "os.environ[\"VIRTUAL_ENV_PROMPT\"] = \"interactive-table-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base",
- "detail": ".venv.bin.activate_this",
- "documentation": {}
- },
- {
- "label": "prev_length",
- "kind": 5,
- "importPath": ".venv.bin.activate_this",
- "description": ".venv.bin.activate_this",
- "peekOfCode": "prev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base",
- "detail": ".venv.bin.activate_this",
- "documentation": {}
- },
- {
- "label": "sys.path[:]",
- "kind": 5,
- "importPath": ".venv.bin.activate_this",
- "description": ".venv.bin.activate_this",
- "peekOfCode": "sys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base",
- "detail": ".venv.bin.activate_this",
- "documentation": {}
- },
- {
- "label": "sys.real_prefix",
- "kind": 5,
- "importPath": ".venv.bin.activate_this",
- "description": ".venv.bin.activate_this",
- "peekOfCode": "sys.real_prefix = sys.prefix\nsys.prefix = base",
- "detail": ".venv.bin.activate_this",
- "documentation": {}
- },
- {
- "label": "sys.prefix",
- "kind": 5,
- "importPath": ".venv.bin.activate_this",
- "description": ".venv.bin.activate_this",
- "peekOfCode": "sys.prefix = base",
- "detail": ".venv.bin.activate_this",
- "documentation": {}
- },
{
"label": "_Known",
"kind": 6,
@@ -8439,6 +8339,15 @@
"detail": "back.api.migrations.0006_product_image2_product_image3",
"documentation": {}
},
+ {
+ "label": "Migration",
+ "kind": 6,
+ "importPath": "back.api.migrations.0007_floorplan_alter_product_image1_alter_product_image2_and_more",
+ "description": "back.api.migrations.0007_floorplan_alter_product_image1_alter_product_image2_and_more",
+ "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('api', '0006_product_image2_product_image3'),\n ]\n operations = [\n migrations.CreateModel(\n name='FloorPlan',\n fields=[\n ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),\n ('title', models.CharField(max_length=200)),",
+ "detail": "back.api.migrations.0007_floorplan_alter_product_image1_alter_product_image2_and_more",
+ "documentation": {}
+ },
{
"label": "ApiConfig",
"kind": 6,
@@ -8708,68 +8617,5 @@
"peekOfCode": "def main():\n \"\"\"Run administrative tasks.\"\"\"\n os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'back.settings')\n try:\n from django.core.management import execute_from_command_line\n except ImportError as exc:\n raise ImportError(\n \"Couldn't import Django. Are you sure it's installed and \"\n \"available on your PYTHONPATH environment variable? Did you \"\n \"forget to activate a virtual environment?\"",
"detail": "back.manage",
"documentation": {}
- },
- {
- "label": "img",
- "kind": 5,
- "importPath": "test",
- "description": "test",
- "peekOfCode": "img = cv2.imread(\n \"/home/arizona/projects/svs_tech/demo-int-table/admin_front/assets/img/plan.png\"\n)\n(h, w) = img.shape[:2]\nt = 1600\nimg = cv2.resize(img, (t, int((h/w) * t)))\ngray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\ngray = 255 - gray\ngray = cv2.blur(gray, (8, 1))\ngray = cv2.threshold(gray, 1, 255, cv2.THRESH_BINARY)[1]",
- "detail": "test",
- "documentation": {}
- },
- {
- "label": "t",
- "kind": 5,
- "importPath": "test",
- "description": "test",
- "peekOfCode": "t = 1600\nimg = cv2.resize(img, (t, int((h/w) * t)))\ngray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\ngray = 255 - gray\ngray = cv2.blur(gray, (8, 1))\ngray = cv2.threshold(gray, 1, 255, cv2.THRESH_BINARY)[1]\ncontours, hierarchy = cv2.findContours(gray, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE)\nfor cnt in contours:\n area = cv2.contourArea(cnt)\n if area > 150000 and area < 500000:",
- "detail": "test",
- "documentation": {}
- },
- {
- "label": "img",
- "kind": 5,
- "importPath": "test",
- "description": "test",
- "peekOfCode": "img = cv2.resize(img, (t, int((h/w) * t)))\ngray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\ngray = 255 - gray\ngray = cv2.blur(gray, (8, 1))\ngray = cv2.threshold(gray, 1, 255, cv2.THRESH_BINARY)[1]\ncontours, hierarchy = cv2.findContours(gray, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE)\nfor cnt in contours:\n area = cv2.contourArea(cnt)\n if area > 150000 and area < 500000:\n cv2.drawContours(img, [cnt], 0, (255, 0, 0), 2)",
- "detail": "test",
- "documentation": {}
- },
- {
- "label": "gray",
- "kind": 5,
- "importPath": "test",
- "description": "test",
- "peekOfCode": "gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\ngray = 255 - gray\ngray = cv2.blur(gray, (8, 1))\ngray = cv2.threshold(gray, 1, 255, cv2.THRESH_BINARY)[1]\ncontours, hierarchy = cv2.findContours(gray, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE)\nfor cnt in contours:\n area = cv2.contourArea(cnt)\n if area > 150000 and area < 500000:\n cv2.drawContours(img, [cnt], 0, (255, 0, 0), 2)\ncv2.imshow(\"img\", img)",
- "detail": "test",
- "documentation": {}
- },
- {
- "label": "gray",
- "kind": 5,
- "importPath": "test",
- "description": "test",
- "peekOfCode": "gray = 255 - gray\ngray = cv2.blur(gray, (8, 1))\ngray = cv2.threshold(gray, 1, 255, cv2.THRESH_BINARY)[1]\ncontours, hierarchy = cv2.findContours(gray, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE)\nfor cnt in contours:\n area = cv2.contourArea(cnt)\n if area > 150000 and area < 500000:\n cv2.drawContours(img, [cnt], 0, (255, 0, 0), 2)\ncv2.imshow(\"img\", img)\ncv2.waitKey()",
- "detail": "test",
- "documentation": {}
- },
- {
- "label": "gray",
- "kind": 5,
- "importPath": "test",
- "description": "test",
- "peekOfCode": "gray = cv2.blur(gray, (8, 1))\ngray = cv2.threshold(gray, 1, 255, cv2.THRESH_BINARY)[1]\ncontours, hierarchy = cv2.findContours(gray, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE)\nfor cnt in contours:\n area = cv2.contourArea(cnt)\n if area > 150000 and area < 500000:\n cv2.drawContours(img, [cnt], 0, (255, 0, 0), 2)\ncv2.imshow(\"img\", img)\ncv2.waitKey()",
- "detail": "test",
- "documentation": {}
- },
- {
- "label": "gray",
- "kind": 5,
- "importPath": "test",
- "description": "test",
- "peekOfCode": "gray = cv2.threshold(gray, 1, 255, cv2.THRESH_BINARY)[1]\ncontours, hierarchy = cv2.findContours(gray, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE)\nfor cnt in contours:\n area = cv2.contourArea(cnt)\n if area > 150000 and area < 500000:\n cv2.drawContours(img, [cnt], 0, (255, 0, 0), 2)\ncv2.imshow(\"img\", img)\ncv2.waitKey()",
- "detail": "test",
- "documentation": {}
}
]
\ No newline at end of file
diff --git a/back/.gitignore b/back/.gitignore
index ad81c75..2f4955a 100644
--- a/back/.gitignore
+++ b/back/.gitignore
@@ -89,6 +89,6 @@ local_settings.py
.env
db.sqlite3
-migrations/00*
+api/migrations/00*
files/*
\ No newline at end of file
diff --git a/back/requirements.txt b/back/requirements.txt
index 7c8d076..959878d 100644
--- a/back/requirements.txt
+++ b/back/requirements.txt
@@ -6,7 +6,7 @@ djangorestframework==3.15.1 ; python_version >= "3.10" and python_version < "4.0
mslex==1.2.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
pillow==10.3.0 ; python_version >= "3.10" and python_version < "4.0"
psutil==5.9.8 ; python_version >= "3.10" and python_version < "4.0"
-psycopg2==2.9.9 ; python_version >= "3.10" and python_version < "4.0"
+psycopg2-binary==2.9.9 ; python_version >= "3.10" and python_version < "4.0"
python-dotenv==1.0.1 ; python_version >= "3.10" and python_version < "4.0"
sqlparse==0.5.0 ; python_version >= "3.10" and python_version < "4.0"
taskipy==1.12.2 ; python_version >= "3.10" and python_version < "4.0"
diff --git a/docker-compose.yml b/docker-compose.yml
index f2dee60..00ee81d 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -18,6 +18,7 @@ services:
- ./files:/app/files
networks:
- network
+ - dev
front:
build:
@@ -32,6 +33,7 @@ services:
condition: service_healthy
networks:
- network
+ - dev
nginx:
image: nginx:1.25
@@ -50,7 +52,14 @@ services:
- ./nginx/conf.d:/etc/nginx/conf.d
networks:
- network
+ - dev
networks:
network:
driver: bridge
+ dev:
+ driver: bridge
+ ipam:
+ config:
+ - subnet: 10.66.0.0/16
+ gateway: 10.66.0.1
diff --git a/front/components.d.ts b/front/components.d.ts
index b9a0be7..7a13a85 100644
--- a/front/components.d.ts
+++ b/front/components.d.ts
@@ -7,6 +7,7 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
+ Game: typeof import('./src/components/Game.vue')['default']
Home: typeof import('./src/components/Home.vue')['default']
IMdi3dRotation: typeof import('~icons/mdi/3d-rotation')['default']
IMdiCard: typeof import('~icons/mdi/card')['default']
@@ -17,5 +18,7 @@ declare module 'vue' {
IMdiVideo3d: typeof import('~icons/mdi/video3d')['default']
Projects: typeof import('./src/components/Projects.vue')['default']
RandomIcon: typeof import('./src/components/RandomIcon.vue')['default']
+ RouterLink: typeof import('vue-router')['RouterLink']
+ RouterView: typeof import('vue-router')['RouterView']
}
}
diff --git a/front/package-lock.json b/front/package-lock.json
index 7cf9567..998fdc3 100644
--- a/front/package-lock.json
+++ b/front/package-lock.json
@@ -9,6 +9,7 @@
"version": "0.0.0",
"dependencies": {
"@fireworks-js/vue": "^2.10.7",
+ "@vueuse/components": "^10.9.0",
"@vueuse/core": "^10.9.0",
"pinia": "^2.1.7",
"reset-css": "^5.0.2",
@@ -950,6 +951,41 @@
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.25.tgz",
"integrity": "sha512-k0yappJ77g2+KNrIaF0FFnzwLvUBLUYr8VOwz+/6vLsmItFp51AcxLL7Ey3iPd7BIRyWPOcqUjMnm7OkahXllA=="
},
+ "node_modules/@vueuse/components": {
+ "version": "10.9.0",
+ "resolved": "https://registry.npmjs.org/@vueuse/components/-/components-10.9.0.tgz",
+ "integrity": "sha512-BHQpA0yIi3y7zKa1gYD0FUzLLkcRTqVhP8smnvsCK6GFpd94Nziq1XVPD7YpFeho0k5BzbBiNZF7V/DpkJ967A==",
+ "dependencies": {
+ "@vueuse/core": "10.9.0",
+ "@vueuse/shared": "10.9.0",
+ "vue-demi": ">=0.14.7"
+ }
+ },
+ "node_modules/@vueuse/components/node_modules/vue-demi": {
+ "version": "0.14.7",
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz",
+ "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==",
+ "hasInstallScript": true,
+ "bin": {
+ "vue-demi-fix": "bin/vue-demi-fix.js",
+ "vue-demi-switch": "bin/vue-demi-switch.js"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ },
+ "peerDependencies": {
+ "@vue/composition-api": "^1.0.0-rc.1",
+ "vue": "^3.0.0-0 || ^2.6.0"
+ },
+ "peerDependenciesMeta": {
+ "@vue/composition-api": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@vueuse/core": {
"version": "10.9.0",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.9.0.tgz",
diff --git a/front/package.json b/front/package.json
index dbc1586..69091f5 100644
--- a/front/package.json
+++ b/front/package.json
@@ -10,6 +10,7 @@
},
"dependencies": {
"@fireworks-js/vue": "^2.10.7",
+ "@vueuse/components": "^10.9.0",
"@vueuse/core": "^10.9.0",
"pinia": "^2.1.7",
"reset-css": "^5.0.2",
diff --git a/front/src/components/Game.vue b/front/src/components/Game.vue
new file mode 100644
index 0000000..5820916
--- /dev/null
+++ b/front/src/components/Game.vue
@@ -0,0 +1,151 @@
+
+
+