# maximcoding/react-native-bare-starter architecture

> Architecture diagram of the GitHub repository maximcoding/react-native-bare-starter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/maximcoding/react-native-bare-starter
- Repository: https://github.com/maximcoding/react-native-bare-starter

## Overview

This is a bare React Native starter with a sample Hacker News feed, authentication, user-profile, and settings flows. Users enter through the app shell, which provides navigation and shared providers; feature screens use hooks and services to fetch or mutate data. Shared infrastructure supplies query policy, pluggable transport, offline queueing, persistence, theming, and localization. The README documents the broader starter capabilities; source excerpts and index references support the specific internal links shown. Unsampled settings and adapter behavior is represented only at subsystem level.

Main entry points: [`App.tsx`](https://github.com/maximcoding/react-native-bare-starter/blob/master/App.tsx) (Application shell), [`src/shared/services/api/transport/transport.ts`](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/transport/transport.ts) (Offline-aware transport), [`src/navigation/NavigationRoot.tsx`](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/navigation/NavigationRoot.tsx) (Navigation flows), [`src/features/auth/services/auth/auth.service.ts`](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/auth/services/auth/auth.service.ts) (Authentication service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_shell["Application shell<br/>[App.tsx]"]
  node_navigation["Navigation flows<br/>[NavigationRoot.tsx]"]
  node_route_definitions["Route definitions<br/>[routes.ts]"]
  node_navigation_state["Navigation persistence"]
end

subgraph group_features["Product features"]
  node_auth_ui["Authentication screen<br/>[AuthScreen.tsx]"]
  node_auth_service["Authentication service<br/>[auth.service.ts]"]
  node_home_ui["Home and story screens<br/>[HomeScreen.tsx]"]
  node_feed_hook["Feed query<br/>[useFeedQuery.ts]"]
  node_hn_service["Hacker News service<br/>[hn.service.ts]"]
  node_settings["Settings and onboarding<br/>[SettingsScreen.tsx]"]
  node_profile_query["Current-user query<br/>[useMeQuery.ts]"]
end

subgraph group_platform["Shared platform"]
  node_storage[("MMKV storage<br/>[mmkv.ts]")]
  node_zustand_storage["Zustand storage adapter"]
  node_theme["Theme provider<br/>[ThemeProvider.tsx]"]
  node_translations["Typed localization<br/>[i18n.ts]"]
  node_monitoring["Sentry monitoring<br/>[sentry.ts]"]
end

subgraph group_data["Data and connectivity"]
  node_query_provider["Query provider<br/>[provider.tsx]"]
  node_query_client["Query client policy<br/>[query-client.ts]"]
  node_transport["Offline-aware transport<br/>[transport.ts]"]
  node_rest_adapter["REST adapter<br/>[rest.adapter.ts]"]
  node_offline_queue["Offline mutation queue<br/>[offline-queue.ts]"]
  node_sync_engine["Offline sync engine<br/>[sync-engine.ts]"]
end

node_person(("App user"))
node_hn_api["Hacker News API"]

node_person -->|"uses"| node_shell
node_shell -->|"renders"| node_navigation
node_shell -->|"provides theme"| node_theme
node_shell -->|"provides queries"| node_query_provider
node_shell -->|"loads"| node_translations
node_shell -->|"initializes"| node_monitoring
node_shell -->|"selects adapter"| node_rest_adapter
node_navigation -->|"persists state"| node_navigation_state
node_navigation -.->|"uses routes"| node_route_definitions
node_auth_ui -.->|"submits credentials"| node_auth_service
node_auth_service -->|"mutates"| node_transport
node_auth_service -->|"stores tokens"| node_storage
node_home_ui -.->|"loads feed"| node_feed_hook
node_feed_hook -->|"fetches feed"| node_hn_service
node_hn_service -->|"requests stories"| node_hn_api
node_profile_query -->|"queries profile"| node_transport
node_query_provider -.->|"provides client"| node_query_client
node_transport -->|"dispatches requests"| node_rest_adapter
node_transport -->|"queues mutations"| node_offline_queue
node_sync_engine -->|"replays queue"| node_offline_queue
node_sync_engine -->|"dispatches replay"| node_transport
node_zustand_storage -->|"reads and writes"| node_storage
node_navigation_state -->|"persists state"| node_storage

click node_shell "https://github.com/maximcoding/react-native-bare-starter/blob/master/App.tsx"
click node_navigation "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/navigation/NavigationRoot.tsx"
click node_route_definitions "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/navigation/routes.ts"
click node_navigation_state "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/navigation/persistence/navigation-persistence.ts"
click node_auth_ui "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/auth/screens/AuthScreen.tsx"
click node_auth_service "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/auth/services/auth/auth.service.ts"
click node_home_ui "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/home/screens/HomeScreen.tsx"
click node_feed_hook "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/home/hooks/useFeedQuery.ts"
click node_hn_service "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/home/services/hn/hn.service.ts"
click node_settings "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/settings/screens/SettingsScreen.tsx"
click node_profile_query "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/user/hooks/useMeQuery.ts"
click node_query_provider "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/query/client/provider.tsx"
click node_query_client "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/query/client/query-client.ts"
click node_transport "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/transport/transport.ts"
click node_rest_adapter "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/transport/adapters/rest.adapter.ts"
click node_offline_queue "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/offline/offline-queue.ts"
click node_sync_engine "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/offline/sync-engine.ts"
click node_storage "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/storage/mmkv.ts"
click node_zustand_storage "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/storage/zustand-mmkv-storage.ts"
click node_theme "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/theme/ThemeProvider.tsx"
click node_translations "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/i18n/i18n.ts"
click node_monitoring "https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/monitoring/sentry.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_shell,node_navigation,node_route_definitions,node_navigation_state,node_person toneBlue
class node_auth_ui,node_auth_service,node_home_ui,node_feed_hook,node_hn_service,node_settings,node_profile_query toneAmber
class node_storage,node_zustand_storage,node_theme,node_translations,node_monitoring,node_hn_api toneMint
class node_query_provider,node_query_client,node_transport,node_rest_adapter,node_offline_queue,node_sync_engine toneRose
```

## Components

### App and navigation

- [Application shell](https://github.com/maximcoding/react-native-bare-starter/blob/master/App.tsx): `App.tsx`
- [Navigation flows](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/navigation/NavigationRoot.tsx): `src/navigation/NavigationRoot.tsx`
- [Route definitions](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/navigation/routes.ts): `src/navigation/routes.ts`
- [Navigation persistence](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/navigation/persistence/navigation-persistence.ts): `src/navigation/persistence/navigation-persistence.ts`

### Product features

- [Authentication screen](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/auth/screens/AuthScreen.tsx): `src/features/auth/screens/AuthScreen.tsx`
- [Authentication service](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/auth/services/auth/auth.service.ts): `src/features/auth/services/auth/auth.service.ts`
- [Home and story screens](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/home/screens/HomeScreen.tsx): `src/features/home/screens/HomeScreen.tsx`
- [Feed query](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/home/hooks/useFeedQuery.ts): `src/features/home/hooks/useFeedQuery.ts`
- [Hacker News service](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/home/services/hn/hn.service.ts): `src/features/home/services/hn/hn.service.ts`
- [Settings and onboarding](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/settings/screens/SettingsScreen.tsx): `src/features/settings/screens/SettingsScreen.tsx`
- [Current-user query](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/features/user/hooks/useMeQuery.ts): `src/features/user/hooks/useMeQuery.ts`

### Shared platform

- [MMKV storage](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/storage/mmkv.ts): `src/shared/services/storage/mmkv.ts`
- [Zustand storage adapter](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/storage/zustand-mmkv-storage.ts): `src/shared/services/storage/zustand-mmkv-storage.ts`
- [Theme provider](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/theme/ThemeProvider.tsx): `src/shared/theme/ThemeProvider.tsx`
- [Typed localization](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/i18n/i18n.ts): `src/i18n/i18n.ts`
- [Sentry monitoring](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/monitoring/sentry.ts): `src/shared/services/monitoring/sentry.ts`

### Data and connectivity

- [Query provider](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/query/client/provider.tsx): `src/shared/services/api/query/client/provider.tsx`
- [Query client policy](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/query/client/query-client.ts): `src/shared/services/api/query/client/query-client.ts`
- [Offline-aware transport](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/transport/transport.ts): `src/shared/services/api/transport/transport.ts`
- [REST adapter](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/transport/adapters/rest.adapter.ts): `src/shared/services/api/transport/adapters/rest.adapter.ts`
- [Offline mutation queue](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/offline/offline-queue.ts): `src/shared/services/api/offline/offline-queue.ts`
- [Offline sync engine](https://github.com/maximcoding/react-native-bare-starter/blob/master/src/shared/services/api/offline/sync-engine.ts): `src/shared/services/api/offline/sync-engine.ts`

### Other components

- **App user**
- **Hacker News API**

## Connections

- App user → Application shell: uses (evidence: `README.md`)
- Application shell → Navigation flows: renders (evidence: `App.tsx`)
- Application shell → Theme provider: provides theme (evidence: `App.tsx`)
- Application shell → Query provider: provides queries (evidence: `App.tsx`)
- Application shell → Typed localization: loads (evidence: `App.tsx`)
- Application shell → Sentry monitoring: initializes (evidence: `App.tsx`)
- Application shell → REST adapter: selects adapter (evidence: `App.tsx`)
- Navigation flows → Navigation persistence: persists state (evidence: `src/navigation/NavigationRoot.tsx`)
- Navigation flows → Route definitions: uses routes
- Authentication screen → Authentication service: submits credentials
- Authentication service → Offline-aware transport: mutates (evidence: `src/features/auth/services/auth/auth.service.ts`)
- Authentication service → MMKV storage: stores tokens (evidence: `src/features/auth/services/auth/auth.service.ts`)
- Home and story screens → Feed query: loads feed
- Feed query → Hacker News service: fetches feed (evidence: `src/features/home/hooks/useFeedQuery.ts`)
- Hacker News service → Hacker News API: requests stories (evidence: `src/features/home/services/hn/hn.service.ts`)
- Current-user query → Offline-aware transport: queries profile (evidence: `src/features/user/hooks/useMeQuery.ts`)
- Query provider → Query client policy: provides client
- Offline-aware transport → REST adapter: dispatches requests (evidence: `src/shared/services/api/transport/transport.ts`)
- Offline-aware transport → Offline mutation queue: queues mutations (evidence: `src/shared/services/api/transport/transport.ts`)
- Offline sync engine → Offline mutation queue: replays queue (evidence: `src/shared/services/api/offline/sync-engine.ts`)
- Offline sync engine → Offline-aware transport: dispatches replay (evidence: `src/shared/services/api/offline/sync-engine.ts`)
- Zustand storage adapter → MMKV storage: reads and writes (evidence: `src/shared/services/storage/zustand-mmkv-storage.ts`)
- Navigation persistence → MMKV storage: persists state (evidence: `src/navigation/persistence/navigation-persistence.ts`)
