# harishnair3107/paysita architecture

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

- Interactive diagram: https://gitdiagram.com/harishnair3107/paysita
- Repository: https://github.com/harishnair3107/paysita

## Overview

IndiayaPay is a mobile payments and services app, with an Express/MySQL backend. The main user journey starts at authentication, enters the home and service navigation, and opens payment, travel, bill-payment, or request-form features. The graph also preserves account, rewards, and service-request areas. Evidence is limited: several screens and navigation stacks are indexed but not excerpted, so their internal calls and some client-to-backend links are not asserted.

Main entry points: [`navigation/MainStack.js`](https://github.com/harishnair3107/paysita/blob/main/navigation/MainStack.js) (Main navigation), [`App.js`](https://github.com/harishnair3107/paysita/blob/main/App.js) (App shell), [`navigation/AuthStack.js`](https://github.com/harishnair3107/paysita/blob/main/navigation/AuthStack.js) (Authentication navigation), [`navigation/RootNavigator.js`](https://github.com/harishnair3107/paysita/blob/main/navigation/RootNavigator.js) (Root navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_app["App shell<br/>[App.js]"]
  node_authnav["Authentication navigation<br/>[AuthStack.js]"]
  node_login["Phone login<br/>[IndiayaPayLogin.js]"]
  node_otp["OTP verification"]
  node_userstate["User state<br/>[userContext.js]"]
  node_rootnav["Root navigation<br/>[RootNavigator.js]"]
  node_mainnav["Main navigation<br/>[MainStack.js]"]
end

subgraph group_services["Services and payments"]
  node_home["Home screen<br/>[MainScreen.js]"]
  node_servicehub["Service discovery<br/>[Service.js]"]
  node_search["Service search<br/>[SearchScreen.js]"]
  node_billpay["Bill payment<br/>[Paybill.js]"]
  node_payments["Payments<br/>[PaymentScreen.js]"]
  node_flight["Flight booking<br/>[FlightSearch.js]"]
  node_movie["Movie booking"]
  node_requestforms["Service request forms"]
  node_otherform["Other service form"]
end

subgraph group_account["Account and rewards"]
  node_profile["Profile<br/>[profile.js]"]
  node_drawer["Account navigation<br/>[Drawer.js]"]
  node_history["Transaction history<br/>[history.js]"]
end

subgraph group_backend["Backend API"]
  node_backend["API server<br/>[index.js]"]
  node_authapi["Authentication API<br/>[auth.js]"]
  node_flightapi["Flight API route<br/>[FlightRoute.js]"]
  node_flightclient["Flight API client"]
  node_database[("MySQL pool<br/>[db.js]")]
end

node_user(("App user"))

node_user -->|"opens"| node_app
node_app -->|"renders"| node_rootnav
node_rootnav -->|"selects"| node_authnav
node_rootnav -->|"selects"| node_mainnav
node_authnav -->|"registers"| node_login
node_authnav -->|"registers"| node_otp
node_otp -->|"uses"| node_userstate
node_app -->|"provides"| node_userstate
node_mainnav -->|"registers"| node_home
node_mainnav -->|"registers"| node_servicehub
node_mainnav -->|"registers"| node_search
node_mainnav -->|"registers"| node_billpay
node_mainnav -->|"registers"| node_payments
node_mainnav -->|"registers"| node_flight
node_mainnav -->|"registers"| node_movie
node_mainnav -->|"registers"| node_requestforms
node_mainnav -->|"registers"| node_otherform
node_mainnav -->|"registers"| node_profile
node_mainnav -->|"registers"| node_drawer
node_mainnav -->|"registers"| node_history
node_backend -->|"mounts"| node_authapi
node_backend -->|"mounts"| node_flightapi
node_flightapi -->|"delegates"| node_flightclient
node_authapi -->|"queries"| node_database
node_flightclient -->|"authenticates via"| node_database

click node_app "https://github.com/harishnair3107/paysita/blob/main/App.js"
click node_authnav "https://github.com/harishnair3107/paysita/blob/main/navigation/AuthStack.js"
click node_login "https://github.com/harishnair3107/paysita/blob/main/IndiayaPayLogin.js"
click node_otp "https://github.com/harishnair3107/paysita/blob/main/OTP-Verification.js"
click node_userstate "https://github.com/harishnair3107/paysita/blob/main/context/userContext.js"
click node_rootnav "https://github.com/harishnair3107/paysita/blob/main/navigation/RootNavigator.js"
click node_mainnav "https://github.com/harishnair3107/paysita/blob/main/navigation/MainStack.js"
click node_home "https://github.com/harishnair3107/paysita/blob/main/screens/MainScreen/MainScreen.js"
click node_servicehub "https://github.com/harishnair3107/paysita/blob/main/screens/Service.js"
click node_search "https://github.com/harishnair3107/paysita/blob/main/screens/SearchScreen.js"
click node_billpay "https://github.com/harishnair3107/paysita/blob/main/screens/Paybill.js"
click node_payments "https://github.com/harishnair3107/paysita/blob/main/screens/PaymentScreen.js"
click node_flight "https://github.com/harishnair3107/paysita/blob/main/screens/FlightSearch.js"
click node_movie "https://github.com/harishnair3107/paysita/blob/main/screens/MovieBookingScreen.js"
click node_requestforms "https://github.com/harishnair3107/paysita/blob/main/screens/HomeServiceFormScreen.js"
click node_otherform "https://github.com/harishnair3107/paysita/blob/main/screens/OtherServicesFormScreen.js"
click node_profile "https://github.com/harishnair3107/paysita/blob/main/screens/app/profile.js"
click node_drawer "https://github.com/harishnair3107/paysita/blob/main/screens/app/Drawer.js"
click node_history "https://github.com/harishnair3107/paysita/blob/main/screens/app/history.js"
click node_backend "https://github.com/harishnair3107/paysita/blob/main/my-backend/index.js"
click node_authapi "https://github.com/harishnair3107/paysita/blob/main/my-backend/routes/auth.js"
click node_flightapi "https://github.com/harishnair3107/paysita/blob/main/my-backend/routes/FlightRoute.js"
click node_flightclient "https://github.com/harishnair3107/paysita/blob/main/my-backend/FlightbookingAPI.js"
click node_database "https://github.com/harishnair3107/paysita/blob/main/my-backend/db.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_login,node_otp,node_userstate,node_rootnav,node_mainnav,node_user toneBlue
class node_home,node_servicehub,node_search,node_billpay,node_payments,node_flight,node_movie,node_requestforms,node_otherform toneAmber
class node_profile,node_drawer,node_history toneMint
class node_backend,node_authapi,node_flightapi,node_flightclient,node_database toneRose
```

## Components

### Mobile app

- [App shell](https://github.com/harishnair3107/paysita/blob/main/App.js): `App.js`
- [Authentication navigation](https://github.com/harishnair3107/paysita/blob/main/navigation/AuthStack.js): `navigation/AuthStack.js`
- [Phone login](https://github.com/harishnair3107/paysita/blob/main/IndiayaPayLogin.js): `IndiayaPayLogin.js`
- [OTP verification](https://github.com/harishnair3107/paysita/blob/main/OTP-Verification.js): `OTP-Verification.js`
- [User state](https://github.com/harishnair3107/paysita/blob/main/context/userContext.js): `context/userContext.js`
- [Root navigation](https://github.com/harishnair3107/paysita/blob/main/navigation/RootNavigator.js): `navigation/RootNavigator.js`
- [Main navigation](https://github.com/harishnair3107/paysita/blob/main/navigation/MainStack.js): `navigation/MainStack.js`

### Services and payments

- [Home screen](https://github.com/harishnair3107/paysita/blob/main/screens/MainScreen/MainScreen.js): `screens/MainScreen/MainScreen.js`
- [Service discovery](https://github.com/harishnair3107/paysita/blob/main/screens/Service.js): `screens/Service.js`
- [Service search](https://github.com/harishnair3107/paysita/blob/main/screens/SearchScreen.js): `screens/SearchScreen.js`
- [Bill payment](https://github.com/harishnair3107/paysita/blob/main/screens/Paybill.js): `screens/Paybill.js`
- [Payments](https://github.com/harishnair3107/paysita/blob/main/screens/PaymentScreen.js): `screens/PaymentScreen.js`
- [Flight booking](https://github.com/harishnair3107/paysita/blob/main/screens/FlightSearch.js): `screens/FlightSearch.js`
- [Movie booking](https://github.com/harishnair3107/paysita/blob/main/screens/MovieBookingScreen.js): `screens/MovieBookingScreen.js`
- [Service request forms](https://github.com/harishnair3107/paysita/blob/main/screens/HomeServiceFormScreen.js): `screens/HomeServiceFormScreen.js`
- [Other service form](https://github.com/harishnair3107/paysita/blob/main/screens/OtherServicesFormScreen.js): `screens/OtherServicesFormScreen.js`

### Account and rewards

- [Profile](https://github.com/harishnair3107/paysita/blob/main/screens/app/profile.js): `screens/app/profile.js`
- [Account navigation](https://github.com/harishnair3107/paysita/blob/main/screens/app/Drawer.js): `screens/app/Drawer.js`
- [Transaction history](https://github.com/harishnair3107/paysita/blob/main/screens/app/history.js): `screens/app/history.js`

### Backend API

- [API server](https://github.com/harishnair3107/paysita/blob/main/my-backend/index.js): `my-backend/index.js`
- [Authentication API](https://github.com/harishnair3107/paysita/blob/main/my-backend/routes/auth.js): `my-backend/routes/auth.js`
- [Flight API route](https://github.com/harishnair3107/paysita/blob/main/my-backend/routes/FlightRoute.js): `my-backend/routes/FlightRoute.js`
- [Flight API client](https://github.com/harishnair3107/paysita/blob/main/my-backend/FlightbookingAPI.js): `my-backend/FlightbookingAPI.js`
- [MySQL pool](https://github.com/harishnair3107/paysita/blob/main/my-backend/db.js): `my-backend/db.js`

### Other components

- **App user**

## Connections

- App user → App shell: opens (evidence: `App.js`)
- App shell → Root navigation: renders (evidence: `App.js`)
- Root navigation → Authentication navigation: selects (evidence: `navigation/RootNavigator.js`)
- Root navigation → Main navigation: selects (evidence: `navigation/RootNavigator.js`)
- Authentication navigation → Phone login: registers (evidence: `navigation/AuthStack.js`)
- Authentication navigation → OTP verification: registers (evidence: `navigation/AuthStack.js`)
- OTP verification → User state: uses (evidence: `OTP-Verification.js`)
- App shell → User state: provides (evidence: `App.js`)
- Main navigation → Home screen: registers (evidence: `navigation/MainStack.js`)
- Main navigation → Service discovery: registers (evidence: `navigation/MainStack.js`)
- Main navigation → Service search: registers (evidence: `navigation/MainStack.js`)
- Main navigation → Bill payment: registers (evidence: `navigation/MainStack.js`)
- Main navigation → Payments: registers (evidence: `navigation/MainStack.js`)
- Main navigation → Flight booking: registers (evidence: `navigation/MainStack.js`)
- Main navigation → Movie booking: registers (evidence: `navigation/MainStack.js`)
- Main navigation → Service request forms: registers (evidence: `navigation/MainStack.js`)
- Main navigation → Other service form: registers (evidence: `navigation/MainStack.js`)
- Main navigation → Profile: registers (evidence: `navigation/MainStack.js`)
- Main navigation → Account navigation: registers (evidence: `navigation/MainStack.js`)
- Main navigation → Transaction history: registers (evidence: `navigation/MainStack.js`)
- API server → Authentication API: mounts (evidence: `my-backend/index.js`)
- API server → Flight API route: mounts (evidence: `my-backend/index.js`)
- Flight API route → Flight API client: delegates (evidence: `my-backend/routes/FlightRoute.js`)
- Authentication API → MySQL pool: queries (evidence: `my-backend/routes/auth.js`)
- Flight API client → MySQL pool: authenticates via (evidence: `my-backend/FlightbookingAPI.js`)
