Building MOD Smart: React Native and Tuya for Real-Time Lighting Control
MOD Smart is a React Native application for installers and power users managing Tuya-compatible RGB, CW, and RGBCW lighting controllers across multiple properties.
The product challenge was larger than an on/off interface. Pairing, live device state, permissions, firmware, scenes, and schedules all needed to feel coherent on iOS and Android.
The Product Architecture
- Multi-home context for moving between properties and client sites.
- MQTT-backed feedback so interface state follows physical device state.
- Three onboarding paths: Wi-Fi EZ mode, access-point mode, and Bluetooth discovery.
- Adaptive controls based on the Tuya data points supported by each controller.
Security and Permissions
Email and one-time-password authentication creates the session, while react-native-keychain protects session tokens at rest. Role-based helpers keep installer and homeowner actions explicit before API requests are dispatched.
Architecture That Keeps Users Oriented
- RootNavigator separates authenticated and unauthenticated application states.
- MainTabs keeps primary destinations—homes, scenes, and settings—predictable.
- ControllerStack isolates deeper device controls so users can return without duplicate navigation history.

Real-Time State Without Excessive Re-Renders
Zustand slices separate authentication, devices, theme, and global sheets. Device updates remain focused on the controls that changed instead of forcing the entire application tree to refresh.
The same state model also supports scenes, schedules, grouping, strip configuration, and persisted active-home context.

Shipping Reliably on iOS and Android
The first Google Play review passed, while Apple correctly required an in-app account-deletion flow. Centralized authentication made that compliance change contained and testable before resubmission.
Fastlane automates versioning, reproducible builds, internal Android releases, and TestFlight delivery. The result is a consistent release path rather than a set of manual store-specific steps.
