How sakshimehar/tuk-tuk-app works
Purpose and Runtime
Tuk-Tuk is an Expo/React Native social and dating app for authentication, profile discovery, nearby users, chat, voice parties, blind matching, gifts, wallet/recharge, and VIP gamification. It uses Expo Router file-based navigation and targets native/mobile environments.
Key startup and platform files: index.js, app.json, app/_layout.jsx, eas.json.
Navigation and App Shell
The root router establishes app-wide navigation; the tab layout organizes the primary signed-in surfaces: Home, Chat, Party, Blind Pick, and Profile. Additional route files handle account/security, onboarding, settings, user profiles, and modal-like flows.
Paths: app/_layout.jsx, app/(tabs)/_layout.jsx, app/(tabs)/home.jsx, app/(tabs)/party.jsx, app/login.jsx, app/chat-box.jsx.
Authentication and Session Boundary
Authentication is separated into API calls, persistent/session handling, and global state. Phone verification, Google sign-in, and Facebook native/web mechanisms feed a shared auth/session layer before protected social features consume the active user.
Paths: src/api/authApi.js, src/services/authSessionService.js, src/store/authStore.js, src/services/firebasePhoneService.js, src/hooks/useGoogleSignIn.js, src/services/facebookAuthService.js.
Backend Access and Domain Services
src/api is the HTTP transport/domain endpoint boundary, centered on Axios; src/services composes those APIs into UI-facing operations. This covers profiles, relationships, posts, discovery, party rooms, chat, family/social groups, gifts, gamification, VIP, and wallet operations.
Paths: src/api/axios.js, src/api/profileApi.js, src/api/chatApi.js, src/api/partyApi.js, src/services/publicProfileService.js, src/services/partyService.js, src/services/walletService.js.
Social Interaction Surfaces
Route screens orchestrate reusable presentation components for chat, user cards/profiles, friends/discovery, party exploration, and monetization panels. Components appear to own feature-specific interaction state while services provide remote data and mutations.
Paths: Components/ChatBox.jsx, Components/PartyExplore.jsx, Components/BlindPick.jsx, Components/UserProfileView.jsx, Components/WalletRechargeSection.jsx, Components/VipCenterPanel.jsx.
Realtime Chat and Voice
Chat has a WebSocket transport/service path, while voice-party functionality is isolated around Agora integration, token/UID support, and runtime health checks. Native build customization includes a plugin specifically for Agora screen sharing.
Paths: src/services/websocket.ts, src/services/chatService.js, src/services/agoraVoiceService.js, src/services/partyVoiceService.js, src/services/voice/voiceTokenUtils.js, plugins/withoutAgoraScreenShare.js.
Firebase and Notifications
Firebase supports phone authentication and likely push-notification/mobile service integration; Android credentials are included. Notification behavior is abstracted behind its own service rather than embedded in screens.
Paths: src/lib/firebase.js, src/services/firebasePhoneService.js, src/services/pushNotificationService.js, google-services.json.
Assets, State, and Offline Catalogs
Large bundled media and visual assets support frames, gifts, levels, treasure, and video-rich UI. Local JSON/catalog data can seed or supplement feature displays. Auth and wallet stores provide cross-screen state, with hooks exposing balance, treasure progress, device layout, and keyboard-aware behavior.
Paths: assets/Gift, assets/chatFrames, assets/videos, src/data/diamondRechargeCatalog.js, src/store/walletStore.js, src/hooks/useWalletBalance.js.
Main entry points: ChatBox.jsx Social feature UI · app/_layout.jsx Root router · publicProfileService.js Domain services · (tabs)/_layout.jsx Signed-in tabs
Components 19
Mobile App
Expo Router screens and feature UI.
- Expo startup · Bootstraps the native application.
index.js - Root router · Establishes app-wide navigation.
app/_layout.jsx - Signed-in tabs · Primary Home, Chat, Party, Blind Pick, and Profile surfaces.
app/(tabs)/_layout.jsx - Social routes · Home, party, login, and chat-box route orchestration.
app/(tabs)/home.jsx - Social feature UI · Chat, party, blind pick, profile, wallet, and VIP panels.
Components/ChatBox.jsx - Bundled media · Gifts, frames, and video-rich UI assets.
assets/Gift
Identity & State
Authentication, sessions, and shared account state.
- Auth API
src/api/authApi.js - Auth session · Persists and restores the active session.
src/services/authSessionService.js - Auth store · Exposes active-user state to protected features.
src/store/authStore.js - Wallet state & catalog · Recharge catalog and cross-screen wallet balance.
src/store/walletStore.js
Backend & Realtime
HTTP domain access and live communication.
- Axios transport · Shared backend request boundary.
src/api/axios.js - Domain APIs · Profile, chat, and party endpoint modules.
src/api/profileApi.js - Domain services · UI-facing profile, party, and wallet operations.
src/services/publicProfileService.js - Chat realtime · Live chat transport and chat operations.
src/services/websocket.ts
Native Integrations
Firebase, voice, notifications, and native build support.
- Party voice · Voice rooms, tokens, and party voice coordination.
src/services/agoraVoiceService.js - Firebase · Phone authentication and mobile integration.
src/lib/firebase.js - Phone verification
src/services/firebasePhoneService.js - Push notifications
src/services/pushNotificationService.js - Agora native plugin · Customizes native builds for screen sharing.
plugins/withoutAgoraScreenShare.js
Connections 20
- Expo startup → Root router: starts
- Root router → Signed-in tabs: hosts
- Root router → Social routes: routes to
- Signed-in tabs → Social feature UI: renders
- Social routes → Social feature UI: composes
- Root router → Auth store: guards with
- Auth API → Auth session: auth results
- Auth session → Auth store: hydrates
- Phone verification → Auth API: verifies for
- Firebase → Phone verification: provides
- Domain APIs → Axios transport: uses
- Domain services → Domain APIs: composes
- Social feature UI → Domain services: loads and mutates
- Social feature UI → Chat realtime: exchanges live chat
- Social feature UI → Party voice: joins voice parties
- Social feature UI → Wallet state & catalog: reads balance
- Wallet state & catalog → Domain services: wallet operations
- Root router → Push notifications: initializes
- Agora native plugin → Party voice: enables native support
- Bundled media → Social feature UI: supplies visuals