Introduction
The Incidents App mobile application is a React Native app built with Expo and Expo Router that provides a comprehensive incident management system for hotels. The app serves three distinct user types with role-based access control.Tech Stack
The mobile app is built with modern technologies:Framework
React Native with Expo SDK 54
Navigation
Expo Router 6.0 with file-based routing
Backend
Supabase for authentication and data
UI Components
Custom components with Lucide React Native icons
Key Dependencies
package.json
Application Structure
The app uses Expo Router’s file-based routing system with route groups for role-based access:User Roles
- Guest
- Employee
- Admin
Guest users access the app by scanning a QR code provided at hotel check-in.
- Report incidents in their room
- View their reported incidents
- Manage basic preferences
- No authentication required (session-based)
Core Features
Authentication & Authorization
The app implements multi-tier authentication:- Supabase Auth for employees and admins
- Session-based access for guests via QR codes
- Expo Secure Store for persistent session management
- Route guards in layout files to protect role-specific routes
src/services/supabase.ts
Incident Management
The core functionality revolves around incident tracking:- Create incidents with title, description, priority, and area
- Track incident status (pending, in_progress, resolved)
- Assign incidents to specific employees
- Filter by status, priority, and assignment
- Real-time updates via Supabase subscriptions
Theme Support
Custom theme system with three modes:hooks/useTheme.ts
Platform Configuration
app.json
Custom Hooks
The app includes several custom hooks for common functionality:useTheme()- Theme managementuseNotifications()- Notification preferencesuseNavigationDebounce()- Prevent navigation spamuseDateFormat()- Consistent date formattinguseColorScheme()- System color scheme detection
Next Steps
Installation
Set up your development environment
Configuration
Configure app settings and environment
Guest Features
Learn about guest user capabilities
Employee Features
Explore employee functionality