How rafaelhgreco/apaeeventos_frontend works
Project type and purpose
• This is a cross-platform mobile application built with Expo and React Native.
• It targets Android (via the android/ folder and native Android entry points), iOS (via Expo Go), and the web (via React Native Web).
• File-based routing lives in the app/ directory; reusable UI elements in components/; styling constants and helpers in constants/ and hooks/; static assets in assets/.
File structure
• Top-level “android/” folder contains the native Android project (Gradle files, MainActivity.kt, MainApplication.kt, resources).
• app/ holds your Expo Router pages (.tsx files) and layouts.
• components/ houses generic React components (Collapsible, ParallaxScrollView, ThemedView, etc.).
• assets/ stores images & fonts used by the UI.
• Configuration: package.json, tsconfig.json, eslint.config.js, plus Node scripts in scripts/.
Key insights from README
• Created via create-expo-app, uses Expo CLI and Metro bundler.
• Encourages file-based routing: each .tsx in app/ maps to a screen or layout.
• Development workflow: npm install → npx expo start → choose emulator, simulator, or Expo Go.
Main components
a. Developer Machine
• Expo CLI & Metro Bundler
• Node.js / npm environment
b. Application Code
• JS/TS layer: app/ (screens & router), components/, hooks/, constants/
• Static assets: assets/ (fonts, images)
c. Native Runtimes
• Android: Java/Kotlin entry points (MainActivity.kt, MainApplication.kt), Gradle build
• iOS: Expo Go runtime (not shown on file tree but implied)
d. Runtime & Deployment
• Metro Bundler → bundles JS → sends to device/emulator
• Expo Go (or dev build) on device runs JS in a native WebView/JSCore
• OTA updates via Expo servers (optional)
Relationships & data flow
• Developer Machine invokes Expo CLI → starts Metro Bundler
• Metro watches app/, components/, hooks/, constants/, assets/ → creates JS bundle
• JS bundle is loaded into the native runtime (Android app or Expo Go)
• Native runtime bridges calls between JS and native modules (camera, sensors, storage)
• Navigation: file-based routing module resolves URL ↔ screen component
Architectural patterns & tech
• Component-based UI (React Native)
• File-based routing (Expo Router)
• Theming via hooks and constants
• Native bridge pattern for JS ↔ Native interactions
• Metro Bundler for bundling and hot reloading