The Tourify frontend is a React Native app built with Expo 54, targeting iOS, Android, and web browsers from a single codebase. It communicates with the Laravel backend exclusively via HTTP, attaching a Sanctum bearer token to every authenticated request. Tokens are persisted between sessions using Expo SecureStore on native platforms andDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/astrxnomo/tourify/llms.txt
Use this file to discover all available pages before exploring further.
localStorage on web.
Before starting, make sure you have:
- Node.js 18 or higher — check with
node --version - A running Tourify backend — follow the Backend Setup guide first, then note the URL shown by
php artisan serve(default:http://localhost:8000)
Setup steps
Install dependencies
Install all JavaScript packages declared in
package.json, including Expo, React Navigation, and Expo SecureStore.Configure the API base URL
The app derives every API request from the If you are testing on a physical device (via Expo Go), replace
API_URL constant defined at the top of services/post.js. Open the file and update the value to match your running backend:localhost with your machine’s local IP address — for example http://192.168.1.42:8000/api — because the device cannot reach localhost on your development machine.All HTTP requests in the app flow through the helpers exported by this file (get, post, patch, del). Each call automatically attaches the stored bearer token as an Authorization header when the user is logged in:Start the Expo development server
Launch the Metro bundler and Expo development server.The terminal will display a QR code along with keyboard shortcuts for opening the app on a connected simulator or device.
Open the app on a device or simulator
Choose the platform you want to run on:
- Physical device — install Expo Go from the App Store or Google Play, then scan the QR code shown in the terminal.
- iOS Simulator — press
iin the Metro terminal, or runnpm run ios. - Android Emulator — press
ain the Metro terminal, or runnpm run android. - Web browser — press
win the Metro terminal, or runnpm run web.
Run commands
All platform targets are available asnpm scripts defined in package.json:
App navigation structure
Tourify uses React Navigation with a two-level structure: a native stack wrapping a set of bottom tabs for the main app, and a separate stack for the unauthenticated flows.Bottom tabs (authenticated)
Once a user is logged in they land on the tab bar with four destinations:| Tab | Screen | Description |
|---|---|---|
Home (Inicio) | HomeScreen | Featured places, categories, and promotions. Supports text search and category filtering. |
Explore (Explorar) | ExploreScreen | Browse all cities, categories, and upcoming events in a card layout. |
Favorites (Favoritos) | FavoritesScreen | All places, events, and cities the user has saved. Powered by the GET /api/favorites endpoint. |
Profile (Perfil) | ProfileScreen | Account details, access to registrations, notifications, and logout. |
Stack screens (authenticated)
Tapping on a card in any tab pushes one of the following detail screens onto the native stack:| Screen name | Route trigger | Description |
|---|---|---|
CityDetail | Tap a city card | Full city overview with its places and events. |
PlaceDetail | Tap a place card | Place details, photo, stats, and user reviews. |
EventDetail | Tap an event card | Event information, registration, and reviews. |
CategoryDetail | Tap a category chip | All places belonging to a specific category. |
Notifications | Notification bell in Profile | Paginated in-app notifications with mark-as-read. |
MyRegistrations | ”Mis eventos” in Profile | List of events the authenticated user has registered for. |
Auth stack (unauthenticated)
Users who are not logged in are routed to:- Login — email and password form with Sanctum token storage
- Register — account creation
- ForgotPassword — password recovery via email