Instamobile Core Modules
Quick Answer
Instamobile apps share reusable runtime code under src/core. These modules provide common app features such as onboarding, Firebase access, chat, profile screens, camera, location, payments, notifications, media upload, social graph, listings, bookings, delivery, vendors, and reusable UI.
You usually customize the app-specific screens and config first. Edit src/core only when you need to change shared behavior that is used across multiple screens or products.
Source Map
In a current React Native app package, the core module folder is:
src/core
Older documentation or older product packages may mention uppercase core folder
casing. Treat that as legacy casing and use src/core in current apps.
Core Modules In Current App Packages
Current app packages use these shared modules. Your app may include only the modules needed by that product.
| Module | Path | Purpose |
|---|---|---|
| Ads | src/core/ads | Optional ad placement and monetization helpers. |
| API helpers | src/core/api | Shared API exports used by app-specific modules. |
| Audio/video calls | src/core/avchat | WebRTC/Twilio calling coordination and call state. |
| AWS | src/core/aws | AWS/Amplify compatibility helpers for AWS-backed apps. |
| Bookings | src/core/bookings | Appointment and booking flows. |
| Camera | src/core/camera | Full-screen capture and gallery media selection. |
| Cart | src/core/cart | Checkout and cart UI for commerce apps. |
| Chat | src/core/chat | Conversations, messages, group chat, reactions, and chat APIs. |
| Delivery | src/core/delivery | Order tracking and delivery workflows. |
| Dopebase UI | src/core/dopebase | Shared theming, base components, forms, and UI primitives. |
| Favorites | src/core/favorites | Saved item and favorite item behavior. |
| Firebase | src/core/firebase | Firebase app, auth, Firestore, Functions, and Messaging wiring. |
| Helpers | src/core/helpers | Shared utilities for collections, time, cache, devices, and notifications. |
| In-app purchase | src/core/inAppPurchase | Subscription UI, purchase context, and user subscription state. |
| Listing | src/core/listing | Listing, search, filter, and review APIs. |
| Location | src/core/location | Maps, current location, reverse geocoding, and location picker UI. |
| Media | src/core/media | Media upload, processing, and storage provider abstraction. |
| Mentions | src/core/mentions | Mention parsing and mention-aware UI helpers. |
| Notifications | src/core/notifications | Notification screens, reducers, and Firebase notification reads. |
| Onboarding | src/core/onboarding | Auth screens, walkthrough, login, signup, and auth provider wiring. |
| Payments | src/core/payments | Payment methods, address capture, payment request, and payment sheet helpers. |
| Profile | src/core/profile | Edit profile, settings, blocked users, contact us, and form UI. |
| Review | src/core/review | Review submission and review reads. |
| Social graph | src/core/socialgraph | Feed, stories, friendships, comments, reactions, and social APIs. |
| Stories | src/core/stories | Story-specific UI and data helpers when included by the app. |
| UI | src/core/ui | Shared navigation and reusable interface helpers. |
| User reporting | src/core/user-reporting | Blocking, abuse reports, and UGC safety hooks. |
| Users | src/core/users | User profile reads and user lookup APIs. |
| Vendor | src/core/vendor | Vendor, category, admin, and marketplace-style vendor APIs. |
Dedicated Module Guides
Use these pages when you need implementation details for a specific module area:
| Area | Guide |
|---|---|
| Backend providers, Firebase, AWS, users | Backend Provider Modules |
| Auth and walkthrough | Onboarding and Authentication |
| Media processing and upload | Media Upload and Storage |
| In-app notification list | Notifications Module |
| Chat and group chat | Chat Module |
| Audio/video calls | Video Chat |
| Social feed, stories, friendships, mentions | Social Graph, Feed, Stories, and Mentions |
| Profile and settings | Profile and Settings |
| Camera and gallery picker | Camera Module |
| Location and maps | Location Module |
| Listings, reviews, saved items | Listings, Reviews, and Favorites |
| Booking flows | Bookings Module |
| Cart, delivery, vendors | Commerce, Cart, Delivery, and Vendors |
| Blocking and reports | User Reporting and Blocking |
| Payment methods and checkout helpers | Payments Module |
| Store subscriptions | In-App Purchases and Subscriptions |
| PayPal method support | PayPal Payments |
| Ads and monetization | Ads and Monetization |
How Core Modules Are Wired
Most feature modules follow the same pattern:
| Folder or file | Role |
|---|---|
index.ts or index.tsx | Public exports for screens, hooks, reducers, and helpers. |
api/ | Backend provider implementations. Many modules include Firebase, AWS, backend, and local variants. |
api/index.ts | The active provider export. Change this only when intentionally switching backend strategy. |
redux/ | Legacy Redux state for apps that still use reducers. |
hooks/ | Modern React hooks used by screens and providers. |
ui/ or screen folders | Reusable UI components and screens. |
assets/ | Module-specific icons and images. |
When a module supports multiple backends, do not edit every provider. Pick the provider used by your app and keep the others as reference implementations.
When To Edit Core
Edit src/core when:
- a bug lives in shared runtime behavior;
- multiple screens reuse the same module;
- a backend provider needs to be replaced;
- a shared hook causes loading, subscription, or permission issues;
- an app-wide dependency migration requires module changes.
Avoid editing src/core for one-off copy, screen layout, or product-specific configuration. Those changes usually belong in the app screens or config files.
Verification Checklist
After changing a core module:
- Search for all imports of the changed API.
- Start Metro with a clean cache if the export surface changed.
- Run the app that uses the module.
- Test at least one happy path and one failure path.
- If Firebase is involved, test with real rules and a non-admin user.
- If media, payments, location, camera, or push is involved, test on a real device before release.
Useful search commands:
rg "from '.*core/chat|from \".*core/chat" src
rg "useChat|IMChatScreen|IMConversationListView" src
rg "IMLocationSelectorModal|IMCameraModal|IAPConfigProvider" src