# soummo19/androidnotificationreceiver architecture

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

- Interactive diagram: https://gitdiagram.com/soummo19/androidnotificationreceiver
- Repository: https://github.com/soummo19/androidnotificationreceiver

## Overview

This Android app lets a user inspect and refresh Firebase registration details, while receiving push messages and showing them both in the UI and as local notifications. MainActivity is the user-facing entry point; the Firebase messaging service handles incoming messages and token callbacks, NotificationRepository holds observable in-memory state and fetches Firebase identifiers, and NotificationHelper manages notification channels and banners. The excerpts establish these principal calls. Theme files are included as a UI layer; unsampled manifest wiring and UI state-observation details are not inferred.

Main entry points: [`app/src/main/java/com/soumyadeep/androidnotificationreceiver/MainActivity.kt`](https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/MainActivity.kt) (Main activity and screen), [`app/src/main/java/com/soumyadeep/androidnotificationreceiver/NotificationRepository.kt`](https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/NotificationRepository.kt) (Notification state and fetches), [`app/src/main/java/com/soumyadeep/androidnotificationreceiver/MyFirebaseMessagingService.kt`](https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/MyFirebaseMessagingService.kt) (FCM message service), [`app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Theme.kt`](https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Theme.kt) (Compose theme)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app_ui["App interface"]
  node_activity["Main activity and screen<br/>[MainActivity.kt]"]
end

subgraph group_message_handling["Message handling"]
  node_messaging_service["FCM message service"]
  node_notification_helper["Notification helper"]
end

subgraph group_firebase_state["Firebase state"]
  node_repository["Notification state and fetches"]
end

subgraph group_presentation["UI presentation"]
  node_theme["Compose theme<br/>[Theme.kt]"]
  node_colors["Theme colors<br/>[Color.kt]"]
  node_typography["Theme typography<br/>[Type.kt]"]
end

node_user(("App user"))
node_firebase_messaging["Firebase Messaging"]
node_firebase_installations["Firebase Installations"]
node_android_notifications["Android notifications"]

node_user -->|"opens"| node_activity
node_activity -->|"renders with"| node_theme
node_activity -->|"fetches and refreshes"| node_repository
node_activity -->|"creates channel"| node_notification_helper
node_theme -->|"uses palette"| node_colors
node_theme -->|"uses styles"| node_typography
node_firebase_messaging -.->|"delivers callbacks"| node_messaging_service
node_messaging_service -->|"updates state"| node_repository
node_messaging_service -->|"shows message"| node_notification_helper
node_repository -->|"fetches tokens"| node_firebase_messaging
node_repository -->|"fetches ID"| node_firebase_installations
node_notification_helper -->|"creates and posts"| node_android_notifications

click node_activity "https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/MainActivity.kt"
click node_messaging_service "https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/MyFirebaseMessagingService.kt"
click node_notification_helper "https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/NotificationHelper.kt"
click node_repository "https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/NotificationRepository.kt"
click node_theme "https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Theme.kt"
click node_colors "https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Color.kt"
click node_typography "https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Type.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_activity,node_user toneBlue
class node_messaging_service,node_notification_helper toneAmber
class node_repository toneMint
class node_theme,node_colors,node_typography toneRose
class node_firebase_messaging,node_firebase_installations,node_android_notifications toneIndigo
```

## Components

### App interface

- [Main activity and screen](https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/MainActivity.kt): `app/src/main/java/com/soumyadeep/androidnotificationreceiver/MainActivity.kt`

### Message handling

- [FCM message service](https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/MyFirebaseMessagingService.kt): `app/src/main/java/com/soumyadeep/androidnotificationreceiver/MyFirebaseMessagingService.kt`
- [Notification helper](https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/NotificationHelper.kt): `app/src/main/java/com/soumyadeep/androidnotificationreceiver/NotificationHelper.kt`

### Firebase state

- [Notification state and fetches](https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/NotificationRepository.kt): `app/src/main/java/com/soumyadeep/androidnotificationreceiver/NotificationRepository.kt`

### UI presentation

- [Compose theme](https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Theme.kt): `app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Theme.kt`
- [Theme colors](https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Color.kt): `app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Color.kt`
- [Theme typography](https://github.com/soummo19/androidnotificationreceiver/blob/main/app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Type.kt): `app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Type.kt`

### Other components

- **App user**
- **Firebase Messaging**
- **Firebase Installations**
- **Android notifications**

## Connections

- App user → Main activity and screen: opens (evidence: `app/src/main/java/com/soumyadeep/androidnotificationreceiver/MainActivity.kt`)
- Main activity and screen → Compose theme: renders with (evidence: `app/src/main/java/com/soumyadeep/androidnotificationreceiver/MainActivity.kt`)
- Main activity and screen → Notification state and fetches: fetches and refreshes (evidence: `app/src/main/java/com/soumyadeep/androidnotificationreceiver/MainActivity.kt`)
- Main activity and screen → Notification helper: creates channel (evidence: `app/src/main/java/com/soumyadeep/androidnotificationreceiver/MainActivity.kt`)
- Compose theme → Theme colors: uses palette (evidence: `app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Theme.kt`)
- Compose theme → Theme typography: uses styles (evidence: `app/src/main/java/com/soumyadeep/androidnotificationreceiver/ui/theme/Theme.kt`)
- Firebase Messaging → FCM message service: delivers callbacks
- FCM message service → Notification state and fetches: updates state (evidence: `app/src/main/java/com/soumyadeep/androidnotificationreceiver/MyFirebaseMessagingService.kt`)
- FCM message service → Notification helper: shows message (evidence: `app/src/main/java/com/soumyadeep/androidnotificationreceiver/MyFirebaseMessagingService.kt`)
- Notification state and fetches → Firebase Messaging: fetches tokens (evidence: `app/src/main/java/com/soumyadeep/androidnotificationreceiver/NotificationRepository.kt`)
- Notification state and fetches → Firebase Installations: fetches ID (evidence: `app/src/main/java/com/soumyadeep/androidnotificationreceiver/NotificationRepository.kt`)
- Notification helper → Android notifications: creates and posts (evidence: `app/src/main/java/com/soumyadeep/androidnotificationreceiver/NotificationHelper.kt`)
