Skip to content

Sub-Domain Blueprint: Operations Security

Domain: Operations (maintenance, security, personnel, services) Logical Sub-Domain: Security (Safety & Access) Physical Packages: @sd/mod-operations/security Related Documents: Data Definition Context: This document defines the Access Control logic and Presence Tracking (the "360 View"). Status: Stable (v2.5)

1. Mandate

The Security Sub-Domain protects the physical parameter. It maintains a real-time ledger of Who is On Site (Presence) via Entry/Exit logs (AccessLog). It also handles Incident Reporting for breaches or safety concerns.

2. Capabilities

Capability Description Component
Access Logging Recording every Entry, Exit, or Denial with method (Fob, Manual). AccessLog
Presence Tracking Real-time "Who is here" dashboard. updatePresence
Incident Reporting Formal records of security events. IncidentReport
Identity Resolution Linking physical access to Digital Registry Profiles. logAccess

3. Process Models

A. Gate Check-In (Manual)

Happy Path: Guard logs a Guest.

sequenceDiagram
    participant Guard
    participant Service as SecurityService
    participant Registry as CommunityRegistry
    participant DB as Firestore

    Guard->>Service: logAccess(id="123", type="entry")
    Service->>Registry: getProfile("123")
    Registry-->>Service: "John Doe" (Guest)

    par Log Event
        Service->>DB: createLog({ name: "John Doe", type: "entry", time: NOW })
    and Update Presence
        Service->>DB: setPresence("123", { status: "on_site" })
    end

4. State Machines

Presence Status

stateDiagram-v2
    [*] --> OnSite: Entry Scan
    OnSite --> OffSite: Exit Scan
    OffSite --> OnSite: Re-entry

5. Interface Definitions

SecurityService

  • logAccess(entry): Promise<Log>
  • getOnSitePersonnel(): Promise<Presence[]>
  • getHistory(profileId): Promise<Log[]>

6. Changelog

Date Author Description Reference
2026-01-24 Antigravity Initial creation Implementation Plan