# apoorv077569/mysanjeevni architecture

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

- Interactive diagram: https://gitdiagram.com/apoorv077569/mysanjeevni
- Repository: https://github.com/apoorv077569/mysanjeevni

## Overview

MySanjeevni is an Android healthcare and medicine-services app. A user enters through the app and can authenticate, browse health products or services, and pursue distinct flows such as cart/order checkout, lab-test booking, doctor consultation, prescription upload, and support. The sampled sources confirm several repository-to-API calls and Firebase notification persistence; the README is empty, and UI/navigation wiring for most feature flows was not sampled, so those connections are left unasserted. The graph preserves major capabilities visible in the source tree without implying an unverified end-to-end sequence.

Main entry points: [`app/src/main/java/com/mysanjeevni/mysanjeevni/data/remote/api/ApiService.kt`](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/data/remote/api/ApiService.kt) (Service API), [`app/src/main/java/com/mysanjeevni/mysanjeevni/utils/MyFirebaseService.kt`](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/utils/MyFirebaseService.kt) (Push notifications), [`app/src/main/java/com/mysanjeevni/mysanjeevni/features/home/presentation/ui/HomeScreen.kt`](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/home/presentation/ui/HomeScreen.kt) (Home discovery), [`app/src/main/java/com/mysanjeevni/mysanjeevni/features/auth/data/repository/AuthRepositoryImpl.kt`](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/auth/data/repository/AuthRepositoryImpl.kt) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_main["Android entry<br/>[MainActivity.kt]"]
  node_nav["Feature navigation<br/>[NavGraph.kt]"]
  node_home["Home discovery<br/>[HomeScreen.kt]"]
end

subgraph group_commerce["Medicine commerce"]
  node_catalog["Product catalog"]
  node_category["Category browsing"]
  node_cart["Shopping cart<br/>[CartViewModel.kt]"]
  node_cartstore[("Local cart store<br/>[CartDao.kt]")]
  node_orders["Order management"]
  node_prescription["Prescription upload"]
  node_reviews["Product reviews"]
end

subgraph group_care["Care services"]
  node_labs["Lab testing"]
  node_consult["Doctor consultation"]
  node_agora["Video consultation<br/>[AgoraManager.kt]"]
  node_support["Customer support"]
end

subgraph group_platform["Identity and platform"]
  node_authui["Sign-in and OTP<br/>[LoginScreen.kt]"]
  node_authrepo["Authentication"]
  node_authapi["Auth API<br/>[AuthApiService.kt]"]
  node_session[("Session preferences<br/>[SessionManager.kt]")]
  node_api["Service API<br/>[ApiService.kt]"]
  node_push["Push notifications"]
  node_notifications[("Notification history<br/>[NotificationDao.kt]")]
end

node_user(("App user"))
node_backend{{"Healthcare service backend"}}
node_firebase{{"Firebase Cloud Messaging"}}

node_user -.->|"opens"| node_main
node_main -.->|"routes through"| node_nav
node_user -.->|"signs in"| node_authui
node_authui -.->|"requests auth"| node_authrepo
node_authrepo -->|"calls login and OTP"| node_api
node_authrepo -.->|"stores session"| node_session
node_user -.->|"browses"| node_home
node_home -.->|"shows products"| node_catalog
node_home -.->|"shows categories"| node_category
node_cart -.->|"reads and writes"| node_cartstore
node_orders -->|"creates and fetches orders"| node_api
node_prescription -.->|"uploads prescription"| node_api
node_labs -->|"books and checks slots"| node_api
node_consult -->|"books consultations"| node_api
node_consult -.->|"starts video call"| node_agora
node_support -.->|"uses support endpoints"| node_api
node_reviews -->|"reads and submits reviews"| node_api
node_api -->|"sends service requests"| node_backend
node_firebase -.->|"delivers messages"| node_push
node_push -->|"inserts history"| node_notifications
node_push -->|"checks notification setting"| node_session
node_push -->|"opens notification route"| node_main

