How burhanyilmaz/womob works
Main Components
• Mobile App Entry Point: Represent the App.tsx file as the starting point.
• UI Layer: Include folders like src/components (with specialized components for blog headers, sliders, posts, and common controls) and src/screens (with Blog and Welcome screens).
• Navigation: Highlight src/navigators (e.g., BlogNavigator, MainNavigator) that coordinate screen transitions using React Navigation.
• Data/Service Layer: Include src/services/Api.ts for integrating with the WordPress REST API.
• Utility & Hooks Layer: Include src/hooks (e.g., useDebounce, useLoadFonts) and src/utils for helper functions and data types.
Detail the Relationships and Interactions
• A flow from the App Entry Point (App.tsx) to the Navigation layer (BlogNavigator, MainNavigator), which routes users to various screens (Blog, Welcome, Post Detail, etc.).
• From the UI screens, indicate that they retrieve data via the API service (src/services/Api.ts) through asynchronous calls. This data is then stored/managed by MobX-State-Tree stores.
• The components layer (including BlogTabHeader, HomeSlider, etc.) should be depicted as building blocks that are used by screens and containers.
• Use of hooks to enhance component functionality such as font loading and debouncing user interactions.
Architectural Patterns and Principles
• Separation of concerns:
• Presentation Layer (UI components and screens)
• Navigation Layer (React Navigation-based navigators)
• Business Logic & State Management (MobX-State-Tree in src/store)
• Data Integration (WordPress REST API calls through src/services/Api.ts)
• Modular and reusable components approach, which is typical in React Native projects.
• That some post content may render web view content, so include an external/extracted “WebView” component (referenced in the README for handling iframe content).
Specific Technologies and Tools
• React Native (with Expo) forms the core platform.
• React and TypeScript power the UI and type safety.
• React Navigation structures the screen and tab navigating flows.
• MobX-State-Tree and MobX-React-Lite manage the application state.
• Nativewind and Tailwind CSS (via tailwind.config.js) are used for styling.
• Testing frameworks such as Jest and React Native Testing Library provide the testing layer.
• External build and configuration tools such as Babel, ESLint, Prettier, and Husky for commit hooks.
• On the next tier, layout “Navigators” (BlogNavigator, MainNavigator) directing airflow to two primary sectors:
• UI Screens (Blog, Welcome, PostDetailScreen, etc.) contained in the src/screens directory.
• Associated containers (like src/containers/Post.tsx) that serve as intermediaries between screens and business logic.
• Below the UI tier, have a layer for “State Management” showing the MobX-State-Tree stores (CategoryStore, PostStore, etc.) which are connected to the API module.
• Off to the side, add a “Service/Integration” module that illustrates the API service (src/services/Api.ts) interfacing with external WordPress REST API endpoints.
• Link “Utilities & Theming” to both the UI and business logic tiers indicating common helper functions (hooks, utils) and theme configuration that standardizes styling across components.
• Finally, include testing, configuration, and build tools as peripheral blocks to acknowledge their roles in ensuring code quality and maintainability.