ResqLine is a mobile emergency reporting app built with Expo and React Native. It enables users to register and verify accounts, submit emergency reports with location and images, track report history, and access hotline information.
- Overview
- Features
- Tech Stack
- Project Structure
- Getting Started
- Available Scripts
- API Integration
- App Flows
- Troubleshooting
- Additional Documentation
This repository contains the frontend client for ResqLine. The app uses Expo Router for file-based navigation, React Query for async server state, and an Axios API layer with token handling via Secure Store.
Primary use cases:
- User onboarding with OTP verification
- Emergency report submission
- Recent report viewing and status tracking
- Hotline browsing
- Profile management
- OTP-based authentication flow
- Emergency report creation with category, description, location, and media
- Location detection utilities and location confirmation modal
- Report listing and filtering helpers
- Real-time report status synchronization via SignalR
- User profile update and account deletion screens
- Reusable UI components for headers, footers, cards, modals, and input fields
- React Native 0.81
- React 19
- Expo SDK 54
- Expo Router 6
- TypeScript
- Axios
- @tanstack/react-query
- @microsoft/signalr
- expo-location, expo-image-picker, expo-secure-store
Key directories:
- app/(screens)/: Feature screens and user flows
- app/(tabs)/: Tab layout configuration
- app/_api/: API clients for auth, users, reports, and health endpoints
- app/_hooks/: Custom hooks such as API and location hooks
- app/_contexts/ and app/_providers/: App-level state and providers
- app/_utils/: Shared utility helpers (auth, camera, logging, notifications, filtering)
- app/components/: Reusable UI building blocks
- assets/: Icons and image assets
- scripts/: Utility scripts
- types/: Shared type declarations
- Node.js 18+
- npm 9+
- Expo Go app (for physical device testing) or emulator/simulator setup
npm installnpm run startThen choose a target from the Expo terminal UI:
- Android emulator/device
- iOS simulator/device
- Web browser
- npm run start: Start Expo development server
- npm run android: Start on Android
- npm run ios: Start on iOS
- npm run web: Start on Web
The API client is configured in app/_api/config.ts.
Current base URL:
Auth behavior:
- JWT is read from expo-secure-store and injected into request headers
- 401 responses clear auth storage and reset request correlation context
Real-time behavior:
- Live status updates are received via securely connected SignalR hubs (
/hub/Notification). - Updates instantly seed the React Query caches to keep frontend UI timelines perfectly synchronized with the admin dashboard.
Related API files:
- app/_api/auth.ts
- app/_api/user.ts
- app/_api/reports.ts
- app/_api/health.ts
- app/_hooks/useReportStatusSignalR.ts
Main flow areas in app/(screens)/:
- Welcome and onboarding
- Sign up and verification
- Login and OTP verification
- Home and emergency reporting
- Recent reports and report details
- Hotline screen
- Profile management and account deletion
- Metro cache issues:
npx expo start -c- Dependency mismatch after upgrades:
npx expo install --fix- If location or media features do not work, verify runtime permissions on the device/emulator.
- FRONTEND_DOCUMENTATION.md: Detailed architecture and screen/component documentation
- FLOW_CHART.md: Visual flow reference
- GANTT_CHART.md: Planning timeline reference
- app/_api/README.md: API usage details and examples
- App metadata and native options are defined in app.json.
- The project is configured with Babel and Metro via babel.config.js and metro.config.js.