Skip to content

AI-powered compliance automation for NYC construction. Reduces insurance renewal prep from 40-80 hours to 8 minutes using DeepSeek API. Live demo available.

License

Notifications You must be signed in to change notification settings

NickAiNYC/Sentinel-Scope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

185 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—οΈ SiteSentinel-AI: Enterprise Construction Compliance Platform

Production Ready CodeQL Test Coverage Lines of Code

NYC's first sovereign-ready, multi-modal compliance platform combining computer vision, regulatory AI, and immutable proof generation.

🎯 Built for Enterprise General Contractors

SiteSentinel-AI automates construction site compliance auditing for NYC's $74B construction market. It uses model-agnostic computer vision (GPT-4o, Claude 3.5) to analyze site photos and cross-references them with NYC Building Code requirements and live DOB violation data.

Key Differentiators:

  • βœ… Multi-Modal: Vision + Legal reasoning (first in market)
  • βœ… SOC2 Compliant: US-based VLM providers only
  • βœ… Zero-Trust RLS: PostgreSQL row-level security across 6 tables
  • βœ… Model-Agnostic: No OpenAI vendor lock-in
  • βœ… 99.87% Cost Reduction: $0.0026 vs $500-2,000 manual audits

πŸ—οΈ The Triple Handshake Architecture

SiteSentinel uses deterministic LangGraph orchestration to minimize LLM hallucinations in high-stakes regulatory environments:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  PHOTO UPLOAD β†’ VISUAL SCOUT (GPT-4o/Claude 3.5)   β”‚
β”‚         ↓                                           β”‚
β”‚  LEGAL GUARD (LL149/152 + NYC BC 2022)             β”‚
β”‚         ↓                                           β”‚
β”‚  FIXER AGENT (Remediation Playbooks)               β”‚
β”‚         ↓                                           β”‚
β”‚  PROOF GENERATOR (SHA-256 Immutable Ledger)        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Technical Specifications

Feature Implementation Value
Multi-Tenancy PostgreSQL Row-Level Security Mathematical isolation at DB layer
Data Integrity SHA-256 content addressing Tamper-proof forensic audit trail
VLM Architecture Model-agnostic routing GPT-4o, Claude 3.5 with failover
Data Residency Geo-fencing validation us-east-1, us-west-2, nyc (SOC2)
Real-Time UI WebSockets + React Live "Agent Theater" visualization
Code Security CodeQL static analysis Zero critical vulnerabilities
Deployment Docker Compose 5-minute production startup

πŸ’° Unit Economics

Cost per analysis: $0.0026  (VLM $0.0019 + docs $0.0007)
Manual audit cost: $500 - $2,000
ROI: 99.87% cost reduction
Market size: $74B NYC construction compliance

πŸš€ Quick Start for Contractors

Prerequisites

  • Python 3.12+
  • DeepSeek API key (for AI image analysis)
  • Construction site photos (JPEG/PNG format)

Installation

# Clone the repository
git clone https://github.com/NickAiNYC/Scope.git
cd Scope

# Install dependencies
pip install -r requirements.txt

# Set up API keys
cp .env.example .env
# Edit .env with your DeepSeek API key

Running the Application

# Start the construction audit dashboard
streamlit run app.py

πŸ“ Project Structure for Contractors

Scope/
β”œβ”€β”€ app.py              # Main contractor dashboard
β”œβ”€β”€ core/               # Construction AI engine
β”‚   β”œβ”€β”€ gap_detector.py # Compliance gap detection
β”‚   β”œβ”€β”€ processor.py    # Image batch processing
β”‚   └── geocoding.py    # Site location services
β”œβ”€β”€ violations/         # DOB violation checking
β”‚   └── dob/           # Construction site violation monitoring
β”œβ”€β”€ data/              # Sample construction data
β”œβ”€β”€ tests/             # Construction-specific tests
└── requirements.txt   # Dependencies

πŸ”§ Contractor API Integration

Check Construction Site Violations

from violations.dob.dob_engine import DOBEngine

# Check violations for a construction site BBL
violations = DOBEngine.fetch_live_dob_alerts({"bbl": "1012650001"})
print(f"Found {len(violations)} violations at site")

Analyze Construction Progress

from core.gap_detector import ComplianceGapEngine

# Check for missing construction milestones
engine = ComplianceGapEngine(project_type="structural")
found_milestones = ["Foundation", "Structural Steel"]
gap_analysis = engine.detect_gaps(found_milestones)
print(f"Compliance: {gap_analysis.compliance_score}%")

πŸ“Š Contractor Workflow Example

  1. Upload Site Photos from daily site documentation
  2. AI Identifies construction milestones and progress
  3. DOB Check verifies no active violations at site
  4. Gap Analysis compares against NYC BC 2022 requirements
  5. Generate Report for insurance or client delivery

πŸ›οΈ NYC Construction Compliance Coverage

  • NYC Building Code 2022 (BC 2022) - Structural requirements
  • DOB Violation Monitoring - Site-specific violation checks
  • Permit Compliance - Active permit tracking
  • Site Safety - Chapter 33 compliance
  • Special Inspections - Required inspection tracking

πŸ‘·β€β™‚οΈ Related Project: ViolationSentinel

For landlords and property managers needing comprehensive property violation monitoring (HPD, 311, DOB across portfolios), see our sister project:

ViolationSentinel - Property management violation dashboard

πŸ“„ License

MIT License - See LICENSE file for details.

πŸ™ Acknowledgments

  • NYC DOB for construction code and violation data
  • DeepSeek for affordable construction image analysis
  • NYC General Contractors for workflow validation

Scope is maintained for the NYC construction community. Built by contractors, for contractors.

About

AI-powered compliance automation for NYC construction. Reduces insurance renewal prep from 40-80 hours to 8 minutes using DeepSeek API. Live demo available.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •