@acuity/nvr
v0.4.6
Published
Acuity NVR Plugin - Network Video Recorder for continuous camera recording
Maintainers
Readme
Acuity NVR
A full-featured Network Video Recorder plugin for Scrypted that provides continuous camera recording, event detection, and a web-based playback UI.
Prerequisites
- Node.js (v18 or later)
- npm
- Docker Desktop (for running a local Scrypted server)
- VSCode (recommended, with the included launch configuration)
Quick Start (Fresh Clone)
After cloning the repository, run these commands to install all dependencies:
# 1. Install plugin dependencies
npm install
# 2. Install UI dependencies
cd ui
npm install
cd ..That's it — you're ready to build and debug.
Running a Local Scrypted Server
A docker-compose.yml is included to spin up a local Scrypted instance for development:
# Start the Scrypted server
docker compose up -d
# Open the Scrypted management console
# https://localhost:10443 (accept the self-signed certificate)
# Create an admin account on first run.Server data is persisted in the scrypted-volume/ directory (gitignored).
Building
# Development build (outputs to out/)
npm run build
# Production build (outputs to dist/plugin.zip)
NODE_ENV=production npm run buildThe build script automatically compiles the plugin TypeScript via Rollup, builds the React UI with Vite, and packages everything into plugin.zip.
Debugging in VSCode
The project includes a pre-configured VSCode debugger that deploys and attaches to a running Scrypted instance:
- Make sure your local Scrypted server is running (see above).
- Log in to the Scrypted CLI (one-time setup):
npx scrypted login localhost - Press F5 in VSCode (or run the Scrypted Debugger launch configuration).
This will build the plugin, deploy it to your local Scrypted server, and attach the debugger. The debug host is configured in .vscode/settings.json (scrypted.debugHost).
Deploying Without Debugging
To deploy the plugin to a Scrypted server without attaching the debugger:
npx scrypted login <host>
npm run scrypted-deploy <host>Running Tests
# Watch mode
npm test
# Single run
npm run test:runProject Structure
nvr/
├── src/ # Plugin source (TypeScript)
│ ├── main.ts # Plugin entry point
│ ├── recording-engine.ts
│ ├── storage-manager.ts
│ ├── database.ts
│ ├── http-handler.ts
│ ├── nvr-mixin.ts
│ ├── webrtc-relay.ts
│ ├── types.ts
│ └── __tests__/ # Vitest test files
├── ui/ # Web UI (React + Vite)
│ ├── src/
│ │ ├── pages/ # Dashboard, Recordings, Timeline, Grid, Detections
│ │ ├── components/ # Reusable UI components
│ │ ├── api/ # API client
│ │ └── context/ # React contexts (theme, etc.)
│ └── package.json # UI-specific dependencies
├── scripts/
│ └── build-plugin.js # Custom build script (Rollup + Vite + zip)
├── docker-compose.yml # Local Scrypted dev server
├── .vscode/ # VSCode debugger & task configs
├── package.json # Plugin dependencies & scripts
└── tsconfig.jsonLicense
ISC
