# htetaung-2025/sotto architecture

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

- Interactive diagram: https://gitdiagram.com/htetaung-2025/sotto
- Repository: https://github.com/htetaung-2025/sotto

## Overview

Sotto is a social consultation app: users set up profiles, post requests for help, respond to others, and follow up with thanks and notifications. Sampled screens show request creation and live response tracking in Firestore, response handling in notifications, and request-detail follow-up. The tree indicates additional authentication, group, and reservation screens, but their wiring is not established by the excerpts. Firebase configuration and push-notification helpers are the internal service layer.

Main entry points: [`lib/notifications.js`](https://github.com/htetaung-2025/sotto/blob/master/lib/notifications.js) (Push helpers), [`app/(tabs)/reservations.jsx`](https://github.com/htetaung-2025/sotto/blob/master/app/(tabs)/reservations.jsx) (Post consultation), [`app/(tabs)/notifications.jsx`](https://github.com/htetaung-2025/sotto/blob/master/app/(tabs)/notifications.jsx) (Notifications), [`app/index.tsx`](https://github.com/htetaung-2025/sotto/blob/master/app/index.tsx) (Welcome)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and Profile"]
  node_welcome["Welcome<br/>[index.tsx]"]
  node_login["Login<br/>[login.tsx]"]
  node_register["Registration"]
  node_onboarding["Onboarding<br/>[onboarding.tsx]"]
  node_profile["Profile setup<br/>[profile-setup.jsx]"]
  node_profiletab["Profile<br/>[profile.jsx]"]
end

subgraph group_requests["Consultations"]
  node_reservations["Post consultation<br/>[reservations.jsx]"]
  node_requests["My requests<br/>[requests.jsx]"]
  node_detail["Request detail<br/>[request-detail.jsx]"]
  node_notifications["Notifications<br/>[notifications.jsx]"]
end

subgraph group_community["Community"]
  node_groupcreate["Create group<br/>[group-create.jsx]"]
  node_groupjoin["Join group<br/>[group-join.jsx]"]
  node_group["Group view<br/>[group.jsx]"]
end

subgraph group_services["Backend Services"]
  node_firebase["Firebase setup<br/>[firebase.ts]"]
  node_firestore[("Firestore")]
  node_pushhelper["Push helpers<br/>[notifications.js]"]
end

node_user(("App user"))
node_expopush["Expo push service"]

node_user -->|"opens app"| node_welcome
node_welcome -->|"navigates to"| node_login
node_user -->|"signs in"| node_login
node_user -->|"registers"| node_register
node_user -->|"continues through"| node_onboarding
node_user -->|"sets profile"| node_profile
node_profile -->|"reads and writes"| node_firestore
node_reservations -->|"creates and watches requests"| node_firestore
node_reservations -->|"sends consultation push"| node_pushhelper
node_requests -->|"watches requests and responses"| node_firestore
node_detail -->|"reads and updates request"| node_firestore
node_notifications -->|"reads and updates responses"| node_firestore
node_notifications -->|"sends response push"| node_expopush
node_pushhelper -->|"reads and updates"| node_firestore
node_pushhelper -->|"sends push"| node_expopush
node_firebase -->|"initializes"| node_firestore

click node_welcome "https://github.com/htetaung-2025/sotto/blob/master/app/index.tsx"
click node_login "https://github.com/htetaung-2025/sotto/blob/master/app/login.tsx"
click node_onboarding "https://github.com/htetaung-2025/sotto/blob/master/app/onboarding.tsx"
click node_profile "https://github.com/htetaung-2025/sotto/blob/master/app/profile-setup.jsx"
click node_profiletab "https://github.com/htetaung-2025/sotto/blob/master/app/(tabs)/profile.jsx"
click node_reservations "https://github.com/htetaung-2025/sotto/blob/master/app/(tabs)/reservations.jsx"
click node_requests "https://github.com/htetaung-2025/sotto/blob/master/app/(tabs)/requests.jsx"
click node_detail "https://github.com/htetaung-2025/sotto/blob/master/app/request-detail.jsx"
click node_notifications "https://github.com/htetaung-2025/sotto/blob/master/app/(tabs)/notifications.jsx"
click node_groupcreate "https://github.com/htetaung-2025/sotto/blob/master/app/group-create.jsx"
click node_groupjoin "https://github.com/htetaung-2025/sotto/blob/master/app/group-join.jsx"
click node_group "https://github.com/htetaung-2025/sotto/blob/master/app/group.jsx"
click node_firebase "https://github.com/htetaung-2025/sotto/blob/master/lib/firebase.ts"
click node_pushhelper "https://github.com/htetaung-2025/sotto/blob/master/lib/notifications.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_welcome,node_login,node_register,node_onboarding,node_profile,node_profiletab,node_user toneBlue
class node_reservations,node_requests,node_detail,node_notifications toneAmber
class node_groupcreate,node_groupjoin,node_group toneMint
class node_firebase,node_firestore,node_pushhelper toneRose
class node_expopush toneIndigo
```

## Components

### Entry and Profile

- [Welcome](https://github.com/htetaung-2025/sotto/blob/master/app/index.tsx): `app/index.tsx`
- [Login](https://github.com/htetaung-2025/sotto/blob/master/app/login.tsx): `app/login.tsx`
- **Registration**
- [Onboarding](https://github.com/htetaung-2025/sotto/blob/master/app/onboarding.tsx): `app/onboarding.tsx`
- [Profile setup](https://github.com/htetaung-2025/sotto/blob/master/app/profile-setup.jsx): `app/profile-setup.jsx`
- [Profile](https://github.com/htetaung-2025/sotto/blob/master/app/(tabs)/profile.jsx): `app/(tabs)/profile.jsx`

### Consultations

- [Post consultation](https://github.com/htetaung-2025/sotto/blob/master/app/(tabs)/reservations.jsx): `app/(tabs)/reservations.jsx`
- [My requests](https://github.com/htetaung-2025/sotto/blob/master/app/(tabs)/requests.jsx): `app/(tabs)/requests.jsx`
- [Request detail](https://github.com/htetaung-2025/sotto/blob/master/app/request-detail.jsx): `app/request-detail.jsx`
- [Notifications](https://github.com/htetaung-2025/sotto/blob/master/app/(tabs)/notifications.jsx): `app/(tabs)/notifications.jsx`

### Community

- [Create group](https://github.com/htetaung-2025/sotto/blob/master/app/group-create.jsx): `app/group-create.jsx`
- [Join group](https://github.com/htetaung-2025/sotto/blob/master/app/group-join.jsx): `app/group-join.jsx`
- [Group view](https://github.com/htetaung-2025/sotto/blob/master/app/group.jsx): `app/group.jsx`

### Backend Services

- [Firebase setup](https://github.com/htetaung-2025/sotto/blob/master/lib/firebase.ts): `lib/firebase.ts`
- **Firestore**
- [Push helpers](https://github.com/htetaung-2025/sotto/blob/master/lib/notifications.js): `lib/notifications.js`

### Other components

- **App user**
- **Expo push service**

## Connections

- App user → Welcome: opens app
- Welcome → Login: navigates to
- App user → Login: signs in
- App user → Registration: registers
- App user → Onboarding: continues through
- App user → Profile setup: sets profile
- Profile setup → Firestore: reads and writes
- Post consultation → Firestore: creates and watches requests
- Post consultation → Push helpers: sends consultation push
- My requests → Firestore: watches requests and responses
- Request detail → Firestore: reads and updates request
- Notifications → Firestore: reads and updates responses
- Notifications → Expo push service: sends response push
- Push helpers → Firestore: reads and updates
- Push helpers → Expo push service: sends push
- Firebase setup → Firestore: initializes
