Expo Router React Native app for the Alingo ride-sharing workflow.
The frontend covers:
frontend/
|-- app/
| |-- auth/
| |-- (protected)/
| |-- _layout.tsx
| `-- index.tsx
|-- components/
|-- constants/
|-- context/
|-- hooks/
|-- services/
|-- types/
|-- package.json
`-- README.md
cd frontend
npm install
Create frontend/.env if needed.
Main environment variable:
EXPO_PUBLIC_API_BASE_URL=http://10.0.2.2:8000
Fallback behavior in the app:
http://10.0.2.2:8000http://localhost:8000npx expo start
Other commands:
npm run android
npm run ios
npm run web
The app uses Expo Router with:
app/auth/app/(protected)/app/_layout.tsxVerification-based routing sends users to different screens depending on:
UNVERIFIEDPENDINGREJECTEDVERIFIEDPublic flow:
app/auth/login.tsxapp/auth/signup.tsxapp/auth/otp.tsxProtected flow:
app/(protected)/finish-setup.tsxapp/(protected)/identity-verification.tsxapp/(protected)/verification-pending.tsxapp/(protected)/verification-rejected.tsxapp/(protected)/home.tsxapp/(protected)/find-buddy.tsxapp/(protected)/create-ride.tsxapp/(protected)/ride-details.tsxapp/(protected)/profile.tsxapp/(protected)/public-profile.tsxapp/(protected)/review.tsxShared API client:
services/api.tsDomain-specific client wrappers:
services/userService.tsservices/rideService.tsservices/reviewService.tsOther integrations:
services/firebase.tshooks/useNotifications.tsThe frontend talks to these main backend route groups:
/auth/*/api/verification/*/users/*/rides/*/reviews/*Examples used by the app:
POST /auth/otp/sendPOST /auth/otp/verifyPOST /api/verification/submitGET /api/verification/statusGET /users/mePATCH /users/locationPATCH /users/availabilityPOST /users/push-tokenPOST /rides/createPOST /rides/searchPOST /rides/requestPOST /rides/respondPOST /rides/completePOST /rides/cancelGET /rides/my-activeGET /rides/my-requestsGET /rides/detailPOST /reviews/createPush notifications are registered through Expo Notifications.
The app:
10.0.2.2 instead of localhost.After making frontend changes, manually verify the narrowest relevant flow:
cd .\frontend; npx expo start --go