How vickyadityaraj/fivsed works
FIVSED is an embedded-firmware integrity monitoring system with a web operations dashboard. The documented flow begins with STM32-authoritative firmware verification, passes the result through the ESP32 uploader to the web ingestion endpoint, and presents stored telemetry to operators. The repository includes the ESP32 firmware and Next.js application, but not the STM32 implementation or Raspberry Pi system. Unsampled firmware-module wiring is shown only where documented or marked unverified.
Main entry points: fivsed-context.tsx Telemetry state · AppLayout.tsx Protected app shell · page.tsx Dashboard · route.ts Event API
Components 34
Embedded telemetry
- ESP32 controller
firmware/esp32_fivsed_uploader/main.cpp - UART protocol
firmware/esp32_fivsed_uploader/uart_protocol.cpp - Wi-Fi manager
firmware/esp32_fivsed_uploader/wifi_manager.cpp - Device configuration
firmware/esp32_fivsed_uploader/config_storage.cpp - Web uploader
firmware/esp32_fivsed_uploader/web_uploader.cpp
Ingestion and storage
- Event API
app/api/events/route.ts - Runtime event store
lib/server/event-store.ts - Server Supabase client
lib/supabase/server.ts
Application services
- Telemetry state
lib/context/fivsed-context.tsx - Authentication state
lib/context/auth-context.tsx - Browser Supabase client
lib/supabase/client.ts - Domain data types
types/fivsed.ts
Operator workflows
- Dashboard
app/dashboard/page.tsx - Integrity history
app/integrity/page.tsx - Security events
app/events/page.tsx - Alert management
app/alerts/page.tsx - Device inventory
app/devices/page.tsx - Device detail
app/devices/[id]/page.tsx - Verification history
app/history/page.tsx - Architecture view
app/architecture/page.tsx - Account settings
app/settings/page.tsx - Operator profile
app/profile/page.tsx - Sign-in page
app/login/page.tsx
Shared presentation
- Protected app shell
components/layout/AppLayout.tsx - Integrity status card
components/dashboard/IntegrityStatusCard.tsx - Security event chart
components/dashboard/SecurityEventChart.tsx - Verification timeline
components/dashboard/VerificationTimeline.tsx - Active alerts banner
components/dashboard/ActiveAlertsBanner.tsx - Device card
components/devices/DeviceCard.tsx - Event details modal
components/events/EventDetailsModal.tsx - Interactive architecture
components/architecture/InteractiveArchitecture.tsx
Other components
- Security operator
- STM32 authority
- Supabase PostgreSQL
Connections 46
- STM32 authority → ESP32 controller: sends decision
README.md - ESP32 controller → Event API: uploads telemetry
README.md - ESP32 controller → UART protocol: uses protocol
- ESP32 controller → Wi-Fi manager: uses network
- ESP32 controller → Device configuration: loads settings
- ESP32 controller → Web uploader: dispatches upload
- Event API → Runtime event store: records events
app/api/events/route.ts - Event API → Runtime event store: clears runtime data
app/api/events/route.ts - Event API → Server Supabase client: gets client
app/api/events/route.ts - Event API → Supabase PostgreSQL: clears persisted data
app/api/events/route.ts - Server Supabase client → Supabase PostgreSQL: connects to
lib/supabase/server.ts - Telemetry state → Event API: fetches telemetry
lib/context/fivsed-context.tsx - Telemetry state → Event API: acknowledges alerts
lib/context/fivsed-context.tsx - Telemetry state → Browser Supabase client: queries and subscribes
lib/context/fivsed-context.tsx - Browser Supabase client → Supabase PostgreSQL: reads live data
- Authentication state → Browser Supabase client: authenticates users
lib/context/auth-context.tsx - Telemetry state → Domain data types: uses domain types
lib/context/fivsed-context.tsx - Authentication state → Domain data types: uses profile types
lib/context/auth-context.tsx - Dashboard → Telemetry state: reads telemetry
app/dashboard/page.tsx - Integrity history → Telemetry state: reads verifications
app/integrity/page.tsx - Security events → Telemetry state: reads events
app/events/page.tsx - Alert management → Telemetry state: reads alerts
app/alerts/page.tsx - Device inventory → Telemetry state: reads devices
app/devices/page.tsx - Device detail → Telemetry state: reads device data
app/devices/[id]/page.tsx - Verification history → Telemetry state: reads history
app/history/page.tsx - Dashboard → Protected app shell: renders within
app/dashboard/page.tsx - Integrity history → Protected app shell: renders within
app/integrity/page.tsx - Security events → Protected app shell: renders within
app/events/page.tsx - Alert management → Protected app shell: renders within
app/alerts/page.tsx - Device inventory → Protected app shell: renders within
app/devices/page.tsx - Device detail → Protected app shell: renders within
app/devices/[id]/page.tsx - Verification history → Protected app shell: renders within
app/history/page.tsx - Architecture view → Protected app shell: renders within
app/architecture/page.tsx - Account settings → Protected app shell: renders within
app/settings/page.tsx - Operator profile → Protected app shell: renders within
app/profile/page.tsx - Sign-in page → Authentication state: uses authentication
app/login/page.tsx - Protected app shell → Authentication state: checks access
components/layout/AppLayout.tsx - Dashboard → Integrity status card: renders status
app/dashboard/page.tsx - Dashboard → Security event chart: renders chart
app/dashboard/page.tsx - Dashboard → Verification timeline: renders timeline
app/dashboard/page.tsx - Dashboard → Active alerts banner: renders alerts
app/dashboard/page.tsx - Device inventory → Device card: renders cards
app/devices/page.tsx - Security events → Event details modal: opens details
app/events/page.tsx - Architecture view → Interactive architecture: renders diagram
app/architecture/page.tsx - Security operator → Sign-in page: signs in
README.md - Security operator → Dashboard: monitors system