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.
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
- 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 bands —
SAFE/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
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]
| 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 credentials (local/demo-mode auth):
| Role | Password | |
|---|---|---|
| Admin | admin@sentri.ai |
Admin@123 |
| Guard | guard@sentri.ai |
Guard@123 |
| Resident | resident@sentri.ai |
Resident@123 |
- Open the landing page and read the problem framing + trust gauge.
- Go to
/auth, log in as admin. - Open
/adminand run Simulate to inject a suspicious visitor. - Visit
/admin/anomaliesto see risk classification. - Switch to
/guardto verify the pass-scanning flow. - Switch to the resident role to see the one-tap approval model.
- Node.js 18+
git clone https://github.com/https-shubhamsahu/sentri.git
cd sentri
npm install
npm run devOpen http://localhost:3000.
npm run build
npm run startsrc/
├── 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)
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.
Designed around CERT-In IoT security principles, with role-based access control and explainable scoring to avoid opaque decisioning.
Fork the repository, create a feature branch, and open a pull request.
No license file is currently present in this repository.