Debuta uses Expo Router for file-based routing. Every file inside theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/desarrolladorandres2026-gif/Native-tailwind/llms.txt
Use this file to discover all available pages before exploring further.
app/ directory becomes a route automatically — no manual route registration is required. The root layout (app/_layout.tsx) wraps the entire navigator tree with ThemeProvider, SocketProvider, NotificationProvider, CallProvider, and AlertProvider so that every screen has access to theme tokens, the live socket connection, and the global call state.
Provider Hierarchy
app/_layout.tsx
Auth Flow (Public Routes)
These screens are accessible without an authenticated session.app/index.tsx acts as the gateway — it checks for a stored access_token in AsyncStorage and redirects to the main tabs if one exists, or to /login otherwise.
| Route | Screen | Description |
|---|---|---|
app/index.tsx | SplashScreen | Checks token in AsyncStorage; redirects to /(tabs) if authenticated or /login if not. |
app/login.tsx | LoginScreen | Email + password login form. Supports Google and Facebook OAuth via useAuth. |
app/register.tsx | RegisterScreen | Multi-step registration: personal info, interests, and a facial-capture step using expo-camera. |
app/onboarding.tsx | OnboardingScreen | Shown after first registration; introduces app features. |
app/forgot-password.tsx | ForgotPasswordScreen | Submits the user’s email to trigger a password reset code. |
app/verify-code.tsx | VerifyCodeScreen | Accepts the numeric code sent by the backend after a password reset request. |
app/reset-password.tsx | ResetPasswordScreen | Accepts and submits the new password after code verification. |
app/terms.tsx | TermsScreen | Displays the app’s terms of service. |
app/rules.tsx | RulesScreen | Displays community rules. |
Key hooks used in auth screens
useAuth
useAuth
Wraps
authService and the Expo OAuth providers. Returns login, register, loginWithGoogle, loginWithFacebook, logout, clearError, googleReady, and facebookReady. All async operations set a loading flag and populate error on failure.hooks/useAuth.ts
authService
authService
After a successful
login or register, the service stores access_token, user_id, user_name, user_role, and user_photo in AsyncStorage. These are later read by SocketContext to authenticate the socket connection.Main Tabs (app/(tabs)/)
The tab navigator is declared in app/(tabs)/_layout.tsx using @react-navigation/bottom-tabs. All authenticated users land here after login.
| Route | Screen | Description |
|---|---|---|
(tabs)/index.tsx | DiscoverScreen | Swipeable card stack of potential matches. Swipe right to like, left to pass. Detects mutual matches and shows a match modal. |
(tabs)/matches.tsx | MatchesScreen | Grid of current matches, each showing the last message and unread count. Tapping opens the chat thread. |
(tabs)/Chat.tsx | ChatListScreen | List view of all active chat conversations ordered by most recent activity. |
(tabs)/likes.tsx | LikesScreen | Shows users who have liked the current user’s profile. |
(tabs)/profile.tsx | ProfileScreen | Displays and allows editing of the current user’s profile: bio, photos, interests, job, education. |
(tabs)/settings.tsx | SettingsScreen | App preferences, account management, theme toggle, and logout. |
DiscoverScreen — (tabs)/index.tsx
The Discover screen is the app’s primary interaction surface. It uses the useDiscover hook to fetch a paginated list of UserProfile objects from GET /api/users/discover.
hooks/useDiscover.ts
swipingRef) prevents duplicate swipe events from a double-tap.
MatchesScreen — (tabs)/matches.tsx
Renders the Match[] list. Each Match object contains a matched_user: UserProfile, a last_message, and an unread_count. Tapping a match navigates to app/chat/[userId].
The Match type also carries an optional recomendacion field reflecting the status of the date suggestion for that match (pendiente, aceptada, or rechazada).
Chat Thread — app/chat/[userId].tsx
The dynamic route chat/[userId] renders a single conversation. It receives the target user’s ID as a URL parameter and passes it to the useChat hook.
hooks/useChat.ts
GET /api/chat/:userId. Incoming messages arrive in real time over the mensaje:nuevo socket event. If the socket is disconnected, the hook falls back to HTTP polling every 5 seconds.
The screen also handles the date suggestion flow: when the cita:sugerencia event arrives (triggered after 5 messages in a match), a banner appears offering the suggested venue with acceptDate / rejectDate / requestNewPlace actions.
Call Screen — app/call.tsx
The call screen is registered as a fullScreenModal with a fade animation. It receives route parameters via expo-router:
| Param | Type | Description |
|---|---|---|
userId | string | The remote participant’s user ID |
name | string | Display name shown on screen |
photo | string | Avatar URL |
isVideo | 'true' | 'false' | Whether the call includes video |
type | 'outgoing' | 'active' | Controls which UI state to show (ringing vs. connected) |
localStream and remoteStream from CallContext and renders them using RTCView from react-native-webrtc. Controls for muting and toggling the camera are surfaced from the same context via toggleMute and toggleCamera.
Partner Portal — app/partner/
The partner portal is a separate sub-stack accessible to venue partner accounts (rol: 'partner'). It uses its own _layout.tsx nested within the root Stack.
| Route | Screen | Description |
|---|---|---|
partner/index.tsx | PartnerDashboard | Overview screen for the partner account: stats, quick links. |
partner/perfil.tsx | PartnerProfile | Edit the venue’s public profile information. |
partner/fotos.tsx | PartnerPhotos | Upload and manage venue photos used in date suggestions. |
partner/citas.tsx | PartnerDates | View and manage date reservations sent through Debuta. |
partner/menu.tsx | PartnerMenu | Manage the venue’s menu items shown in the date suggestion card. |
Admin Panel — app/admin/
A minimal admin screen accessible to accounts with rol: 'admin'. The sub-stack lives at app/admin/_layout.tsx + app/admin/index.tsx.
| Route | Screen | Description |
|---|---|---|
admin/index.tsx | AdminDashboard | Admin-only management screen for users, content, and platform settings. |
Type Reference
Core types used across screens are defined incomponents/types/index.ts:
components/types/index.ts
Afinidad field on UserProfile is populated only by the discover endpoint and contains a score, amigosFB (mutual Facebook friends), interesesComun (common interests count), ciudadComun (whether users share a city), edadSimilar (whether ages are similar), and a human-readable resumen string (or null if no summary was generated).