# navinrapelli/hostelapp architecture

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

- Interactive diagram: https://gitdiagram.com/navinrapelli/hostelapp
- Repository: https://github.com/navinrapelli/hostelapp

## Overview

HostelApp is a React Native/Expo hostel-management app, but the README gives no detail about management workflows, and the sampled implementation is chiefly an authentication UI scaffold. The visible user flow starts at Login, where users can enter credentials or navigate to registration, password recovery, and two-step authentication; login currently displays a toast rather than performing authentication. The graph includes the documented screens and reusable form controls. Several small screen and component implementations were not sampled, so their internal behavior is not inferred.

Main entry points: [`Screen/HgaLogin.js`](https://github.com/navinrapelli/hostelapp/blob/main/Screen/HgaLogin.js) (Login screen), [`Components/HgaForms.js`](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaForms.js) (Form builder), [`App.js`](https://github.com/navinrapelli/hostelapp/blob/main/App.js) (Navigation shell), [`Util/HgaGlobalColors.js`](https://github.com/navinrapelli/hostelapp/blob/main/Util/HgaGlobalColors.js) (Color palette)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_application["Navigation shell<br/>[App.js]"]
  node_toastprovider["Toast provider<br/>[App.js]"]
end

subgraph group_auth["Authentication screens"]
  node_login["Login screen<br/>[HgaLogin.js]"]
  node_register["Registration screen<br/>[HgaRegister.js]"]
  node_forgot["Password recovery<br/>[HgaForgotPass.js]"]
  node_twostep["Two-step screen<br/>[HgaTwoStepAuth.js]"]
end

subgraph group_forms["Forms and controls"]
  node_formbuilder["Form builder<br/>[HgaForms.js]"]
  node_input["Text input<br/>[HgaInput.js]"]
  node_button["Action button<br/>[HgaButton.js]"]
  node_checkbox["Checkbox<br/>[HgaCheckBox.js]"]
  node_select["Select control<br/>[HgaSelect.js]"]
  node_radio["Radio control<br/>[HgaRadioButton.js]"]
  node_toggle["Toggle control<br/>[HgaToggle.js]"]
  node_datepicker["Date picker<br/>[HgaDatePicker.js]"]
end

subgraph group_shared["Shared presentation"]
  node_toastsetting["Toast renderer<br/>[HgaToastSetting.js]"]
  node_links["Navigation links<br/>[HgaLinks.js]"]
  node_logo["Brand logo<br/>[HgaLogo.js]"]
  node_page["Page layout<br/>[HgaPage.js]"]
  node_colors["Color palette<br/>[HgaGlobalColors.js]"]
  node_content["English copy<br/>[HgaContentEn.js]"]
end

node_user(("App user"))
node_toastservice["Toast library"]

node_user -->|"opens"| node_application
node_application -->|"routes to"| node_login
node_application -->|"routes to"| node_register
node_application -->|"routes to"| node_forgot
node_application -->|"routes to"| node_twostep
node_application -->|"wraps"| node_toastprovider
node_toastprovider -->|"renders"| node_toastsetting
node_toastprovider -->|"configures"| node_toastservice
node_login -->|"shows toast"| node_toastservice
node_login -->|"renders"| node_logo
node_login -->|"renders"| node_input
node_login -->|"renders"| node_button
node_login -->|"renders"| node_links
node_login -->|"reads copy"| node_content
node_register -->|"renders"| node_page
node_register -->|"renders"| node_input
node_formbuilder -->|"renders"| node_input
node_formbuilder -->|"uses"| node_button
node_formbuilder -->|"renders"| node_checkbox
node_formbuilder -->|"renders"| node_select
node_formbuilder -->|"renders"| node_radio
node_formbuilder -->|"renders"| node_toggle
node_login -->|"uses palette"| node_colors
node_button -->|"uses palette"| node_colors
node_input -->|"uses palette"| node_colors
node_select -->|"uses palette"| node_colors
node_page -->|"uses palette"| node_colors

click node_application "https://github.com/navinrapelli/hostelapp/blob/main/App.js"
click node_toastprovider "https://github.com/navinrapelli/hostelapp/blob/main/App.js"
click node_toastsetting "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaToastSetting.js"
click node_login "https://github.com/navinrapelli/hostelapp/blob/main/Screen/HgaLogin.js"
click node_register "https://github.com/navinrapelli/hostelapp/blob/main/Screen/HgaRegister.js"
click node_forgot "https://github.com/navinrapelli/hostelapp/blob/main/Screen/HgaForgotPass.js"
click node_twostep "https://github.com/navinrapelli/hostelapp/blob/main/Screen/HgaTwoStepAuth.js"
click node_formbuilder "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaForms.js"
click node_input "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaInput.js"
click node_button "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaButton.js"
click node_checkbox "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaCheckBox.js"
click node_select "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaSelect.js"
click node_radio "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaRadioButton.js"
click node_toggle "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaToggle.js"
click node_datepicker "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaDatePicker.js"
click node_links "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaLinks.js"
click node_logo "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaLogo.js"
click node_page "https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaPage.js"
click node_colors "https://github.com/navinrapelli/hostelapp/blob/main/Util/HgaGlobalColors.js"
click node_content "https://github.com/navinrapelli/hostelapp/blob/main/Util/HgaContentEn.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_application,node_toastprovider,node_user toneBlue
class node_login,node_register,node_forgot,node_twostep toneAmber
class node_formbuilder,node_input,node_button,node_checkbox,node_select,node_radio,node_toggle,node_datepicker toneMint
class node_toastsetting,node_links,node_logo,node_page,node_colors,node_content toneRose
class node_toastservice toneIndigo
```

## Components

### App shell

- [Navigation shell](https://github.com/navinrapelli/hostelapp/blob/main/App.js): `App.js`
- [Toast provider](https://github.com/navinrapelli/hostelapp/blob/main/App.js): `App.js`

### Authentication screens

- [Login screen](https://github.com/navinrapelli/hostelapp/blob/main/Screen/HgaLogin.js): `Screen/HgaLogin.js`
- [Registration screen](https://github.com/navinrapelli/hostelapp/blob/main/Screen/HgaRegister.js): `Screen/HgaRegister.js`
- [Password recovery](https://github.com/navinrapelli/hostelapp/blob/main/Screen/HgaForgotPass.js): `Screen/HgaForgotPass.js`
- [Two-step screen](https://github.com/navinrapelli/hostelapp/blob/main/Screen/HgaTwoStepAuth.js): `Screen/HgaTwoStepAuth.js`

### Forms and controls

- [Form builder](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaForms.js): `Components/HgaForms.js`
- [Text input](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaInput.js): `Components/HgaInput.js`
- [Action button](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaButton.js): `Components/HgaButton.js`
- [Checkbox](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaCheckBox.js): `Components/HgaCheckBox.js`
- [Select control](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaSelect.js): `Components/HgaSelect.js`
- [Radio control](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaRadioButton.js): `Components/HgaRadioButton.js`
- [Toggle control](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaToggle.js): `Components/HgaToggle.js`
- [Date picker](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaDatePicker.js): `Components/HgaDatePicker.js`

### Shared presentation

- [Toast renderer](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaToastSetting.js): `Components/HgaToastSetting.js`
- [Navigation links](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaLinks.js): `Components/HgaLinks.js`
- [Brand logo](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaLogo.js): `Components/HgaLogo.js`
- [Page layout](https://github.com/navinrapelli/hostelapp/blob/main/Components/HgaPage.js): `Components/HgaPage.js`
- [Color palette](https://github.com/navinrapelli/hostelapp/blob/main/Util/HgaGlobalColors.js): `Util/HgaGlobalColors.js`
- [English copy](https://github.com/navinrapelli/hostelapp/blob/main/Util/HgaContentEn.js): `Util/HgaContentEn.js`

### Other components

- **App user**
- **Toast library**

## Connections

- App user → Navigation shell: opens
- Navigation shell → Login screen: routes to (evidence: `App.js`)
- Navigation shell → Registration screen: routes to (evidence: `App.js`)
- Navigation shell → Password recovery: routes to (evidence: `App.js`)
- Navigation shell → Two-step screen: routes to (evidence: `App.js`)
- Navigation shell → Toast provider: wraps (evidence: `App.js`)
- Toast provider → Toast renderer: renders (evidence: `App.js`)
- Toast provider → Toast library: configures (evidence: `App.js`)
- Login screen → Toast library: shows toast (evidence: `Screen/HgaLogin.js`)
- Login screen → Brand logo: renders (evidence: `Screen/HgaLogin.js`)
- Login screen → Text input: renders (evidence: `Screen/HgaLogin.js`)
- Login screen → Action button: renders (evidence: `Screen/HgaLogin.js`)
- Login screen → Navigation links: renders (evidence: `Screen/HgaLogin.js`)
- Login screen → English copy: reads copy (evidence: `Screen/HgaLogin.js`)
- Registration screen → Page layout: renders (evidence: `Screen/HgaRegister.js`)
- Registration screen → Text input: renders (evidence: `Screen/HgaRegister.js`)
- Form builder → Text input: renders (evidence: `Components/HgaForms.js`)
- Form builder → Action button: uses (evidence: `Components/HgaForms.js`)
- Form builder → Checkbox: renders (evidence: `Components/HgaForms.js`)
- Form builder → Select control: renders (evidence: `Components/HgaForms.js`)
- Form builder → Radio control: renders (evidence: `Components/HgaForms.js`)
- Form builder → Toggle control: renders (evidence: `Components/HgaForms.js`)
- Login screen → Color palette: uses palette (evidence: `Screen/HgaLogin.js`)
- Action button → Color palette: uses palette (evidence: `Components/HgaButton.js`)
- Text input → Color palette: uses palette (evidence: `Components/HgaInput.js`)
- Select control → Color palette: uses palette (evidence: `Components/HgaSelect.js`)
- Page layout → Color palette: uses palette (evidence: `Components/HgaPage.js`)
