How shashank-reddy-pulipelly/react-native-app-project works
Project type and purpose
• This is a standalone React Native mobile app (appears to be a restaurant menu/reservation app built as part of a Coursera course).
• It uses Redux for state management, React Navigation for routing, fetches data from a remote server, and includes UI components, shared utilities, assets, and styling.
File structure and map to architectural components
• App.js: application entry point—initializes Redux store and root navigator.
• redux/: Redux setup—ActionTypes, ActionCreators (network calls and dispatch), reducers (dishes, comments, promotions, leaders, favorites), configureStore.
• routes/: React Navigation configuration—stack navigators (aboutStack, homeStack) and drawer navigator (drawer).
• screens/: top‐level “container” screen components hooked into navigators.
• components/: presentational UI components used within screens (MenuComponent, DishdetailComponent, LoginComponent, etc.).
• shared/: cross‐cutting utilities—baseUrl (API endpoint), data mappings (dishes, comments, promotions, leaders), common header and card helpers.
• assets/ & Nunito/: image and font assets.
• styles/: global style definitions.
Main architectural building blocks
a. Mobile Client
– App entry point
– Navigation layer (Drawer & Stack)
– Screen containers
– UI Components
– Assets & Styles
b. State Management
– Redux store (configureStore.js)
– Action creators (async fetch to API)
– Reducers updating state slices
c. Data Services
– shared/baseUrl.js
– fetch endpoints inside ActionCreators
d. External Backend
– Remote REST API at baseUrl
Interactions and data flow
• On startup, App.js sets up Redux Provider and navigation.
• Navigator chooses initial screen (e.g., Home).
• Screen dispatches ActionCreator to fetch data from API.
• ActionCreator performs fetch(baseUrl + resource), dispatches success or failure.
• Reducer updates state.
• Screen (connected via mapStateToProps) re-renders presentational components with new data.
• User interactions (e.g. tap “Favorite”) dispatch further actions to update favorites slice.
• Navigation actions trigger new stacks/screens.
Architectural patterns
• Flux/Redux pattern (unidirectional data flow)
• Container (screen) vs Presentational (components) separation
• Modular navigation (drawer + stack)
• Shared utilities for API and UI consistency
Final checklist
• Clear, concise labels.
• Asynchronous paths (e.g., fetch calls).