# kishorevasan2002/instagram-clone-app architecture

> Architecture diagram of the GitHub repository kishorevasan2002/instagram-clone-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kishorevasan2002/instagram-clone-app
- Repository: https://github.com/kishorevasan2002/instagram-clone-app

## Overview

This React Native Instagram replica routes signed-out users through authentication and signed-in users into a social app for browsing/searching, sharing media, interacting with posts and stories, and messaging. The map highlights the demonstrated navigation, search, media-selection, story/reel, and like paths, while retaining documented profile, follow, notification, and chat capabilities from the source tree and README. Several domain implementations were not sampled, so their internal links are omitted; Firebase is shown only where source explicitly demonstrates its use.

Main entry points: [`src/navigation/SignedInStack.jsx`](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/navigation/SignedInStack.jsx) (Signed-in navigation), [`src/navigation/BottomTabs.jsx`](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/navigation/BottomTabs.jsx) (Main tabs), [`src/screens/Search.jsx`](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Search.jsx) (Search screen), [`src/contexts/UserContext.jsx`](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/contexts/UserContext.jsx) (Current user context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App entry<br/>[App.js]"]
  node_authnav["Auth routing<br/>[AuthNavigation.jsx]"]
  node_signedin["Signed-in navigation<br/>[SignedInStack.jsx]"]
  node_tabs["Main tabs<br/>[BottomTabs.jsx]"]
end

subgraph group_identity["Identity and profiles"]
  node_signedout["Sign-in flows<br/>[SignedOutStack.jsx]"]
  node_loginform["Login form<br/>[LoginForm.jsx]"]
  node_usercontext["Current user context<br/>[UserContext.jsx]"]
  node_currentuser["Current user lookup<br/>[useCurrentUser.js]"]
  node_profile["Profiles and editing<br/>[EditProfile.jsx]"]
  node_follow["Follow relationships<br/>[Follow.jsx]"]
end

subgraph group_discovery["Browse and discovery"]
  node_home["Home feed<br/>[Home.jsx]"]
  node_search["Search screen<br/>[Search.jsx]"]
  node_findusers["Find users<br/>[useFindUsers.js]"]
  node_searchresults["Search results<br/>[Searching.jsx]"]
  node_posts["Post discovery<br/>[useFetchPosts.js]"]
end

subgraph group_media["Media and stories"]
  node_media["Device media picker<br/>[MediaLibrary.jsx]"]
  node_albums["Album selection"]
  node_camera["Camera capture<br/>[CameraModule.jsx]"]
  node_postcreate["Post creation<br/>[NewPost.jsx]"]
  node_storycreate["Story creation<br/>[NewStory.jsx]"]
  node_reelcreate["Reel creation<br/>[NewReel.jsx]"]
  node_storycontext["Stories context<br/>[StoriesContext.jsx]"]
  node_stories["Story viewing<br/>[Story.jsx]"]
  node_reels["Reels viewing<br/>[Reels.jsx]"]
end

subgraph group_social["Social interaction"]
  node_firebase[("Firebase services<br/>[firebaseConfig.js]")]
  node_like["Like actions<br/>[useHandleLike.js]"]
  node_likeanimation["Like gesture"]
  node_notifications["Notifications<br/>[Notifications.jsx]"]
  node_chat["Chat and messages<br/>[Chating.jsx]"]
  node_messagefetch["Fetch messages"]
end

node_user(("App user"))

node_user -->|"opens app"| node_app
node_app -->|"renders"| node_authnav
node_authnav -->|"routes signed out"| node_signedout
node_authnav -->|"routes signed in"| node_signedin
node_signedout -->|"routes login"| node_loginform
node_signedin -->|"starts at tabs"| node_tabs
node_signedin -->|"provides user state"| node_usercontext
node_usercontext -->|"loads current user"| node_currentuser
node_tabs -->|"routes to"| node_home
node_tabs -->|"routes to"| node_search
node_search -->|"reads user"| node_usercontext
node_search -->|"searches users"| node_findusers
node_search -->|"shows default posts"| node_posts
node_search -->|"renders results"| node_searchresults
node_tabs -->|"routes to"| node_reels
node_searchresults -->|"opens user profile"| node_profile
node_signedin -->|"registers profile editing"| node_profile
node_signedin -->|"registers follow screens"| node_follow
node_signedin -->|"registers media picker"| node_media
node_media -->|"loads albums"| node_albums
node_media -->|"offers camera capture"| node_camera
node_signedin -->|"registers post creation"| node_postcreate
node_signedin -->|"registers story creation"| node_storycreate
node_signedin -->|"registers reel creation"| node_reelcreate
node_signedin -->|"provides stories"| node_storycontext
node_storycontext -.->|"supplies stories"| node_stories
node_tabs -->|"routes to"| node_reels
node_reels -->|"reads user"| node_usercontext
node_stories -->|"handles story likes"| node_like
node_likeanimation -->|"handles double-tap like"| node_like
node_like -->|"updates likes"| node_firebase
node_signedin -->|"registers notifications"| node_notifications
node_signedin -->|"registers messaging"| node_chat
node_chat -.->|"fetches messages"| node_messagefetch
node_user -->|"authenticates"| node_loginform

click node_app "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/App.js"
click node_authnav "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/navigation/AuthNavigation.jsx"
click node_signedout "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/navigation/SignedOutStack.jsx"
click node_loginform "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/components/login/LoginForm.jsx"
click node_signedin "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/navigation/SignedInStack.jsx"
click node_tabs "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/navigation/BottomTabs.jsx"
click node_usercontext "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/contexts/UserContext.jsx"
click node_currentuser "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/hooks/useCurrentUser.js"
click node_profile "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/EditProfile.jsx"
click node_follow "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Follow.jsx"
click node_home "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Home.jsx"
click node_search "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Search.jsx"
click node_findusers "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/hooks/useFindUsers.js"
click node_searchresults "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/components/search/Searching.jsx"
click node_posts "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/hooks/useFetchPosts.js"
click node_media "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/MediaLibrary.jsx"
click node_albums "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/utils/useAlbumSelector.js"
click node_camera "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/components/shared/CameraModule.jsx"
click node_postcreate "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/NewPost.jsx"
click node_storycreate "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/NewStory.jsx"
click node_reelcreate "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/NewReel.jsx"
click node_storycontext "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/contexts/StoriesContext.jsx"
click node_stories "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Story.jsx"
click node_reels "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Reels.jsx"
click node_firebase "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/services/firebaseConfig.js"
click node_like "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/hooks/useHandleLike.js"
click node_likeanimation "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/utils/useLikeAnimation.js"
click node_notifications "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Notifications.jsx"
click node_chat "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Chating.jsx"
click node_messagefetch "https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/hooks/useFetchMessages.js"

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_authnav,node_signedin,node_tabs,node_user toneBlue
class node_signedout,node_loginform,node_usercontext,node_currentuser,node_profile,node_follow toneAmber
class node_home,node_search,node_findusers,node_searchresults,node_posts toneMint
class node_media,node_albums,node_camera,node_postcreate,node_storycreate,node_reelcreate,node_storycontext,node_stories,node_reels toneRose
class node_firebase,node_like,node_likeanimation,node_notifications,node_chat,node_messagefetch toneIndigo
```

## Components

### App navigation

- [App entry](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/App.js): `App.js`
- [Auth routing](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/navigation/AuthNavigation.jsx): `src/navigation/AuthNavigation.jsx`
- [Signed-in navigation](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/navigation/SignedInStack.jsx): `src/navigation/SignedInStack.jsx`
- [Main tabs](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/navigation/BottomTabs.jsx): `src/navigation/BottomTabs.jsx`

### Identity and profiles

- [Sign-in flows](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/navigation/SignedOutStack.jsx): `src/navigation/SignedOutStack.jsx`
- [Login form](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/components/login/LoginForm.jsx): `src/components/login/LoginForm.jsx`
- [Current user context](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/contexts/UserContext.jsx): `src/contexts/UserContext.jsx`
- [Current user lookup](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/hooks/useCurrentUser.js): `src/hooks/useCurrentUser.js`
- [Profiles and editing](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/EditProfile.jsx): `src/screens/EditProfile.jsx`
- [Follow relationships](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Follow.jsx): `src/screens/Follow.jsx`

### Browse and discovery

- [Home feed](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Home.jsx): `src/screens/Home.jsx`
- [Search screen](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Search.jsx): `src/screens/Search.jsx`
- [Find users](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/hooks/useFindUsers.js): `src/hooks/useFindUsers.js`
- [Search results](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/components/search/Searching.jsx): `src/components/search/Searching.jsx`
- [Post discovery](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/hooks/useFetchPosts.js): `src/hooks/useFetchPosts.js`

### Media and stories

- [Device media picker](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/MediaLibrary.jsx): `src/screens/MediaLibrary.jsx`
- [Album selection](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/utils/useAlbumSelector.js): `src/utils/useAlbumSelector.js`
- [Camera capture](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/components/shared/CameraModule.jsx): `src/components/shared/CameraModule.jsx`
- [Post creation](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/NewPost.jsx): `src/screens/NewPost.jsx`
- [Story creation](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/NewStory.jsx): `src/screens/NewStory.jsx`
- [Reel creation](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/NewReel.jsx): `src/screens/NewReel.jsx`
- [Stories context](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/contexts/StoriesContext.jsx): `src/contexts/StoriesContext.jsx`
- [Story viewing](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Story.jsx): `src/screens/Story.jsx`
- [Reels viewing](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Reels.jsx): `src/screens/Reels.jsx`

### Social interaction

- [Firebase services](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/services/firebaseConfig.js): `src/services/firebaseConfig.js`
- [Like actions](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/hooks/useHandleLike.js): `src/hooks/useHandleLike.js`
- [Like gesture](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/utils/useLikeAnimation.js): `src/utils/useLikeAnimation.js`
- [Notifications](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Notifications.jsx): `src/screens/Notifications.jsx`
- [Chat and messages](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/screens/Chating.jsx): `src/screens/Chating.jsx`
- [Fetch messages](https://github.com/kishorevasan2002/instagram-clone-app/blob/main/src/hooks/useFetchMessages.js): `src/hooks/useFetchMessages.js`

### Other components

- **App user**

## Connections

- App user → App entry: opens app (evidence: `README.md`)
- App entry → Auth routing: renders (evidence: `App.js`)
- Auth routing → Sign-in flows: routes signed out (evidence: `src/navigation/AuthNavigation.jsx`)
- Auth routing → Signed-in navigation: routes signed in (evidence: `src/navigation/AuthNavigation.jsx`)
- Sign-in flows → Login form: routes login (evidence: `src/navigation/SignedOutStack.jsx`)
- Signed-in navigation → Main tabs: starts at tabs (evidence: `src/navigation/SignedInStack.jsx`)
- Signed-in navigation → Current user context: provides user state (evidence: `src/navigation/SignedInStack.jsx`)
- Current user context → Current user lookup: loads current user (evidence: `src/contexts/UserContext.jsx`)
- Main tabs → Home feed: routes to (evidence: `src/navigation/BottomTabs.jsx`)
- Main tabs → Search screen: routes to (evidence: `src/navigation/BottomTabs.jsx`)
- Search screen → Current user context: reads user (evidence: `src/screens/Search.jsx`)
- Search screen → Find users: searches users (evidence: `src/screens/Search.jsx`)
- Search screen → Post discovery: shows default posts (evidence: `src/screens/Search.jsx`)
- Search screen → Search results: renders results (evidence: `src/screens/Search.jsx`)
- Main tabs → Reels viewing: routes to (evidence: `src/navigation/BottomTabs.jsx`)
- Search results → Profiles and editing: opens user profile (evidence: `src/components/search/Searching.jsx`)
- Signed-in navigation → Profiles and editing: registers profile editing (evidence: `src/navigation/SignedInStack.jsx`)
- Signed-in navigation → Follow relationships: registers follow screens (evidence: `src/navigation/SignedInStack.jsx`)
- Signed-in navigation → Device media picker: registers media picker (evidence: `src/navigation/SignedInStack.jsx`)
- Device media picker → Album selection: loads albums (evidence: `src/screens/MediaLibrary.jsx`)
- Device media picker → Camera capture: offers camera capture (evidence: `src/screens/MediaLibrary.jsx`)
- Signed-in navigation → Post creation: registers post creation (evidence: `src/navigation/SignedInStack.jsx`)
- Signed-in navigation → Story creation: registers story creation (evidence: `src/navigation/SignedInStack.jsx`)
- Signed-in navigation → Reel creation: registers reel creation (evidence: `src/navigation/SignedInStack.jsx`)
- Signed-in navigation → Stories context: provides stories (evidence: `src/navigation/SignedInStack.jsx`)
- Stories context → Story viewing: supplies stories
- Main tabs → Reels viewing: routes to (evidence: `src/navigation/BottomTabs.jsx`)
- Reels viewing → Current user context: reads user (evidence: `src/screens/Reels.jsx`)
- Story viewing → Like actions: handles story likes (evidence: `src/screens/Story.jsx`)
- Like gesture → Like actions: handles double-tap like (evidence: `src/utils/useLikeAnimation.js`)
- Like actions → Firebase services: updates likes (evidence: `src/hooks/useHandleLike.js`)
- Signed-in navigation → Notifications: registers notifications (evidence: `src/navigation/SignedInStack.jsx`)
- Signed-in navigation → Chat and messages: registers messaging (evidence: `src/navigation/SignedInStack.jsx`)
- Chat and messages → Fetch messages: fetches messages
- App user → Login form: authenticates (evidence: `README.md`)
