# prashanth73/social-dining-engine architecture

> Architecture diagram of the GitHub repository prashanth73/social-dining-engine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prashanth73/social-dining-engine
- Repository: https://github.com/prashanth73/social-dining-engine

## Overview

Social Proof Dining Engine is represented here by its React Native mobile client; the documented API, storage, and ingestion services are not present in the supplied file tree, so their internals cannot be mapped. The user flow runs from OTP onboarding through privacy/card setup to dual-feed discovery and restaurant detail. Contact matching hashes phone numbers on-device before syncing. The API client makes HTTP requests, but the server-side handling of those requests is outside the available source.

Main entry points: [`apps/mobile/src/navigation/RootNavigator.tsx`](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/navigation/RootNavigator.tsx) (Flow navigation), [`apps/mobile/src/services/api.service.ts`](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/services/api.service.ts) (HTTP API client), [`apps/mobile/src/screens/AuthOnboardingScreen.tsx`](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/screens/AuthOnboardingScreen.tsx) (OTP onboarding), [`apps/mobile/App.tsx`](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/App.tsx) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Mobile app flow"]
  node_app["App entry<br/>[App.tsx]"]
  node_navigation["Flow navigation<br/>[RootNavigator.tsx]"]
  node_onboarding["OTP onboarding"]
  node_cardsetup["Privacy and cards"]
  node_discovery["Dual discovery feed"]
  node_restaurant["Restaurant detail"]
end

subgraph group_privacy["Privacy and contacts"]
  node_contacts["Contact permissions"]
  node_hashing["On-device hashing<br/>[clientCrypto.ts]"]
end

subgraph group_client["Client services"]
  node_contracts["Shared contracts<br/>[index.ts]"]
  node_api["HTTP API client<br/>[api.service.ts]"]
end

node_user(("Diner"))
node_server["Backend API"]

node_user -->|"starts app"| node_app
node_app -->|"renders"| node_navigation
node_navigation -->|"shows"| node_onboarding
node_navigation -->|"routes to"| node_cardsetup
node_navigation -->|"routes to"| node_discovery
node_navigation -->|"routes to"| node_restaurant
node_onboarding -->|"requests contacts"| node_contacts
node_contacts -->|"hashes locally"| node_hashing
node_hashing -->|"normalizes numbers"| node_contracts
node_onboarding -->|"requests auth"| node_api
node_cardsetup -->|"requests card operations"| node_api
node_discovery -->|"loads feed data"| node_api
node_restaurant -->|"uses client"| node_api
node_api -->|"sends HTTP requests"| node_server

click node_app "https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/App.tsx"
click node_navigation "https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/navigation/RootNavigator.tsx"
click node_onboarding "https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/screens/AuthOnboardingScreen.tsx"
click node_cardsetup "https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/screens/PrivacyAndCardLinkScreen.tsx"
click node_discovery "https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/screens/DualDiscoveryFeedScreen.tsx"
click node_restaurant "https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/screens/RestaurantDetailScreen.tsx"
click node_contacts "https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/services/contactPermission.service.ts"
click node_hashing "https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/utils/clientCrypto.ts"
click node_contracts "https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/shared/index.ts"
click node_api "https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/services/api.service.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_app,node_navigation,node_onboarding,node_cardsetup,node_discovery,node_restaurant toneBlue
class node_contacts,node_hashing toneAmber
class node_contracts,node_api,node_server toneMint
class node_user toneIndigo
```

## Components

### Mobile app flow

- [App entry](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/App.tsx): `apps/mobile/App.tsx`
- [Flow navigation](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/navigation/RootNavigator.tsx): `apps/mobile/src/navigation/RootNavigator.tsx`
- [OTP onboarding](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/screens/AuthOnboardingScreen.tsx): `apps/mobile/src/screens/AuthOnboardingScreen.tsx`
- [Privacy and cards](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/screens/PrivacyAndCardLinkScreen.tsx): `apps/mobile/src/screens/PrivacyAndCardLinkScreen.tsx`
- [Dual discovery feed](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/screens/DualDiscoveryFeedScreen.tsx): `apps/mobile/src/screens/DualDiscoveryFeedScreen.tsx`
- [Restaurant detail](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/screens/RestaurantDetailScreen.tsx): `apps/mobile/src/screens/RestaurantDetailScreen.tsx`

### Privacy and contacts

- [Contact permissions](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/services/contactPermission.service.ts): `apps/mobile/src/services/contactPermission.service.ts`
- [On-device hashing](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/utils/clientCrypto.ts): `apps/mobile/src/utils/clientCrypto.ts`

### Client services

- [Shared contracts](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/shared/index.ts): `apps/mobile/src/shared/index.ts`
- [HTTP API client](https://github.com/prashanth73/social-dining-engine/blob/main/apps/mobile/src/services/api.service.ts): `apps/mobile/src/services/api.service.ts`

### Other components

- **Diner**
- **Backend API**

## Connections

- Diner → App entry: starts app (evidence: `apps/mobile/App.tsx`)
- App entry → Flow navigation: renders (evidence: `apps/mobile/App.tsx`)
- Flow navigation → OTP onboarding: shows (evidence: `apps/mobile/src/navigation/RootNavigator.tsx`)
- Flow navigation → Privacy and cards: routes to (evidence: `apps/mobile/src/navigation/RootNavigator.tsx`)
- Flow navigation → Dual discovery feed: routes to (evidence: `apps/mobile/src/navigation/RootNavigator.tsx`)
- Flow navigation → Restaurant detail: routes to (evidence: `apps/mobile/src/navigation/RootNavigator.tsx`)
- OTP onboarding → Contact permissions: requests contacts (evidence: `apps/mobile/src/screens/AuthOnboardingScreen.tsx`)
- Contact permissions → On-device hashing: hashes locally (evidence: `apps/mobile/src/services/contactPermission.service.ts`)
- On-device hashing → Shared contracts: normalizes numbers (evidence: `apps/mobile/src/utils/clientCrypto.ts`)
- OTP onboarding → HTTP API client: requests auth (evidence: `apps/mobile/src/screens/AuthOnboardingScreen.tsx`)
- Privacy and cards → HTTP API client: requests card operations (evidence: `apps/mobile/src/screens/PrivacyAndCardLinkScreen.tsx`)
- Dual discovery feed → HTTP API client: loads feed data (evidence: `apps/mobile/src/screens/DualDiscoveryFeedScreen.tsx`)
- Restaurant detail → HTTP API client: uses client (evidence: `apps/mobile/src/screens/RestaurantDetailScreen.tsx`)
- HTTP API client → Backend API: sends HTTP requests (evidence: `apps/mobile/src/services/api.service.ts`)
