# nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm architecture

> Architecture diagram of the GitHub repository nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm
- Repository: https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm

## Overview

Notes App is a cross-platform mobile notes and account-management product backed by a REST API and MySQL. The main workflow runs from a user through app navigation and note screens, to API requests, and backend persistence. The README also documents registration, login, password-reset OTP, admin user management, profile/avatar handling, and PDF export. Some backend and screen implementations were not excerpted, so those links reflect README documentation or are omitted where wiring is unclear.

Main entry points: [`app/App.js`](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/App.js) (App navigation), [`backend/server.js`](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/backend/server.js) (REST API), [`app/screens/LoginScreen.js`](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/LoginScreen.js) (Login), [`app/screens/RegisterScreen.js`](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/RegisterScreen.js) (Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_app["App navigation<br/>[App.js]"]
  node_api_config["API configuration<br/>[api.js]"]
end

subgraph group_account["Accounts"]
  node_login["Login<br/>[LoginScreen.js]"]
  node_register["Registration<br/>[RegisterScreen.js]"]
  node_password_reset["Password reset"]
  node_account_screen["Profile and export<br/>[AccountScreen.js]"]
  node_admin["Admin user management<br/>[AdminScreen.js]"]
  node_auth_state["Session state<br/>[AuthContext.js]"]
end

subgraph group_notes["Notes"]
  node_home["Notes home<br/>[HomeScreen.js]"]
  node_create_note["Create note"]
  node_edit_note["Edit note<br/>[EditNoteScreen.js]"]
end

subgraph group_backend["Backend services"]
  node_api["REST API<br/>[server.js]"]
  node_mysql[("MySQL database<br/>[schema.sql]")]
end

subgraph group_integrations["External services"]
  node_cloudinary["Cloudinary avatars"]
  node_smtp["Gmail SMTP"]
  node_pdf["PDF printing"]
end

node_user(("App user"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_login
node_app -->|"renders"| node_register
node_app -->|"renders"| node_password_reset
node_app -->|"renders"| node_home
node_app -->|"renders"| node_create_note
node_app -->|"renders"| node_edit_note
node_app -->|"renders"| node_account_screen
node_app -->|"renders"| node_admin
node_app -->|"uses URL"| node_api_config
node_login -.->|"sends credentials"| node_api
node_register -->|"submits account"| node_api
node_password_reset -.->|"requests OTP"| node_api
node_admin -->|"manages users"| node_api
node_app -->|"fetches notes"| node_api
node_create_note -->|"submits note"| node_app
node_edit_note -->|"submits update"| node_app
node_home -->|"requests actions"| node_app
node_account_screen -->|"exports PDF"| node_pdf
node_api -->|"reads and writes"| node_mysql
node_api -->|"stores avatars"| node_cloudinary
node_api -->|"sends OTP"| node_smtp
node_app -.->|"session support"| node_auth_state

click node_app "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/App.js"
click node_api_config "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/config/api.js"
click node_login "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/LoginScreen.js"
click node_register "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/RegisterScreen.js"
click node_password_reset "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/ForgotPasswordScreen.js"
click node_account_screen "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/AccountScreen.js"
click node_admin "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/AdminScreen.js"
click node_auth_state "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/context/AuthContext.js"
click node_home "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/HomeScreen.js"
click node_create_note "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/CreateNoteScreen.js"
click node_edit_note "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/EditNoteScreen.js"
click node_api "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/backend/server.js"
click node_mysql "https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/backend/schema.sql"

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_api_config,node_user toneBlue
class node_login,node_register,node_password_reset,node_account_screen,node_admin,node_auth_state toneAmber
class node_home,node_create_note,node_edit_note toneMint
class node_api,node_mysql toneRose
class node_cloudinary,node_smtp,node_pdf toneIndigo
```

## Components

### Mobile app

- [App navigation](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/App.js): `app/App.js`
- [API configuration](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/config/api.js): `config/api.js`

### Accounts

- [Login](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/LoginScreen.js): `app/screens/LoginScreen.js`
- [Registration](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/RegisterScreen.js): `app/screens/RegisterScreen.js`
- [Password reset](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/ForgotPasswordScreen.js): `app/screens/ForgotPasswordScreen.js`
- [Profile and export](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/AccountScreen.js): `app/screens/AccountScreen.js`
- [Admin user management](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/AdminScreen.js): `app/screens/AdminScreen.js`
- [Session state](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/context/AuthContext.js): `context/AuthContext.js`

### Notes

- [Notes home](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/HomeScreen.js): `app/screens/HomeScreen.js`
- [Create note](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/CreateNoteScreen.js): `app/screens/CreateNoteScreen.js`
- [Edit note](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/app/screens/EditNoteScreen.js): `app/screens/EditNoteScreen.js`

### Backend services

- [REST API](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/backend/server.js): `backend/server.js`
- [MySQL database](https://github.com/nganpasa443-oss/nguyen-thi-thuc-ngan-24ct1cnpnm/blob/main/backend/schema.sql): `backend/schema.sql`

### External services

- **Cloudinary avatars**
- **Gmail SMTP**
- **PDF printing**

### Other components

- **App user**

## Connections

- App user → App navigation: uses (evidence: `README.md`)
- App navigation → Login: renders (evidence: `app/App.js`)
- App navigation → Registration: renders (evidence: `app/App.js`)
- App navigation → Password reset: renders (evidence: `app/App.js`)
- App navigation → Notes home: renders (evidence: `app/App.js`)
- App navigation → Create note: renders (evidence: `app/App.js`)
- App navigation → Edit note: renders (evidence: `app/App.js`)
- App navigation → Profile and export: renders (evidence: `app/App.js`)
- App navigation → Admin user management: renders (evidence: `app/App.js`)
- App navigation → API configuration: uses URL (evidence: `app/App.js`)
- Login → REST API: sends credentials (evidence: `README.md`)
- Registration → REST API: submits account (evidence: `app/screens/RegisterScreen.js`)
- Password reset → REST API: requests OTP (evidence: `README.md`)
- Admin user management → REST API: manages users (evidence: `app/screens/AdminScreen.js`)
- App navigation → REST API: fetches notes (evidence: `app/App.js`)
- Create note → App navigation: submits note (evidence: `app/App.js`)
- Edit note → App navigation: submits update (evidence: `app/App.js`)
- Notes home → App navigation: requests actions (evidence: `app/App.js`)
- Profile and export → PDF printing: exports PDF (evidence: `README.md`)
- REST API → MySQL database: reads and writes (evidence: `README.md`)
- REST API → Cloudinary avatars: stores avatars (evidence: `README.md`)
- REST API → Gmail SMTP: sends OTP (evidence: `README.md`)
- App navigation → Session state: session support
