{"id":50679313,"url":"https://github.com/mrazza/cctv-home-occupancy-panel","last_synced_at":"2026-06-08T17:32:21.025Z","repository":{"id":361498650,"uuid":"1254024145","full_name":"mrazza/cctv-home-occupancy-panel","owner":"mrazza","description":"Web dashboard for mrazza/cctv-home-occupancy","archived":false,"fork":false,"pushed_at":"2026-05-30T22:07:42.000Z","size":2454,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T00:10:26.297Z","etag":null,"topics":["nuxtjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrazza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-30T03:55:01.000Z","updated_at":"2026-05-30T22:07:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mrazza/cctv-home-occupancy-panel","commit_stats":null,"previous_names":["mrazza/cctv-home-occupancy-panel"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mrazza/cctv-home-occupancy-panel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrazza%2Fcctv-home-occupancy-panel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrazza%2Fcctv-home-occupancy-panel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrazza%2Fcctv-home-occupancy-panel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrazza%2Fcctv-home-occupancy-panel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrazza","download_url":"https://codeload.github.com/mrazza/cctv-home-occupancy-panel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrazza%2Fcctv-home-occupancy-panel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34073794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nuxtjs"],"created_at":"2026-06-08T17:32:19.269Z","updated_at":"2026-06-08T17:32:21.019Z","avatar_url":"https://github.com/mrazza.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 👁️ CCTV Home Occupancy Panel\n\nA high-performance, real-time presence monitoring and occupancy reconciliation dashboard designed **exclusively** as a companion for the [mrazza/cctv-home-occupancy](https://github.com/mrazza/cctv-home-occupancy) project.\n\n![CCTV Home Occupancy Panel Screenshot](screenshot.png)\n\nThis dashboard is not designed for general-purpose smart security systems; instead, it integrates specifically with the `mrazza/cctv-home-occupancy` Python daemon to display its occupancy levels, event logs, and security tripwire snapshots within a premium glassmorphic user interface.\n\n---\n\n## 🌟 Key Features\n\n* **Real-Time Occupancy Analytics**: Visual status indicators displaying current occupant count, presence state (Occupied vs. Vacant), and live frame processing stats.\n* **Manual State Reconciliation**: An interactive, collapsible dashboard module enabling administrators to forcefully override or calibrate occupancy counts if computer vision tracking falls out of sync (with glassmorphic modal confirmation flows).\n* **Activity \u0026 Motion Timeline**: A chronologically sorted event logger showcasing tripwire entries/exits, movement tracking windows, and timestamps.\n* **Snapshot Lightbox Inspector**: Direct integration with tripwire events to view, zoom, and inspect captured high-definition CCTV security snapshots.\n* **Resilient Offline Detection**: Immediate UI failover triggers and visual status indicators if the underlying `mrazza/cctv-home-occupancy` daemon goes offline or is unreachable.\n* **Sleek Glassmorphism Design System**: Tailored from scratch using pure CSS variables, custom typography, backdrop-filters, subtle gradients, and reactive micro-animations.\n\n---\n\n## 🏗️ Technical Architecture\n\nThis application is built as a highly decoupled Nuxt 4 web app that proxies data dynamically to the `mrazza/cctv-home-occupancy` Python daemon.\n\n```mermaid\ngraph TD\n    C[IP Cameras / CCTV Streams] --\u003e|Video Feed| D[\"cctv-home-occupancy Daemon (:8000)\"]\n    D --\u003e|Real-time Metrics / Snapshots| N[Nuxt 4 Proxy /api]\n    N --\u003e|Dynamic Reactive State| U[Vue 3 Glassmorphic Dashboard UI]\n    U --\u003e|Override Reconciliation Payload| N\n```\n\n### Stack Components:\n* **Framework**: [Nuxt 4](https://nuxt.com/) (Vue 3, Composition API with `\u003cscript setup\u003e`).\n* **Styling Engine**: Pure CSS Variable Design Tokens (Dark-mode, cyber-themed glassmorphism).\n* **Runtime Server**: Nitro Node.js Engine (with dynamic CORS proxy routing).\n* **Testing Suite**: [Vitest](https://vitest.dev/) with Vue Test Utils and Happy DOM.\n\n---\n\n## ⚙️ Environment Configuration\n\nThe dashboard uses runtime variables that can be overridden in production or defined locally in a `.env` file at the root:\n\n```ini\n# Remote CCTV home occupancy API base URL (CORS proxy target)\nNUXT_API_BASE_URL=http://localhost:8000\n\n# Front-end dashboard top-left header title override\nNUXT_PUBLIC_PANEL_TITLE=\"CCTV OCCUPANCY PANEL\"\n```\n\n---\n\n## 🚀 Getting Started\n\n### 1. Prerequisites\nEnsure you have **Node.js (v18.x or later)** installed.\n\n### 2. Install Dependencies\n```bash\nnpm install\n```\n\n### 3. Run in Development Mode\nStart the local server. The Nuxt H3 server handles backend proxy routing automatically.\n```bash\nnpm run dev\n```\nOpen **`http://localhost:3000`** in your browser.\n\n### 4. Build and Preview for Production\nGenerate a production bundle optimized for high-speed serving:\n```bash\n# Build the application\nnpm run build\n\n# Preview the production build locally\nnpm run preview\n```\n\n---\n\n## 🧪 Testing\n\nThe codebase includes an extensive suite of component unit tests and system integration tests to guarantee reliability.\n\n### Run All Unit Tests\n```bash\nnpm run test\n```\n\n### Run Coverage Reports\nGenerates a highly detailed, file-by-file visual code coverage report:\n```bash\nnpm run test:coverage\n```\n*Coverage reports will be output to the `/coverage` directory (configured to be ignored in git).*\n\n---\n\n## 🔗 Integrated API Contracts\n\nThe Nuxt backend proxies these endpoints directly to the `mrazza/cctv-home-occupancy` companion daemon:\n\n### 1. Status Check\n* **Endpoint**: `GET /api/status`\n* **Purpose**: Fetches current household occupancy state, occupant totals, and hardware diagnostic statuses.\n* **Payload Structure**:\n  ```json\n  {\n    \"is_someone_home\": true,\n    \"current_occupancy\": 2,\n    \"system_state\": \"CONNECTED\",\n    \"last_updated\": \"2026-05-30T03:52:12Z\",\n    \"last_processed_frame\": \"2026-05-30T03:52:11Z\"\n  }\n  ```\n\n### 2. Activity Events Log\n* **Endpoint**: `GET /api/events?limit=10`\n* **Purpose**: Pulls list of timeline events, tripwire crossings, and security snapshots.\n* **Payload Structure**:\n  ```json\n  [\n    {\n      \"id\": \"evt_9831a2\",\n      \"timestamp\": \"2026-05-30T03:51:00Z\",\n      \"type\": \"entry\",\n      \"message\": \"Occupant entered via East gate tripwire.\",\n      \"snapshot_url\": \"/api/snapshots/evt_9831a2.jpg\"\n    }\n  ]\n  ```\n\n### 3. State Reconciliation / Reset\n* **Endpoint**: `POST /api/reset`\n* **Purpose**: Forces tracker state alignment when occupants bypass tripwires together.\n* **Payload Structure**:\n  ```json\n  {\n    \"is_someone_home\": true,\n    \"current_occupancy\": 3\n  }\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrazza%2Fcctv-home-occupancy-panel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrazza%2Fcctv-home-occupancy-panel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrazza%2Fcctv-home-occupancy-panel/lists"}