Stresso is a multi-part emergency response prototype with four working pieces:
- An ESP32 + nRF24L01 "Link" device
- A Flutter mobile app
- A Node.js + SQLite backend API
- A React admin dashboard
The goal is simple: raise an SOS from the device or phone, relay nearby RF SOS events, and surface active incidents in a dashboard.
hardware/stresso-hardware/stresso-hardware.ino- ESP32 firmware (BLE + RF logic)mobileapp/- Flutter app for auth, pairing, SOS, and contactsbackend/- Express API with SQLite persistenceadmin-frontend/- React dashboard for active SOS eventsDOCUMENTATION.mdandspecs/- design and planning docs
| Area | Status | Notes |
|---|---|---|
| Hardware firmware | Working prototype | 5-second hold SOS trigger, BLE characteristics, RF broadcast/listen loop |
| Backend API | Working prototype | Auth, profile link device ID, SOS endpoints, emergency contacts |
| Admin dashboard | Functional | Polls /api/sos every 5 seconds and displays active events |
| Mobile app | Partially production-ready | Core flows work, but some paths still use simulation/placeholder behavior |
| Tests | Minimal | Backend test script is placeholder; admin has default CRA test scaffold |
- User registration/login with JWT
- Link device ID stored on user profile
- SOS creation from mobile app to backend
- Active SOS listing in admin dashboard
- BLE command flow between app and ESP32 (
TEST_SOS,DEACTIVATE_SOS, location updates) - RF SOS packet receive/forward path in firmware
- Backend JWT secret is hardcoded in
backend/server.js - Admin API URL is hardcoded in
admin-frontend/src/App.js - Mobile has simulated logic in SOS/background monitoring paths
- Some mobile screens still show "coming soon" actions (settings/profile)
- No automated end-to-end or hardware-in-the-loop test suite
- Node.js 18+ and npm
- Flutter SDK 3.9+
- Android Studio or VS Code with Flutter tooling
- ESP32 board support in Arduino IDE
- nRF24L01 module and matching wiring for the hardware sketch
cd backend
npm install
npm startRuns on http://localhost:8000.
cd admin-frontend
npm install
npm startRuns on http://localhost:3000 and reads from http://localhost:8000/api/sos.
cd mobileapp
flutter pub get
dart run build_runner buildCreate mobileapp/.env from mobileapp/.env.example, then run:
flutter runFor Android emulator, keep API_HOST=10.0.2.2.
Open hardware/stresso-hardware/stresso-hardware.ino in Arduino IDE, install required libraries (ESP32 BLE, RF24), and flash to your board with the nRF24L01 connected to the pins defined in the sketch.
- Deploy as a Node web service with
npm ci && npm start - Persist
stresso.dbon durable storage or migrate to managed PostgreSQL - Move JWT secret and port to environment variables before public deployment
- Build with
npm run build - Serve static files from Netlify, Vercel, S3+CloudFront, or Nginx
- Replace hardcoded API URL with an environment-based config
- Keep API values in
.envper environment - Build release APK/AAB with Flutter toolchain
- Use HTTPS backend endpoints for release builds
- Keep BLE service/characteristic UUIDs aligned with mobile app constants
- Validate RF channel and power settings in your target environment
POST /api/users/registerPOST /api/users/loginGET /api/users/profilePUT /api/users/profilePOST /api/sosPOST /api/sos/nearbyGET /api/sosPOST /api/emergency-contactsGET /api/emergency-contacts