# parthsabhaya18/nexity-frontend architecture

> Architecture diagram of the GitHub repository parthsabhaya18/nexity-frontend, 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/parthsabhaya18/nexity-frontend
- Repository: https://github.com/parthsabhaya18/nexity-frontend

## Overview

Nexity is a React Native mobile app whose sampled current implementation centers on account access: the app provides authentication state, presents the appropriate navigation stack, and lets users register, verify email, log in, or reach the signed-in home screen through an API. Authentication tokens and cached profile data persist in secure storage. The tree also contains a broader JavaScript prototype for social features, but its modules’ runtime connections are not evidenced in the sampled material, so they are shown as distinct capabilities without speculative links. Some screens named by navigation are absent from the supplied tree.

Main entry points: [`src/navigation/RootNavigator.tsx`](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/navigation/RootNavigator.tsx) (Root navigation), [`src/features/auth/AuthProvider.tsx`](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/features/auth/AuthProvider.tsx) (Auth state), [`src/services/api/auth.ts`](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/services/api/auth.ts) (Auth API), [`src/screens/auth/RegisterScreen.tsx`](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/screens/auth/RegisterScreen.tsx) (Registration screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_app["App providers<br/>[App.tsx]"]
  node_navigator["Root navigation<br/>[RootNavigator.tsx]"]
  node_home["Home screen<br/>[HomeScreen.tsx]"]
end

subgraph group_auth["Authentication"]
  node_login["Login screen<br/>[LoginScreen.tsx]"]
  node_register["Registration screen<br/>[RegisterScreen.tsx]"]
  node_verify["Email verification"]
  node_authstate["Auth state<br/>[AuthProvider.tsx]"]
  node_validation["Auth validation<br/>[schemas.ts]"]
  node_authui["Auth UI components"]
end

subgraph group_services["API and persistence"]
  node_api["Auth API<br/>[auth.ts]"]
  node_client["HTTP client<br/>[client.ts]"]
  node_tokens["Token store<br/>[tokenStore.ts]"]
  node_secure[("Secure storage<br/>[secureStore.ts]")]
end

subgraph group_prototype["Social prototype"]
  node_prototypeapp["Prototype app shell<br/>[app.js]"]
  node_prototypeauth["Prototype authentication<br/>[auth.js]"]
  node_admin["Admin features<br/>[admin.js]"]
  node_search["Search<br/>[search.js]"]
  node_settings["Settings<br/>[settings.js]"]
  node_chat["Chat<br/>[chat.js]"]
  node_create["Content creation<br/>[create.js]"]
  node_crush["Crush features<br/>[crush.js]"]
  node_data["Prototype data<br/>[data.js]"]
  node_homeproto["Prototype home<br/>[home.js]"]
  node_reels["Reels<br/>[reels.js]"]
  node_safety["Safety<br/>[safety.js]"]
  node_notifications["Notifications<br/>[notifications.js]"]
  node_subscription["Subscriptions<br/>[subscription.js]"]
end

node_user(("Mobile user"))
node_backend{{"Nexity backend"}}

node_user -->|"opens"| node_app
node_app -->|"provides"| node_authstate
node_app -->|"renders"| node_navigator
node_navigator -->|"reads status"| node_authstate
node_navigator -->|"routes to"| node_login
node_navigator -->|"routes to"| node_register
node_navigator -->|"routes to"| node_verify
node_navigator -->|"routes to"| node_home
node_register -->|"validates with"| node_validation
node_register -->|"checks and registers"| node_api
node_login -->|"authenticates with"| node_api
node_verify -->|"verifies with"| node_api
node_login -->|"renders"| node_authui
node_register -->|"renders"| node_authui
node_verify -->|"renders"| node_authui
node_authstate -->|"requests profile"| node_api
node_authstate -->|"refreshes through"| node_client
node_authstate -->|"loads and caches"| node_secure
node_authstate -->|"manages tokens"| node_tokens
node_api -->|"sends requests"| node_client
node_client -->|"reads and updates"| node_tokens
node_client -->|"calls API"| node_backend
node_tokens -->|"persists tokens"| node_secure

click node_app "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/app/App.tsx"
click node_navigator "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/navigation/RootNavigator.tsx"
click node_home "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/screens/HomeScreen.tsx"
click node_login "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/screens/auth/LoginScreen.tsx"
click node_register "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/screens/auth/RegisterScreen.tsx"
click node_verify "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/screens/auth/VerifyEmailScreen.tsx"
click node_authstate "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/features/auth/AuthProvider.tsx"
click node_validation "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/features/auth/schemas.ts"
click node_authui "https://github.com/parthsabhaya18/nexity-frontend/tree/main/src/components/ui"
click node_api "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/services/api/auth.ts"
click node_client "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/services/api/client.ts"
click node_tokens "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/features/auth/tokenStore.ts"
click node_secure "https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/services/storage/secureStore.ts"
click node_prototypeapp "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/app.js"
click node_prototypeauth "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/auth.js"
click node_admin "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/admin.js"
click node_search "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/search.js"
click node_settings "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/settings.js"
click node_chat "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/chat.js"
click node_create "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/create.js"
click node_crush "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/crush.js"
click node_data "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/data.js"
click node_homeproto "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/home.js"
click node_reels "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/reels.js"
click node_safety "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/safety.js"
click node_notifications "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/notifications.js"
click node_subscription "https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/subscription.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_navigator,node_home,node_user toneBlue
class node_login,node_register,node_verify,node_authstate,node_validation,node_authui toneAmber
class node_api,node_client,node_tokens,node_secure toneMint
class node_prototypeapp,node_prototypeauth,node_admin,node_search,node_settings,node_chat,node_create,node_crush,node_data,node_homeproto,node_reels,node_safety,node_notifications,node_subscription toneRose
class node_backend toneIndigo
```

## Components

### App and navigation

- [App providers](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Root navigation](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/navigation/RootNavigator.tsx): `src/navigation/RootNavigator.tsx`
- [Home screen](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/screens/HomeScreen.tsx): `src/screens/HomeScreen.tsx`

### Authentication

- [Login screen](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/screens/auth/LoginScreen.tsx): `src/screens/auth/LoginScreen.tsx`
- [Registration screen](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/screens/auth/RegisterScreen.tsx): `src/screens/auth/RegisterScreen.tsx`
- [Email verification](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/screens/auth/VerifyEmailScreen.tsx): `src/screens/auth/VerifyEmailScreen.tsx`
- [Auth state](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/features/auth/AuthProvider.tsx): `src/features/auth/AuthProvider.tsx`
- [Auth validation](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/features/auth/schemas.ts): `src/features/auth/schemas.ts`
- [Auth UI components](https://github.com/parthsabhaya18/nexity-frontend/tree/main/src/components/ui): `src/components/ui`

### API and persistence

- [Auth API](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/services/api/auth.ts): `src/services/api/auth.ts`
- [HTTP client](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/services/api/client.ts): `src/services/api/client.ts`
- [Token store](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/features/auth/tokenStore.ts): `src/features/auth/tokenStore.ts`
- [Secure storage](https://github.com/parthsabhaya18/nexity-frontend/blob/main/src/services/storage/secureStore.ts): `src/services/storage/secureStore.ts`

### Social prototype

- [Prototype app shell](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/app.js): `prototype/js/app.js`
- [Prototype authentication](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/auth.js): `prototype/js/auth.js`
- [Admin features](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/admin.js): `prototype/js/admin.js`
- [Search](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/search.js): `prototype/js/search.js`
- [Settings](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/settings.js): `prototype/js/settings.js`
- [Chat](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/chat.js): `prototype/js/chat.js`
- [Content creation](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/create.js): `prototype/js/create.js`
- [Crush features](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/crush.js): `prototype/js/crush.js`
- [Prototype data](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/data.js): `prototype/js/data.js`
- [Prototype home](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/home.js): `prototype/js/home.js`
- [Reels](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/reels.js): `prototype/js/reels.js`
- [Safety](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/safety.js): `prototype/js/safety.js`
- [Notifications](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/notifications.js): `prototype/js/notifications.js`
- [Subscriptions](https://github.com/parthsabhaya18/nexity-frontend/blob/main/prototype/js/subscription.js): `prototype/js/subscription.js`

### Other components

- **Mobile user**
- **Nexity backend**

## Connections

- Mobile user → App providers: opens (evidence: `src/app/App.tsx`)
- App providers → Auth state: provides (evidence: `src/app/App.tsx`)
- App providers → Root navigation: renders (evidence: `src/app/App.tsx`)
- Root navigation → Auth state: reads status (evidence: `src/navigation/RootNavigator.tsx`)
- Root navigation → Login screen: routes to (evidence: `src/navigation/RootNavigator.tsx`)
- Root navigation → Registration screen: routes to (evidence: `src/navigation/RootNavigator.tsx`)
- Root navigation → Email verification: routes to (evidence: `src/navigation/RootNavigator.tsx`)
- Root navigation → Home screen: routes to (evidence: `src/navigation/RootNavigator.tsx`)
- Registration screen → Auth validation: validates with (evidence: `src/screens/auth/RegisterScreen.tsx`)
- Registration screen → Auth API: checks and registers (evidence: `src/screens/auth/RegisterScreen.tsx`)
- Login screen → Auth API: authenticates with (evidence: `src/screens/auth/LoginScreen.tsx`)
- Email verification → Auth API: verifies with (evidence: `src/screens/auth/VerifyEmailScreen.tsx`)
- Login screen → Auth UI components: renders (evidence: `src/screens/auth/LoginScreen.tsx`)
- Registration screen → Auth UI components: renders (evidence: `src/screens/auth/RegisterScreen.tsx`)
- Email verification → Auth UI components: renders (evidence: `src/screens/auth/VerifyEmailScreen.tsx`)
- Auth state → Auth API: requests profile (evidence: `src/features/auth/AuthProvider.tsx`)
- Auth state → HTTP client: refreshes through (evidence: `src/features/auth/AuthProvider.tsx`)
- Auth state → Secure storage: loads and caches (evidence: `src/features/auth/AuthProvider.tsx`)
- Auth state → Token store: manages tokens (evidence: `src/features/auth/AuthProvider.tsx`)
- Auth API → HTTP client: sends requests (evidence: `src/services/api/auth.ts`)
- HTTP client → Token store: reads and updates (evidence: `src/services/api/client.ts`)
- HTTP client → Nexity backend: calls API (evidence: `src/services/api/client.ts`)
- Token store → Secure storage: persists tokens (evidence: `src/features/auth/tokenStore.ts`)
