71 lines
2.0 KiB
Markdown
71 lines
2.0 KiB
Markdown
# Sense
|
|
|
|
Sense is the independently deployable intelligent NVR and video-sensing
|
|
management product in YoVision. It uses Go 1.26.5, PostgreSQL, Vue 3 and
|
|
Element Plus. Brain and Bell are not required for startup or smoke tests.
|
|
|
|
## Toolchain
|
|
|
|
Use the exact versions from the repository root `goadmin-baseline.json`:
|
|
|
|
- Go 1.26.5
|
|
- Node.js 22.22.1
|
|
- pnpm 9.15.1
|
|
|
|
The repositories under `D:\github\goadmin` are read-only references. Do not
|
|
develop Sense inside them.
|
|
|
|
```powershell
|
|
$env:PATH = 'C:\Users\ila20\AppData\Local\Temp\yovision-tools\go1.26.5\go\bin;' + $env:PATH
|
|
powershell -ExecutionPolicy Bypass -File .\Sense\scripts\bootstrap\check-toolchain.ps1
|
|
```
|
|
|
|
## Backend
|
|
|
|
Production/default startup requires an independent PostgreSQL URL. No default
|
|
password or signing secret is provided.
|
|
|
|
```powershell
|
|
cd Sense\server
|
|
$env:SENSE_DATABASE_MODE = 'postgres'
|
|
$env:SENSE_DATABASE_URL = '<provided outside the repository>'
|
|
go run .
|
|
```
|
|
|
|
For an isolated smoke test only:
|
|
|
|
```powershell
|
|
powershell -ExecutionPolicy Bypass -File .\Sense\scripts\bootstrap\smoke.ps1
|
|
```
|
|
|
|
Health endpoints are `GET /healthz` and `GET /readyz`. Upstream demo and code
|
|
generation routes are deliberately not registered.
|
|
|
|
## Frontend
|
|
|
|
```powershell
|
|
cd Sense\ui
|
|
corepack pnpm@9.15.1 install --frozen-lockfile
|
|
corepack pnpm@9.15.1 lint
|
|
corepack pnpm@9.15.1 build
|
|
```
|
|
|
|
The frontend automatically discovers project-local route and store modules.
|
|
Feature tickets add one route module without exposing unrelated GoAdmin demo
|
|
pages.
|
|
|
|
## Windows package
|
|
|
|
With the frozen Go toolchain first in `PATH`, build the backend, frontend and
|
|
ZIP archive with one command from the repository root:
|
|
|
|
```powershell
|
|
cmd /c .\Sense\scripts\package-windows.bat
|
|
```
|
|
|
|
The ignored local artifact is `Sense\dist\sense-windows-amd64.zip`. It contains
|
|
the Windows amd64 server, compiled UI, empty example configuration, upstream
|
|
licenses, a start script and an operations note. Run `start-sense.bat demo` only
|
|
for a temporary local preview; production startup requires externally supplied
|
|
PostgreSQL and secret environment variables.
|