# siyamthandagwamanda/react-native-notes-application architecture

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

- Interactive diagram: https://gitdiagram.com/siyamthandagwamanda/react-native-notes-application
- Repository: https://github.com/siyamthandagwamanda/react-native-notes-application

## Overview

This is a local-only React Native notes app. Users register or log in, then navigate protected screens to browse category notes, search/sort them, and create, edit or delete notes; they can also update their profile or log out. Screens invoke the storage service, which persists users and notes in AsyncStorage and hashes passwords. The README documents protected routing and account isolation. Login and layout source were read, but some screens and wiring were only indexed; edges reflect only explicit code or README evidence.

Main entry points: [`src/services/storage.ts`](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/services/storage.ts) (User and note storage), [`src/components/AuthContext.tsx`](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/components/AuthContext.tsx) (Session context), [`src/app/category/[name].tsx`](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/category/%5Bname%5D.tsx) (Category notes), [`src/app/index.tsx`](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/index.tsx) (Category home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_screens["App screens"]
  node_login["Login<br/>[login.tsx]"]
  node_register["Registration<br/>[register.tsx]"]
  node_home["Category home<br/>[index.tsx]"]
  node_profile["Profile editor<br/>[profile.tsx]"]
  node_formstyles["Shared form styles<br/>[form.ts]"]
end

subgraph group_identity["Identity and routing"]
  node_layout["Protected routes<br/>[_layout.tsx]"]
  node_auth["Session context<br/>[AuthContext.tsx]"]
end

subgraph group_notes["Notes experience"]
  node_category["Category notes<br/>[&#91;name&#93;.tsx]"]
  node_card["Note card<br/>[NoteCard.tsx]"]
  node_noteform["Note editor<br/>[note.tsx]"]
end

subgraph group_data["Local data"]
  node_storage["User and note storage<br/>[storage.ts]"]
  node_asyncstorage[("Device storage")]
  node_hash["Password hash<br/>[hash.ts]"]
  node_types["User and note types<br/>[types.ts]"]
end

node_user(("App user"))

node_user -->|"enters credentials"| node_login
node_user -->|"creates account"| node_register
node_login -->|"authenticates"| node_storage
node_register -->|"registers"| node_storage
node_storage -->|"reads and writes"| node_asyncstorage
node_storage -->|"hashes passwords"| node_hash
node_layout -->|"reads session"| node_auth
node_layout -->|"guards access"| node_login
node_layout -->|"guards access"| node_register
node_user -->|"opens categories"| node_home
node_home -->|"reads and clears"| node_auth
node_home -->|"navigates to"| node_category
node_home -->|"opens profile"| node_profile
node_profile -->|"updates account"| node_storage
node_profile -->|"updates session"| node_auth
node_category -->|"reads session"| node_auth
node_category -->|"loads and deletes"| node_storage
node_category -->|"renders notes"| node_card
node_category -->|"opens editor"| node_noteform
node_noteform -->|"reads session"| node_auth
node_noteform -->|"loads and saves"| node_storage
node_storage -->|"uses models"| node_types
node_auth -->|"uses user type"| node_types
node_card -->|"uses note type"| node_types

click node_layout "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/_layout.tsx"
click node_auth "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/components/AuthContext.tsx"
click node_login "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/login.tsx"
click node_register "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/register.tsx"
click node_home "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/index.tsx"
click node_profile "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/profile.tsx"
click node_category "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/category/%5Bname%5D.tsx"
click node_card "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/components/NoteCard.tsx"
click node_noteform "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/note.tsx"
click node_storage "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/services/storage.ts"
click node_hash "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/utils/hash.ts"
click node_types "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/types/types.ts"
click node_formstyles "https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/styles/form.ts"

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_login,node_register,node_home,node_profile,node_formstyles,node_user toneBlue
class node_layout,node_auth toneAmber
class node_category,node_card,node_noteform toneMint
class node_storage,node_asyncstorage,node_hash,node_types toneRose
```

## Components

### App screens

- [Login](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/login.tsx): `src/app/login.tsx`
- [Registration](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/register.tsx): `src/app/register.tsx`
- [Category home](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/index.tsx): `src/app/index.tsx`
- [Profile editor](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/profile.tsx): `src/app/profile.tsx`
- [Shared form styles](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/styles/form.ts): `src/styles/form.ts`

### Identity and routing

- [Protected routes](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/_layout.tsx): `src/app/_layout.tsx`
- [Session context](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/components/AuthContext.tsx): `src/components/AuthContext.tsx`

### Notes experience

- [Category notes](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/category/%5Bname%5D.tsx): `src/app/category/[name].tsx`
- [Note card](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/components/NoteCard.tsx): `src/components/NoteCard.tsx`
- [Note editor](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/app/note.tsx): `src/app/note.tsx`

### Local data

- [User and note storage](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/services/storage.ts): `src/services/storage.ts`
- **Device storage**
- [Password hash](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/utils/hash.ts): `src/utils/hash.ts`
- [User and note types](https://github.com/siyamthandagwamanda/react-native-notes-application/blob/main/src/types/types.ts): `src/types/types.ts`

### Other components

- **App user**

## Connections

- App user → Login: enters credentials (evidence: `README.md`)
- App user → Registration: creates account (evidence: `README.md`)
- Login → User and note storage: authenticates (evidence: `src/app/login.tsx`)
- Registration → User and note storage: registers (evidence: `src/app/register.tsx`)
- User and note storage → Device storage: reads and writes (evidence: `src/services/storage.ts`)
- User and note storage → Password hash: hashes passwords (evidence: `src/services/storage.ts`)
- Protected routes → Session context: reads session (evidence: `src/app/_layout.tsx`)
- Protected routes → Login: guards access (evidence: `README.md`)
- Protected routes → Registration: guards access (evidence: `README.md`)
- App user → Category home: opens categories (evidence: `README.md`)
- Category home → Session context: reads and clears (evidence: `src/app/index.tsx`)
- Category home → Category notes: navigates to (evidence: `src/app/index.tsx`)
- Category home → Profile editor: opens profile (evidence: `src/app/index.tsx`)
- Profile editor → User and note storage: updates account (evidence: `src/app/profile.tsx`)
- Profile editor → Session context: updates session (evidence: `src/app/profile.tsx`)
- Category notes → Session context: reads session (evidence: `src/app/category/[name].tsx`)
- Category notes → User and note storage: loads and deletes (evidence: `src/app/category/[name].tsx`)
- Category notes → Note card: renders notes (evidence: `src/app/category/[name].tsx`)
- Category notes → Note editor: opens editor (evidence: `src/app/category/[name].tsx`)
- Note editor → Session context: reads session (evidence: `src/app/note.tsx`)
- Note editor → User and note storage: loads and saves (evidence: `src/app/note.tsx`)
- User and note storage → User and note types: uses models (evidence: `src/services/storage.ts`)
- Session context → User and note types: uses user type (evidence: `src/components/AuthContext.tsx`)
- Note card → User and note types: uses note type (evidence: `src/components/NoteCard.tsx`)
