How harsh-p-shukla/epicircle-customer-app works
Main Components
a. Mobile App Runtime
• Expo SDK container (App.js)
• React Navigation (NavigationContainer & Stack.Navigator)
b. UI Layer
• Screens (Dashboard, Login, OTP, SchedulePickup, OrderHistory, Splash)
• Reusable Components (CustomCard, PrimaryButton, StatusBadge, ErrorMessage, LoadingSpinner, HeaderBar, OrderCard)
c. State Management
• PickupContext (Context Provider & Hook)
d. Local Persistence
• AsyncStorage (Device Storage)
e. External Services
• Google Maps (Deep Link)
• No real backend—data is mocked in context
Relationships & Data Flow
• App.js initializes the Expo container, wraps the app in NavigationContainer and PickupContextProvider.
• NavigationContainer routes between screens; each screen consumes context state and dispatch functions.
• Screens render reusable components for UI.
• PickupContext handles all CRUD operations on pickups and persists data to AsyncStorage.
• On “Schedule Pickup,” context updates in-memory state and writes to AsyncStorage.
• On app launch, context reads from AsyncStorage to rehydrate session.
Architectural Patterns & Principles
• Separation of Concerns: UI (screens/components) versus business logic (context) versus persistence (AsyncStorage)
• Provider Pattern: Context API for global state
• Component Reusability: All buttons, cards, badges, spinners live in a “components” layer
• Mock-first development: No backend means context simulates API calls
Technologies & Frameworks to Annotate
• Expo SDK (App container)
• @react-navigation/native & @react-navigation/stack (Navigation)
• React Context API (State)
• @react-native-async-storage/async-storage (Persistence)
• expo-linear-gradient (Styling)
• Local JS modules (contexts/PickupContext.js, components/, screens/)
Essential Details
• Explicitly show mocked OTP flow inside context (annotate “OTP: 123456 (mock)”).
• That session persistence uses AsyncStorage for login tokens.
• Context Provider wrapping the entire navigation tree.