How cr1py/pi-cams works
PiCams is a home-surveillance application with a React Native UI and a Wt/SQLite backend. The documented workflow is users managing accounts and subscriptions, a device producing an event, and the backend recording it and creating notifications for matching subscriptions; event listing exposes history. The README also describes motion detection and facial recognition, while the tree contains camera and motion-detector modules. Source evidence is incomplete, so UI-to-API and detector-to-device links are not asserted.
Main entry points: navbar.tsx Navigation · main.cpp HTTP server · EventController.cpp Event controller · homesecurity.db SQLite database
Components 20
User interface
- Security app
frontend/securityUI/App.tsx - Signup
frontend/securityUI/app/signup.tsx - Home view
frontend/securityUI/app/home.tsx - Devices view
frontend/securityUI/app/devices.tsx - Event history
frontend/securityUI/app/history.tsx - Display view
frontend/securityUI/app/display.tsx - Settings view
frontend/securityUI/app/settings.tsx - Navigation
frontend/securityUI/app/navbar.tsx
Backend API
- HTTP server
backend/main.cpp - User endpoints
backend/controllers/UsersResource.cpp - Subscription endpoints
backend/controllers/SubscriptionsResource.cpp - Event endpoints
backend/controllers/EventsResource.cpp
Device detection
- Device event thread
backend/device/DeviceController.cpp - Motion detection
backend/models/MotionDetector.py - Camera processing
backend/models/camera.py
Events and persistence
- Event controller
backend/controllers/EventController.cpp - Domain models
backend/models/models.cpp - SQLite database
homesecurity.db
Other components
- Resident
- Email service
Connections 17
- Resident → Security app: uses
README.md - HTTP server → User endpoints: registers
backend/main.cpp - HTTP server → Subscription endpoints: registers
backend/main.cpp - HTTP server → Event endpoints: registers
backend/main.cpp - HTTP server → Device event thread: starts thread
backend/main.cpp - Device event thread → Event controller: fires events
backend/device/DeviceController.cpp - Event controller → Domain models: creates records
backend/controllers/EventController.cpp - Event controller → SQLite database: reads and writes
backend/controllers/EventController.cpp - Event controller → Email service: sends alerts
backend/controllers/EventController.cpp - User endpoints → SQLite database: manages users
backend/controllers/UsersResource.cpp - Subscription endpoints → SQLite database: manages subscriptions
backend/controllers/SubscriptionsResource.cpp - Event endpoints → SQLite database: lists events
README.md - Navigation → Home view: links to
frontend/securityUI/app/navbar.tsx - Navigation → Devices view: links to
frontend/securityUI/app/navbar.tsx - Navigation → Event history: links to
frontend/securityUI/app/navbar.tsx - Navigation → Settings view: links to
frontend/securityUI/app/navbar.tsx - Navigation → Signup: links to
frontend/securityUI/app/navbar.tsx