How kevincito20/tourin-panama works
Main Components
• Mobile Runtime & Build
• Expo Dev Tools & Metro Bundler
• Android native wrapper (android/ folder with Gradle, MainActivity.kt, MainApplication.kt)
• JavaScript Layers
• Presentation Layer
– File-based Routing (app/ directory)
– Screens & Layouts (_layout.tsx, index.tsx, tab screens, auth screens, modals)
– UI Components (components/ui, components/actividades, components/mapa, etc.)
• Business Logic Layer
– Custom Hooks (hooks/useActividades, useAutentication, useConocerPanama, etc.)
– State & Storage (useAlmacenamiento for local caching)
• Data & Services Layer
– REST clients (components/services/ActividadesService.ts, authService.ts, registroService.ts)
– Static assets & configs (assets/configuracionMapbox.ts, provinces JSON, fonts, images)
• External Systems
• Mapbox API
• Backend REST endpoints for activities, user registration, authentication
Relationships & Data Flows
• App launch: Expo CLI → Metro → JS bundle → Mobile runtime (Android/iOS)
• Screen navigation: app/ router → screen components → render UI
• UI interaction: Screens call Hooks → Hooks invoke Services → Services issue HTTP calls → External APIs respond → Data flows back up to UI
• Integration: Map screens import Mapbox config & province JSON → render markers and routes
• Authentication flow: Auth screens → authService → backend → token stored via useAlmacenamiento
Architectural Patterns & Principles
• Layered Architecture: clear separation of Presentation, Logic, Data
• File-based routing courtesy of Expo Router—treat the app/ directory as the navigation map
• Modular component design: domain-specific components grouped under components/
• Hooks encapsulate business logic and side effects, keep screens declarative
Key Technologies & Frameworks
• React Native + Expo (JavaScript runtime, cross-platform UI)
• TypeScript for static typing
• Expo Router / React Navigation for routing
• Mapbox for map rendering
• Gradle & native Kotlin code for Android support