Overview
PARKINMX is a cross-platform mobile parking reservation system built with React Native and Expo. The app follows a modern, scalable architecture with file-based routing, custom hooks for business logic, and Firebase for backend services.Tech Stack
Frontend
- React 19.1.0
- React Native 0.81.5
- Expo SDK ~54.0.27
- Expo Router ~6.0.17
Backend
- Firebase 12.6.0
- Firebase Admin 13.6.0
- Firebase Functions v2 (7.0.0)
- Node.js 24
Navigation
- React Navigation 7.1.8
- Bottom Tabs 7.4.0
- File-based routing (Expo Router)
UI & Animations
- React Native Reanimated ~4.1.1
- Expo Blur ~15.0.8
- React Native Gesture Handler ~2.28.0
- Expo Symbols ~1.0.8
Architecture Patterns
File-Based Routing
The app uses Expo Router for declarative, file-based navigation:app/_layout.tsx
Custom Hooks Pattern
Business logic is separated into reusable custom hooks following the single responsibility principle:useLogin.ts- Authentication and password recoveryuseRegistro.ts- User registration flowuseReservar.ts- Parking spot reservation logicuseHistorial.ts- Reservation historyuseEditReservation.ts- Modify existing reservationsuseTarjetas.ts- Payment card managementuseAmigos.ts- Friend system and requestsuseSupportChat.ts- Real-time support chat with AIuseSeguridad.ts- Security settings (biometrics, PIN)usePushNotifications.ts- Push notification handling
Example: useReservar Hook Structure
Example: useReservar Hook Structure
hooks/useReservar.ts
Context Providers
Global state management uses React Context: AchievementContext - Gamification system for user engagementcontext/AchievementContext.tsx
Folder Structure
Design Patterns
1. Separation of Concerns
Screens (app/) handle only presentation and user interaction:2. Real-time Data Synchronization
Firestore snapshots for live updates:3. Atomic Transactions
Firestore transactions ensure data consistency:4. Optimistic UI Updates
Immediate feedback with rollback on error:5. Component Composition
Reusable components with clear interfaces:State Management Strategy
Configuration Files
TypeScript Configuration
tsconfig.json
Path Aliases
Import from root with@/ prefix:
Performance Optimizations
React Compiler (Experimental)
React Compiler (Experimental)
Enabled via Automatically optimizes React components for better performance.
app.json:New Architecture
New Architecture
React Native’s new architecture is enabled:Provides improved performance via JSI and Fabric renderer.
Reanimated Worklets
Reanimated Worklets
UI animations run on native thread:
Next Steps
Firebase Setup
Learn about Firestore collections and authentication
Expo Configuration
Understand build settings and platform configs