From eda622b6e3d02e93a93f90cb5b92db5f44dae04b Mon Sep 17 00:00:00 2001
From: aceberg <1502200+aceberg@users.noreply.github.com>
Date: Sat, 15 Mar 2025 18:38:41 +0700
Subject: [PATCH 01/10] SolidJS, split back/front
---
.goreleaser.yaml => backend/.goreleaser.yaml | 0
backend/LICENSE | 21 +
Makefile => backend/Makefile | 0
{cmd => backend/cmd}/WatchYourLAN/main.go | 0
{configs => backend/configs}/install.sh | 0
{configs => backend/configs}/postinstall.sh | 0
.../configs}/watchyourlan.service | 0
go.mod => backend/go.mod | 18 +-
go.sum => backend/go.sum | 62 +-
{internal => backend/internal}/arp/arpscan.go | 0
{internal => backend/internal}/check/error.go | 0
{internal => backend/internal}/check/file.go | 0
.../internal}/conf/getconfig.go | 0
.../internal}/db/choose_db.go | 0
{internal => backend/internal}/db/connect.go | 0
{internal => backend/internal}/db/edit.go | 0
.../internal}/db/quote_str.go | 0
.../internal}/db/select-exec.go | 0
.../internal}/influx/influx.go | 0
.../internal}/models/models.go | 0
.../internal}/notify/shout.go | 0
.../internal}/portscan/scan.go | 0
{internal => backend/internal}/web/api.go | 0
{internal => backend/internal}/web/config.go | 0
.../internal}/web/const-var.go | 0
.../internal}/web/functions.go | 0
{internal => backend/internal}/web/host.go | 0
{internal => backend/internal}/web/index.go | 0
.../internal}/web/public/box.svg | 0
.../internal}/web/public/css/index.css | 0
.../internal}/web/public/favicon.png | Bin
.../internal}/web/public/js/filter-search.js | 0
.../internal}/web/public/js/hist-html.js | 0
.../internal}/web/public/js/history.js | 0
.../internal}/web/public/js/host-scan.js | 0
.../internal}/web/public/js/host.js | 0
.../internal}/web/public/js/index.js | 0
.../internal}/web/public/js/notify.js | 0
.../internal}/web/public/js/refresh.js | 0
.../internal}/web/public/js/sort.js | 0
.../internal}/web/public/version | 0
.../internal}/web/routines-upd.go | 0
.../internal}/web/scan-routine.go | 0
.../internal}/web/templates/config.html | 0
.../internal}/web/templates/footer.html | 0
.../internal}/web/templates/header.html | 0
.../internal}/web/templates/history.html | 0
.../internal}/web/templates/host.html | 0
.../internal}/web/templates/index.html | 0
.../internal}/web/trim-history.go | 0
{internal => backend/internal}/web/webgui.go | 0
frontend/.gitignore | 24 +
frontend/README.md | 28 +
frontend/index.html | 13 +
frontend/package-lock.json | 1645 +++++++++++++++++
frontend/package.json | 19 +
frontend/src/App.css | 0
frontend/src/App.tsx | 14 +
frontend/src/index.tsx | 7 +
frontend/src/vite-env.d.ts | 1 +
frontend/tsconfig.app.json | 27 +
frontend/tsconfig.json | 7 +
frontend/tsconfig.node.json | 24 +
frontend/vite.config.ts | 6 +
64 files changed, 1873 insertions(+), 43 deletions(-)
rename .goreleaser.yaml => backend/.goreleaser.yaml (100%)
create mode 100644 backend/LICENSE
rename Makefile => backend/Makefile (100%)
rename {cmd => backend/cmd}/WatchYourLAN/main.go (100%)
rename {configs => backend/configs}/install.sh (100%)
rename {configs => backend/configs}/postinstall.sh (100%)
rename {configs => backend/configs}/watchyourlan.service (100%)
rename go.mod => backend/go.mod (85%)
rename go.sum => backend/go.sum (86%)
rename {internal => backend/internal}/arp/arpscan.go (100%)
rename {internal => backend/internal}/check/error.go (100%)
rename {internal => backend/internal}/check/file.go (100%)
rename {internal => backend/internal}/conf/getconfig.go (100%)
rename {internal => backend/internal}/db/choose_db.go (100%)
rename {internal => backend/internal}/db/connect.go (100%)
rename {internal => backend/internal}/db/edit.go (100%)
rename {internal => backend/internal}/db/quote_str.go (100%)
rename {internal => backend/internal}/db/select-exec.go (100%)
rename {internal => backend/internal}/influx/influx.go (100%)
rename {internal => backend/internal}/models/models.go (100%)
rename {internal => backend/internal}/notify/shout.go (100%)
rename {internal => backend/internal}/portscan/scan.go (100%)
rename {internal => backend/internal}/web/api.go (100%)
rename {internal => backend/internal}/web/config.go (100%)
rename {internal => backend/internal}/web/const-var.go (100%)
rename {internal => backend/internal}/web/functions.go (100%)
rename {internal => backend/internal}/web/host.go (100%)
rename {internal => backend/internal}/web/index.go (100%)
rename {internal => backend/internal}/web/public/box.svg (100%)
rename {internal => backend/internal}/web/public/css/index.css (100%)
rename {internal => backend/internal}/web/public/favicon.png (100%)
rename {internal => backend/internal}/web/public/js/filter-search.js (100%)
rename {internal => backend/internal}/web/public/js/hist-html.js (100%)
rename {internal => backend/internal}/web/public/js/history.js (100%)
rename {internal => backend/internal}/web/public/js/host-scan.js (100%)
rename {internal => backend/internal}/web/public/js/host.js (100%)
rename {internal => backend/internal}/web/public/js/index.js (100%)
rename {internal => backend/internal}/web/public/js/notify.js (100%)
rename {internal => backend/internal}/web/public/js/refresh.js (100%)
rename {internal => backend/internal}/web/public/js/sort.js (100%)
rename {internal => backend/internal}/web/public/version (100%)
rename {internal => backend/internal}/web/routines-upd.go (100%)
rename {internal => backend/internal}/web/scan-routine.go (100%)
rename {internal => backend/internal}/web/templates/config.html (100%)
rename {internal => backend/internal}/web/templates/footer.html (100%)
rename {internal => backend/internal}/web/templates/header.html (100%)
rename {internal => backend/internal}/web/templates/history.html (100%)
rename {internal => backend/internal}/web/templates/host.html (100%)
rename {internal => backend/internal}/web/templates/index.html (100%)
rename {internal => backend/internal}/web/trim-history.go (100%)
rename {internal => backend/internal}/web/webgui.go (100%)
create mode 100644 frontend/.gitignore
create mode 100644 frontend/README.md
create mode 100644 frontend/index.html
create mode 100644 frontend/package-lock.json
create mode 100644 frontend/package.json
create mode 100644 frontend/src/App.css
create mode 100644 frontend/src/App.tsx
create mode 100644 frontend/src/index.tsx
create mode 100644 frontend/src/vite-env.d.ts
create mode 100644 frontend/tsconfig.app.json
create mode 100644 frontend/tsconfig.json
create mode 100644 frontend/tsconfig.node.json
create mode 100644 frontend/vite.config.ts
diff --git a/.goreleaser.yaml b/backend/.goreleaser.yaml
similarity index 100%
rename from .goreleaser.yaml
rename to backend/.goreleaser.yaml
diff --git a/backend/LICENSE b/backend/LICENSE
new file mode 100644
index 0000000..aaaff2c
--- /dev/null
+++ b/backend/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 aceberg
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Makefile b/backend/Makefile
similarity index 100%
rename from Makefile
rename to backend/Makefile
diff --git a/cmd/WatchYourLAN/main.go b/backend/cmd/WatchYourLAN/main.go
similarity index 100%
rename from cmd/WatchYourLAN/main.go
rename to backend/cmd/WatchYourLAN/main.go
diff --git a/configs/install.sh b/backend/configs/install.sh
similarity index 100%
rename from configs/install.sh
rename to backend/configs/install.sh
diff --git a/configs/postinstall.sh b/backend/configs/postinstall.sh
similarity index 100%
rename from configs/postinstall.sh
rename to backend/configs/postinstall.sh
diff --git a/configs/watchyourlan.service b/backend/configs/watchyourlan.service
similarity index 100%
rename from configs/watchyourlan.service
rename to backend/configs/watchyourlan.service
diff --git a/go.mod b/backend/go.mod
similarity index 85%
rename from go.mod
rename to backend/go.mod
index a85297e..1d68eea 100644
--- a/go.mod
+++ b/backend/go.mod
@@ -1,6 +1,6 @@
module github.com/aceberg/WatchYourLAN
-go 1.23.1
+go 1.23.6
require (
github.com/containrrr/shoutrrr v0.8.0
@@ -9,7 +9,7 @@ require (
github.com/jmoiron/sqlx v1.4.0
github.com/lib/pq v1.10.9
github.com/spf13/viper v1.19.0
- modernc.org/sqlite v1.33.1
+ modernc.org/sqlite v1.36.1
)
require (
@@ -28,7 +28,6 @@ require (
github.com/go-playground/validator/v10 v10.20.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/google/uuid v1.6.0 // indirect
- github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect
github.com/json-iterator/go v1.1.12 // indirect
@@ -57,17 +56,14 @@ require (
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
- golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect
+ golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.25.0 // indirect
- golang.org/x/sys v0.22.0 // indirect
+ golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
- modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect
- modernc.org/libc v1.55.3 // indirect
- modernc.org/mathutil v1.6.0 // indirect
- modernc.org/memory v1.8.0 // indirect
- modernc.org/strutil v1.2.0 // indirect
- modernc.org/token v1.1.0 // indirect
+ modernc.org/libc v1.61.13 // indirect
+ modernc.org/mathutil v1.7.1 // indirect
+ modernc.org/memory v1.8.2 // indirect
)
diff --git a/go.sum b/backend/go.sum
similarity index 86%
rename from go.sum
rename to backend/go.sum
index 6ce9acf..eed67b2 100644
--- a/go.sum
+++ b/backend/go.sum
@@ -57,8 +57,6 @@ github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlG
github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
-github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/influxdata/influxdb-client-go/v2 v2.14.0 h1:AjbBfJuq+QoaXNcrova8smSjwJdUHnwvfjMF71M1iI4=
@@ -159,21 +157,23 @@ golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
-golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 h1:mchzmB1XO2pMaKFRqk/+MV3mgGG96aqaPXaMifQU47w=
-golang.org/x/exp v0.0.0-20231108232855-2478ac86f678/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE=
-golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
-golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
+golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
+golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
+golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
+golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
+golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
+golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
-golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
+golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
-golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw=
-golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
+golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=
+golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -184,30 +184,28 @@ gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-modernc.org/cc/v4 v4.21.4 h1:3Be/Rdo1fpr8GrQ7IVw9OHtplU4gWbb+wNgeoBMmGLQ=
-modernc.org/cc/v4 v4.21.4/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ=
-modernc.org/ccgo/v4 v4.19.2 h1:lwQZgvboKD0jBwdaeVCTouxhxAyN6iawF3STraAal8Y=
-modernc.org/ccgo/v4 v4.19.2/go.mod h1:ysS3mxiMV38XGRTTcgo0DQTeTmAO4oCmJl1nX9VFI3s=
+modernc.org/cc/v4 v4.24.4 h1:TFkx1s6dCkQpd6dKurBNmpo+G8Zl4Sq/ztJ+2+DEsh0=
+modernc.org/cc/v4 v4.24.4/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0=
+modernc.org/ccgo/v4 v4.23.16 h1:Z2N+kk38b7SfySC1ZkpGLN2vthNJP1+ZzGZIlH7uBxo=
+modernc.org/ccgo/v4 v4.23.16/go.mod h1:nNma8goMTY7aQZQNTyN9AIoJfxav4nvTnvKThAeMDdo=
modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE=
modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ=
-modernc.org/gc/v2 v2.4.1 h1:9cNzOqPyMJBvrUipmynX0ZohMhcxPtMccYgGOJdOiBw=
-modernc.org/gc/v2 v2.4.1/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU=
-modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI=
-modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4=
-modernc.org/libc v1.55.3 h1:AzcW1mhlPNrRtjS5sS+eW2ISCgSOLLNyFzRh/V3Qj/U=
-modernc.org/libc v1.55.3/go.mod h1:qFXepLhz+JjFThQ4kzwzOjA/y/artDeg+pcYnY+Q83w=
-modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
-modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo=
-modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E=
-modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU=
-modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
-modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
-modernc.org/sortutil v1.2.0 h1:jQiD3PfS2REGJNzNCMMaLSp/wdMNieTbKX920Cqdgqc=
-modernc.org/sortutil v1.2.0/go.mod h1:TKU2s7kJMf1AE84OoiGppNHJwvB753OYfNl2WRb++Ss=
-modernc.org/sqlite v1.33.1 h1:trb6Z3YYoeM9eDL1O8do81kP+0ejv+YzgyFo+Gwy0nM=
-modernc.org/sqlite v1.33.1/go.mod h1:pXV2xHxhzXZsgT/RtTFAPY6JJDEvOTcTdwADQCCWD4k=
-modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
-modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0=
+modernc.org/gc/v2 v2.6.3 h1:aJVhcqAte49LF+mGveZ5KPlsp4tdGdAOT4sipJXADjw=
+modernc.org/gc/v2 v2.6.3/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
+modernc.org/libc v1.61.13 h1:3LRd6ZO1ezsFiX1y+bHd1ipyEHIJKvuprv0sLTBwLW8=
+modernc.org/libc v1.61.13/go.mod h1:8F/uJWL/3nNil0Lgt1Dpz+GgkApWh04N3el3hxJcA6E=
+modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
+modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
+modernc.org/memory v1.8.2 h1:cL9L4bcoAObu4NkxOlKWBWtNHIsnnACGF/TbqQ6sbcI=
+modernc.org/memory v1.8.2/go.mod h1:ZbjSvMO5NQ1A2i3bWeDiVMxIorXwdClKE/0SZ+BMotU=
+modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8=
+modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
+modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
+modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
+modernc.org/sqlite v1.36.1 h1:bDa8BJUH4lg6EGkLbahKe/8QqoF8p9gArSc6fTqYhyQ=
+modernc.org/sqlite v1.36.1/go.mod h1:7MPwH7Z6bREicF9ZVUR78P1IKuxfZ8mRIDHD0iD+8TU=
+modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
+modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
diff --git a/internal/arp/arpscan.go b/backend/internal/arp/arpscan.go
similarity index 100%
rename from internal/arp/arpscan.go
rename to backend/internal/arp/arpscan.go
diff --git a/internal/check/error.go b/backend/internal/check/error.go
similarity index 100%
rename from internal/check/error.go
rename to backend/internal/check/error.go
diff --git a/internal/check/file.go b/backend/internal/check/file.go
similarity index 100%
rename from internal/check/file.go
rename to backend/internal/check/file.go
diff --git a/internal/conf/getconfig.go b/backend/internal/conf/getconfig.go
similarity index 100%
rename from internal/conf/getconfig.go
rename to backend/internal/conf/getconfig.go
diff --git a/internal/db/choose_db.go b/backend/internal/db/choose_db.go
similarity index 100%
rename from internal/db/choose_db.go
rename to backend/internal/db/choose_db.go
diff --git a/internal/db/connect.go b/backend/internal/db/connect.go
similarity index 100%
rename from internal/db/connect.go
rename to backend/internal/db/connect.go
diff --git a/internal/db/edit.go b/backend/internal/db/edit.go
similarity index 100%
rename from internal/db/edit.go
rename to backend/internal/db/edit.go
diff --git a/internal/db/quote_str.go b/backend/internal/db/quote_str.go
similarity index 100%
rename from internal/db/quote_str.go
rename to backend/internal/db/quote_str.go
diff --git a/internal/db/select-exec.go b/backend/internal/db/select-exec.go
similarity index 100%
rename from internal/db/select-exec.go
rename to backend/internal/db/select-exec.go
diff --git a/internal/influx/influx.go b/backend/internal/influx/influx.go
similarity index 100%
rename from internal/influx/influx.go
rename to backend/internal/influx/influx.go
diff --git a/internal/models/models.go b/backend/internal/models/models.go
similarity index 100%
rename from internal/models/models.go
rename to backend/internal/models/models.go
diff --git a/internal/notify/shout.go b/backend/internal/notify/shout.go
similarity index 100%
rename from internal/notify/shout.go
rename to backend/internal/notify/shout.go
diff --git a/internal/portscan/scan.go b/backend/internal/portscan/scan.go
similarity index 100%
rename from internal/portscan/scan.go
rename to backend/internal/portscan/scan.go
diff --git a/internal/web/api.go b/backend/internal/web/api.go
similarity index 100%
rename from internal/web/api.go
rename to backend/internal/web/api.go
diff --git a/internal/web/config.go b/backend/internal/web/config.go
similarity index 100%
rename from internal/web/config.go
rename to backend/internal/web/config.go
diff --git a/internal/web/const-var.go b/backend/internal/web/const-var.go
similarity index 100%
rename from internal/web/const-var.go
rename to backend/internal/web/const-var.go
diff --git a/internal/web/functions.go b/backend/internal/web/functions.go
similarity index 100%
rename from internal/web/functions.go
rename to backend/internal/web/functions.go
diff --git a/internal/web/host.go b/backend/internal/web/host.go
similarity index 100%
rename from internal/web/host.go
rename to backend/internal/web/host.go
diff --git a/internal/web/index.go b/backend/internal/web/index.go
similarity index 100%
rename from internal/web/index.go
rename to backend/internal/web/index.go
diff --git a/internal/web/public/box.svg b/backend/internal/web/public/box.svg
similarity index 100%
rename from internal/web/public/box.svg
rename to backend/internal/web/public/box.svg
diff --git a/internal/web/public/css/index.css b/backend/internal/web/public/css/index.css
similarity index 100%
rename from internal/web/public/css/index.css
rename to backend/internal/web/public/css/index.css
diff --git a/internal/web/public/favicon.png b/backend/internal/web/public/favicon.png
similarity index 100%
rename from internal/web/public/favicon.png
rename to backend/internal/web/public/favicon.png
diff --git a/internal/web/public/js/filter-search.js b/backend/internal/web/public/js/filter-search.js
similarity index 100%
rename from internal/web/public/js/filter-search.js
rename to backend/internal/web/public/js/filter-search.js
diff --git a/internal/web/public/js/hist-html.js b/backend/internal/web/public/js/hist-html.js
similarity index 100%
rename from internal/web/public/js/hist-html.js
rename to backend/internal/web/public/js/hist-html.js
diff --git a/internal/web/public/js/history.js b/backend/internal/web/public/js/history.js
similarity index 100%
rename from internal/web/public/js/history.js
rename to backend/internal/web/public/js/history.js
diff --git a/internal/web/public/js/host-scan.js b/backend/internal/web/public/js/host-scan.js
similarity index 100%
rename from internal/web/public/js/host-scan.js
rename to backend/internal/web/public/js/host-scan.js
diff --git a/internal/web/public/js/host.js b/backend/internal/web/public/js/host.js
similarity index 100%
rename from internal/web/public/js/host.js
rename to backend/internal/web/public/js/host.js
diff --git a/internal/web/public/js/index.js b/backend/internal/web/public/js/index.js
similarity index 100%
rename from internal/web/public/js/index.js
rename to backend/internal/web/public/js/index.js
diff --git a/internal/web/public/js/notify.js b/backend/internal/web/public/js/notify.js
similarity index 100%
rename from internal/web/public/js/notify.js
rename to backend/internal/web/public/js/notify.js
diff --git a/internal/web/public/js/refresh.js b/backend/internal/web/public/js/refresh.js
similarity index 100%
rename from internal/web/public/js/refresh.js
rename to backend/internal/web/public/js/refresh.js
diff --git a/internal/web/public/js/sort.js b/backend/internal/web/public/js/sort.js
similarity index 100%
rename from internal/web/public/js/sort.js
rename to backend/internal/web/public/js/sort.js
diff --git a/internal/web/public/version b/backend/internal/web/public/version
similarity index 100%
rename from internal/web/public/version
rename to backend/internal/web/public/version
diff --git a/internal/web/routines-upd.go b/backend/internal/web/routines-upd.go
similarity index 100%
rename from internal/web/routines-upd.go
rename to backend/internal/web/routines-upd.go
diff --git a/internal/web/scan-routine.go b/backend/internal/web/scan-routine.go
similarity index 100%
rename from internal/web/scan-routine.go
rename to backend/internal/web/scan-routine.go
diff --git a/internal/web/templates/config.html b/backend/internal/web/templates/config.html
similarity index 100%
rename from internal/web/templates/config.html
rename to backend/internal/web/templates/config.html
diff --git a/internal/web/templates/footer.html b/backend/internal/web/templates/footer.html
similarity index 100%
rename from internal/web/templates/footer.html
rename to backend/internal/web/templates/footer.html
diff --git a/internal/web/templates/header.html b/backend/internal/web/templates/header.html
similarity index 100%
rename from internal/web/templates/header.html
rename to backend/internal/web/templates/header.html
diff --git a/internal/web/templates/history.html b/backend/internal/web/templates/history.html
similarity index 100%
rename from internal/web/templates/history.html
rename to backend/internal/web/templates/history.html
diff --git a/internal/web/templates/host.html b/backend/internal/web/templates/host.html
similarity index 100%
rename from internal/web/templates/host.html
rename to backend/internal/web/templates/host.html
diff --git a/internal/web/templates/index.html b/backend/internal/web/templates/index.html
similarity index 100%
rename from internal/web/templates/index.html
rename to backend/internal/web/templates/index.html
diff --git a/internal/web/trim-history.go b/backend/internal/web/trim-history.go
similarity index 100%
rename from internal/web/trim-history.go
rename to backend/internal/web/trim-history.go
diff --git a/internal/web/webgui.go b/backend/internal/web/webgui.go
similarity index 100%
rename from internal/web/webgui.go
rename to backend/internal/web/webgui.go
diff --git a/frontend/.gitignore b/frontend/.gitignore
new file mode 100644
index 0000000..a547bf3
--- /dev/null
+++ b/frontend/.gitignore
@@ -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?
diff --git a/frontend/README.md b/frontend/README.md
new file mode 100644
index 0000000..167c567
--- /dev/null
+++ b/frontend/README.md
@@ -0,0 +1,28 @@
+## Usage
+
+```bash
+$ npm install # or pnpm install or yarn install
+```
+
+### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)
+
+## Available Scripts
+
+In the project directory, you can run:
+
+### `npm run dev`
+
+Runs the app in the development mode.
+Open [http://localhost:5173](http://localhost:5173) to view it in the browser.
+
+### `npm run build`
+
+Builds the app for production to the `dist` folder.
+It correctly bundles Solid in production mode and optimizes the build for the best performance.
+
+The build is minified and the filenames include the hashes.
+Your app is ready to be deployed!
+
+## Deployment
+
+Learn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html)
diff --git a/frontend/index.html b/frontend/index.html
new file mode 100644
index 0000000..7b0e298
--- /dev/null
+++ b/frontend/index.html
@@ -0,0 +1,13 @@
+
+
+
| + | Name | +Iface | +IP | +MAC | +Hardware | +Date | +Known | +Online | +
|---|---|---|---|---|---|---|---|---|
| {index()+1}. | +{host.Name} | +{host.Iface} | +{host.IP} | +{host.Mac} | +{host.Hw} | +{host.Date} | +{host.Known} | +{host.Now} | +
| Name | Iface | IP | MAC | Hardware | Date | Known | Online |
|---|
| Name | Iface | IP | MAC | Hardware | Date | Known | Online | ||
|---|---|---|---|---|---|---|---|---|---|
| . | ');function qe(e){const[t,n]=L(e.host.Name),l="http://"+e.host.IP;let i=Fe();e.host.Now==1&&(i=Ke());let s=!1;e.host.Known==1&&(s=!0);const o=async f=>{n(f),await se(e.host.ID,t(),"")},r=async()=>{await se(e.host.ID,t(),"toggle")};return(()=>{var f=Ve(),a=f.firstChild,u=a.firstChild,c=a.nextSibling,S=c.nextSibling,b=S.nextSibling,_=b.firstChild,m=b.nextSibling,v=m.nextSibling,A=v.nextSibling,$=A.nextSibling,p=$.firstChild,w=p.firstChild,x=$.nextSibling;return y(a,()=>e.index,u),y(c,N($e,{get when(){return we()},get fallback(){return t()},get children(){var E=Re();return E.$$input=Q=>o(Q.target.value),K(()=>E.value=t()),E}})),y(S,()=>e.host.Iface),He(_,"href",l),y(_,()=>e.host.IP),y(m,()=>e.host.Mac),y(v,()=>e.host.Hw),y(A,()=>e.host.Date),w.$$click=r,w.checked=s,y(x,i),f})()}z(["input","click"]);var Ge=C(' |