click node_main "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/app/MainActivity.kt"
click node_nav "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/app/navigation/NavGraph.kt"
click node_home "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/home/presentation/ui/HomeScreen.kt"
click node_authui "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/auth/presentation/ui/LoginScreen.kt"
click node_authrepo "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/auth/data/repository/AuthRepositoryImpl.kt"
click node_authapi "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/data/remote/api/AuthApiService.kt"
click node_session "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/utils/SessionManager.kt"
click node_catalog "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/medicines/data/repository/MedicineRepositoryImpl.kt"
click node_category "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/category/data/repository/CategoryRepositoryImpl.kt"
click node_cart "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/cart/presentation/viewmodel/CartViewModel.kt"
click node_cartstore "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/cart/data/local/dao/CartDao.kt"
click node_orders "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/orders/data/repository/OrderRepositoryImpl.kt"
click node_prescription "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/prescription/data/repository/PrescriptionRepositoryImpl.kt"
click node_labs "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/labs/data/repository/LabsRepositoryImpl.kt"
click node_consult "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/consult/data/repository/ConsultRepositoryImpl.kt"
click node_agora "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/consult/data/agora/AgoraManager.kt"
click node_support "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/support/chat/data/repository/ChatRepositoryImpl.kt"
click node_reviews "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/review/data/repository/ReviewRepositoryImpl.kt"
click node_api "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/data/remote/api/ApiService.kt"
click node_push "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/utils/MyFirebaseService.kt"
click node_notifications "https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/data/local/dao/NotificationDao.kt"

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_main,node_nav,node_home,node_user toneBlue
class node_catalog,node_category,node_cart,node_cartstore,node_orders,node_prescription,node_reviews toneAmber
class node_labs,node_consult,node_agora,node_support toneMint
class node_authui,node_authrepo,node_authapi,node_session,node_api,node_push,node_notifications toneRose
class node_backend,node_firebase toneIndigo
```

## Components

### App shell

- [Android entry](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/app/MainActivity.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/app/MainActivity.kt`
- [Feature navigation](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/app/navigation/NavGraph.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/app/navigation/NavGraph.kt`
- [Home discovery](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/home/presentation/ui/HomeScreen.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/home/presentation/ui/HomeScreen.kt`

### Medicine commerce

- [Product catalog](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/medicines/data/repository/MedicineRepositoryImpl.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/medicines/data/repository/MedicineRepositoryImpl.kt`
- [Category browsing](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/category/data/repository/CategoryRepositoryImpl.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/category/data/repository/CategoryRepositoryImpl.kt`
- [Shopping cart](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/cart/presentation/viewmodel/CartViewModel.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/cart/presentation/viewmodel/CartViewModel.kt`
- [Local cart store](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/cart/data/local/dao/CartDao.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/cart/data/local/dao/CartDao.kt`
- [Order management](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/orders/data/repository/OrderRepositoryImpl.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/orders/data/repository/OrderRepositoryImpl.kt`
- [Prescription upload](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/prescription/data/repository/PrescriptionRepositoryImpl.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/prescription/data/repository/PrescriptionRepositoryImpl.kt`
- [Product reviews](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/review/data/repository/ReviewRepositoryImpl.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/review/data/repository/ReviewRepositoryImpl.kt`

### Care services

- [Lab testing](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/labs/data/repository/LabsRepositoryImpl.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/labs/data/repository/LabsRepositoryImpl.kt`
- [Doctor consultation](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/consult/data/repository/ConsultRepositoryImpl.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/consult/data/repository/ConsultRepositoryImpl.kt`
- [Video consultation](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/consult/data/agora/AgoraManager.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/consult/data/agora/AgoraManager.kt`
- [Customer support](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/support/chat/data/repository/ChatRepositoryImpl.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/support/chat/data/repository/ChatRepositoryImpl.kt`

### Identity and platform

- [Sign-in and OTP](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/auth/presentation/ui/LoginScreen.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/auth/presentation/ui/LoginScreen.kt`
- [Authentication](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/features/auth/data/repository/AuthRepositoryImpl.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/features/auth/data/repository/AuthRepositoryImpl.kt`
- [Auth API](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/data/remote/api/AuthApiService.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/data/remote/api/AuthApiService.kt`
- [Session preferences](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/utils/SessionManager.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/utils/SessionManager.kt`
- [Service API](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/data/remote/api/ApiService.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/data/remote/api/ApiService.kt`
- [Push notifications](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/utils/MyFirebaseService.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/utils/MyFirebaseService.kt`
- [Notification history](https://github.com/apoorv077569/mysanjeevni/blob/master/app/src/main/java/com/mysanjeevni/mysanjeevni/data/local/dao/NotificationDao.kt): `app/src/main/java/com/mysanjeevni/mysanjeevni/data/local/dao/NotificationDao.kt`

### Other components

- **App user**
- **Healthcare service backend**
- **Firebase Cloud Messaging**

## Connections

- App user → Android entry: opens
- Android entry → Feature navigation: routes through
- App user → Sign-in and OTP: signs in
- Sign-in and OTP → Authentication: requests auth
- Authentication → Service API: calls login and OTP (evidence: `app/src/main/java/com/mysanjeevni/mysanjeevni/features/auth/data/repository/AuthRepositoryImpl.kt`)
- Authentication → Session preferences: stores session
- App user → Home discovery: browses
- Home discovery → Product catalog: shows products
- Home discovery → Category browsing: shows categories
- Shopping cart → Local cart store: reads and writes
- Order management → Service API: creates and fetches orders (evidence: `app/src/main/java/com/mysanjeevni/mysanjeevni/features/orders/data/repository/OrderRepositoryImpl.kt`)
- Prescription upload → Service API: uploads prescription
- Lab testing → Service API: books and checks slots (evidence: `app/src/main/java/com/mysanjeevni/mysanjeevni/features/labs/data/repository/LabsRepositoryImpl.kt`)
- Doctor consultation → Service API: books consultations (evidence: `app/src/main/java/com/mysanjeevni/mysanjeevni/features/consult/data/repository/ConsultRepositoryImpl.kt`)
- Doctor consultation → Video consultation: starts video call
- Customer support → Service API: uses support endpoints
- Product reviews → Service API: reads and submits reviews (evidence: `app/src/main/java/com/mysanjeevni/mysanjeevni/features/review/data/repository/ReviewRepositoryImpl.kt`)
- Service API → Healthcare service backend: sends service requests (evidence: `app/src/main/java/com/mysanjeevni/mysanjeevni/data/remote/api/ApiService.kt`)
- Firebase Cloud Messaging → Push notifications: delivers messages
- Push notifications → Notification history: inserts history (evidence: `app/src/main/java/com/mysanjeevni/mysanjeevni/utils/MyFirebaseService.kt`)
- Push notifications → Session preferences: checks notification setting (evidence: `app/src/main/java/com/mysanjeevni/mysanjeevni/utils/MyFirebaseService.kt`)
- Push notifications → Android entry: opens notification route (evidence: `app/src/main/java/com/mysanjeevni/mysanjeevni/utils/MyFirebaseService.kt`)
