Back to ProjectsIoT + Mobile + Backend System
SikadVoltz
IoT-enabled indoor cycling ecosystem combining embedded firmware, a Flutter mobile app, and a Node.js backend
Overview
An IoT-enabled indoor cycling ecosystem combining embedded firmware, a Flutter mobile app, and a Node.js backend to deliver real-time cycling analytics, AI-driven training plans, and gamified fitness tracking.
Problem
Traditional fitness tracking platforms lack real-time hardware integration. Most cycling apps provide basic GPS and manual tracking but fail to connect with physical speed/cadence sensors or adapt intelligently to user performance.
Solution
A four-component platform:
| Component | Stack | Role |
|---|---|---|
| Firmware | ESP32 + Arduino + NimBLE | Reads reed switch sensor; computes speed/cadence/power; broadcasts JSON telemetry at 10 Hz over BLE GATT |
| Mobile App | Flutter 3.16 / Dart 3.2+ | BLE pairing with ESP32; real-time workout tracker; goal wizard with TDEE-based planning; health screening; achievements |
| Backend | Node.js + Express 5 + MongoDB + Redis | REST API + WebSocket; auth (JWT + Google OAuth); FCM push; calorie/TDEE engine; smart plan redistribution; gamification |
| Website | React 18 + Vite + Framer Motion | Promotional landing page with app download links, team info, and public stats |
System Architecture
┌─────────────┐ BLE ┌──────────────┐ REST/WS ┌──────────────────────┐
│ ESP32 │◄─────────►│ Flutter App │◄───────────►│ Node.js Backend │
│ (Reed Sw.) │ 10Hz JSON│ (Mobile) │ HTTPS │ (Express + WS) │
└─────────────┘ └──────────────┘ └──────┬───────────────┘
│
┌──────────▼──────────┐
│ MongoDB Atlas │
│ + Redis (Cache) │
└─────────────────────┘Key Features
- ▸Live cycling tracker — real-time speed, cadence, power, distance via BLE
- ▸Smart session management — auto pause/resume via freewheeling detection on ESP32
- ▸AI training plans — goal wizard with TDEE-based calorie targets and dynamic plan redistribution for missed sessions
- ▸Gamification — XP, levels, ranks, streaks, badges, milestones, quests
- ▸Dual notification strategy — WebSocket (foreground) + Firebase FCM (background)
- ▸Health screening — PAR-Q+ risk assessment before goal creation
- ▸Offline resilience — ESP32 EEPROM buffering + Flutter offline storage and deferred sync
- ▸Google Calendar sync — plan integration with external calendars
- ▸Achievement engine — badge and quest system driven by service-layer logic
Deployment & CI/CD
- ▸Backend: Render (Singapore, Docker multi-stage, HTTP/2 with fallback, health checks)
- ▸Website: Cloudflare Pages or Render static site
- ▸CI/CD: GitHub Actions — lint, test matrix (Node 16/18/20), security scan (Trivy, Snyk, CodeQL), Docker buildx multi-arch (amd64 + arm64), staging → production deploy
Technology Stack
Firmware
ESP32ArduinoNimBLE
Mobile App
Flutter 3.16Dart 3.2+
Backend
Node.jsExpress 5MongoDBRedis
Website
React 18ViteFramer Motion
DevOps
RenderGitHub ActionsDockerCloudflare Pages
Notable Design Decisions
- ▸Unified dashboard endpoint — single Redis-cached call replaces ~5 separate API calls (~75% latency reduction)
- ▸Dual Redis clients — SessionManager + simpleRedisClient for resilience and debug comparison
- ▸MongoDB timeseries — telemetry stored in native timeseries collections for efficient high-frequency sensor queries
- ▸API versioning — all routes under /api/v1/ with legacy backward compatibility
- ▸Service orchestrator — Flutter UnifiedServiceOrchestrator manages init order and prevents conflicts
- ▸UI_ONLY_MODE — feature flag for frontend development without backend dependencies
- ▸Startup optimization — minimal critical path first, deferred background services, error-tolerant fallback UI