Skip to content

Repository files navigation

SENTRI — Smart Entry with Behavioral Intelligence

A security SaaS prototype for gated communities that learns suspicious visitor behavior patterns and helps guards, residents, and admins act on it in real time.

Next.js React TypeScript Zustand

Overview

Manual visitor registers are low-signal and slow to search, and give operators no memory of repeat behavior. SENTRI replaces that with face-capture-driven logging, an explainable trust-score engine, and anomaly detection — surfaced across three purpose-built interfaces for guards, residents, and admins.

Live demo: https://sentri-app-tau.vercel.app

Features

  • Trust Score Engine (0–100) — deterministic score from visit frequency, host diversity, late-night entry timing, repeat denials, and external risk signals; every score comes with a factor-level breakdown for auditability
  • Decision bandsSAFE / CAUTION / WATCHLIST / FLAGGED
  • Detection stack — Isolation Forest anomaly signals + a deterministic rule engine, combined into a confidence-aware anomaly feed
  • Three-role ecosystem
    • Guard — React console for pass scanning and gate-side decisions
    • Resident — mobile-first one-tap approve/deny flow
    • Admin — anomaly monitoring, device visibility, user/access policy, surveillance views
  • Role-gated navigation & RBAC via lib/accessControl.ts

Architecture

flowchart LR
  A[ESP32-CAM Gate Unit] --> B[Guard App / Web Console]
  B --> C[Trust Score Engine]
  C --> D[Decision Band SAFE/CAUTION/WATCHLIST/FLAGGED]
  D --> E[Resident Notification]
  D --> F[Admin Anomaly Feed]
  F --> G[Blacklist and Policy Action]
Loading

Tech Stack

Layer Technology
Framework Next.js 16, React 19, TypeScript
State Zustand
Data fetching TanStack React Query, Axios
Motion/UX Framer Motion
Charts Recharts
Auth (demo mode) Role-based local session model

Demo Walkthrough

Demo credentials (local/demo-mode auth):

Role Email Password
Admin admin@sentri.ai Admin@123
Guard guard@sentri.ai Guard@123
Resident resident@sentri.ai Resident@123
  1. Open the landing page and read the problem framing + trust gauge.
  2. Go to /auth, log in as admin.
  3. Open /admin and run Simulate to inject a suspicious visitor.
  4. Visit /admin/anomalies to see risk classification.
  5. Switch to /guard to verify the pass-scanning flow.
  6. Switch to the resident role to see the one-tap approval model.

Getting Started

Prerequisites

  • Node.js 18+

Installation & local development

git clone https://github.com/https-shubhamsahu/sentri.git
cd sentri
npm install
npm run dev

Open http://localhost:3000.

Production build

npm run build
npm run start

Project Structure

src/
├── app/
│   ├── page.tsx                 # Landing page
│   ├── auth/                    # Role login/signup
│   ├── admin/                   # anomalies, devices, surveillance, users, visitors
│   ├── guard/                   # Guard operations + QR verification
│   └── resident/                # Resident workflows (visitors, settings)
├── components/
│   ├── ui/
│   └── next/
├── lib/
│   ├── trustEngine.ts           # Scoring logic
│   └── accessControl.ts         # RBAC matrix
└── store/                       # Zustand app state

hardware/                         # ESP32-CAM + operator-console counterpart (see below)

Hardware Companion

SENTRI's edge unit is an ESP32-CAM based capture module (~₹600 estimated hardware cost). The camera firmware, control-board firmware, and Flask/OpenCV operator console live in hardware/ — see hardware/README.md for setup and wiring.

Compliance & Security Posture

Designed around CERT-In IoT security principles, with role-based access control and explainable scoring to avoid opaque decisioning.

Contributing

Fork the repository, create a feature branch, and open a pull request.

License

No license file is currently present in this repository.

Releases

Packages

Contributors

Languages