# settasit7/khee architecture

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

- Interactive diagram: https://gitdiagram.com/settasit7/khee
- Repository: https://github.com/settasit7/khee

## Overview

Khee is a React Native app for finding and pinning nearby public restrooms. First launch presents onboarding, then users can create an account or log in, or continue as a guest; returning launches open the home experience. Home and guest screens provide the map-oriented restroom discovery experience. The sampled code confirms authentication, signup profile initialization, and first-launch persistence. Map behavior is only partially excerpted, so the graph does not infer a separate map-data service or storage backend.

Main entry points: [`App.js`](https://github.com/settasit7/khee/blob/main/App.js) (App navigation), [`scn/SignUp.js`](https://github.com/settasit7/khee/blob/main/scn/SignUp.js) (Sign up), [`scn/Login.js`](https://github.com/settasit7/khee/blob/main/scn/Login.js) (Login), [`index.js`](https://github.com/settasit7/khee/blob/main/index.js) (React Native registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_registry["React Native registry<br/>[index.js]"]
  node_app["App navigation<br/>[App.js]"]
  node_launch_state["First-launch state<br/>[App.js]"]
end

subgraph group_discovery["Restroom discovery"]
  node_home["Home map<br/>[Home.js]"]
  node_guest["Guest map<br/>[Guest.js]"]
end

subgraph group_accounts["Accounts"]
  node_onboarding["Onboarding<br/>[Onboarding.js]"]
  node_login["Login<br/>[Login.js]"]
  node_signup["Sign up<br/>[SignUp.js]"]
  node_reset["Password reset<br/>[ResetPassword.js]"]
  node_firebase_auth["Firebase Auth"]
  node_firebase_db[("Firebase Realtime DB")]
end

node_user(("App user"))

node_user -.->|"starts app"| node_registry
node_registry -->|"registers"| node_app
node_app -->|"checks launch"| node_launch_state
node_app -->|"routes first"| node_onboarding
node_app -->|"routes home"| node_home
node_app -->|"routes guest"| node_guest
node_app -->|"routes login"| node_login
node_app -->|"routes signup"| node_signup
node_app -->|"routes reset"| node_reset
node_login -->|"signs in"| node_firebase_auth
node_signup -->|"creates account"| node_firebase_auth
node_signup -->|"writes profile"| node_firebase_db
node_signup -->|"navigates home"| node_home
node_login -->|"opens reset"| node_reset
node_login -->|"continues guest"| node_guest
node_onboarding -->|"continues signup"| node_signup

click node_registry "https://github.com/settasit7/khee/blob/main/index.js"
click node_app "https://github.com/settasit7/khee/blob/main/App.js"
click node_launch_state "https://github.com/settasit7/khee/blob/main/App.js"
click node_onboarding "https://github.com/settasit7/khee/blob/main/scn/Onboarding.js"
click node_home "https://github.com/settasit7/khee/blob/main/scn/Home.js"
click node_guest "https://github.com/settasit7/khee/blob/main/scn/Guest.js"
click node_login "https://github.com/settasit7/khee/blob/main/scn/Login.js"
click node_signup "https://github.com/settasit7/khee/blob/main/scn/SignUp.js"
click node_reset "https://github.com/settasit7/khee/blob/main/scn/ResetPassword.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_registry,node_app,node_launch_state,node_user toneBlue
class node_home,node_guest toneAmber
class node_onboarding,node_login,node_signup,node_reset,node_firebase_auth,node_firebase_db toneMint
```

## Components

### App entry

- [React Native registry](https://github.com/settasit7/khee/blob/main/index.js): `index.js`
- [App navigation](https://github.com/settasit7/khee/blob/main/App.js): `App.js`
- [First-launch state](https://github.com/settasit7/khee/blob/main/App.js): `App.js`

### Restroom discovery

- [Home map](https://github.com/settasit7/khee/blob/main/scn/Home.js): `scn/Home.js`
- [Guest map](https://github.com/settasit7/khee/blob/main/scn/Guest.js): `scn/Guest.js`

### Accounts

- [Onboarding](https://github.com/settasit7/khee/blob/main/scn/Onboarding.js): `scn/Onboarding.js`
- [Login](https://github.com/settasit7/khee/blob/main/scn/Login.js): `scn/Login.js`
- [Sign up](https://github.com/settasit7/khee/blob/main/scn/SignUp.js): `scn/SignUp.js`
- [Password reset](https://github.com/settasit7/khee/blob/main/scn/ResetPassword.js): `scn/ResetPassword.js`
- **Firebase Auth**
- **Firebase Realtime DB**

### Other components

- **App user**

## Connections

- App user → React Native registry: starts app
- React Native registry → App navigation: registers (evidence: `index.js`)
- App navigation → First-launch state: checks launch (evidence: `App.js`)
- App navigation → Onboarding: routes first (evidence: `App.js`)
- App navigation → Home map: routes home (evidence: `App.js`)
- App navigation → Guest map: routes guest (evidence: `App.js`)
- App navigation → Login: routes login (evidence: `App.js`)
- App navigation → Sign up: routes signup (evidence: `App.js`)
- App navigation → Password reset: routes reset (evidence: `App.js`)
- Login → Firebase Auth: signs in (evidence: `scn/Login.js`)
- Sign up → Firebase Auth: creates account (evidence: `scn/SignUp.js`)
- Sign up → Firebase Realtime DB: writes profile (evidence: `scn/SignUp.js`)
- Sign up → Home map: navigates home (evidence: `scn/SignUp.js`)
- Login → Password reset: opens reset (evidence: `scn/Login.js`)
- Login → Guest map: continues guest (evidence: `scn/Login.js`)
- Onboarding → Sign up: continues signup (evidence: `scn/Onboarding.js`)
