# amritha0503/mini-project architecture

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

- Interactive diagram: https://gitdiagram.com/amritha0503/mini-project
- Repository: https://github.com/amritha0503/mini-project

## Overview

1) **Overall shape**
CyberGuard is a Flutter-first Android app with a small amount of native Android glue. There is no bespoke backend service in this repo; Firebase is the cloud boundary for auth, storage, and push messaging. Most behavior, scoring, and presentation logic lives in `lib/`, while Android-specific lifecycle and background execution are handled under `android/app/src/main/kotlin`.

2) **App bootstrap and composition**
`lib/main.dart` is the Flutter entry point. `firebase_options.dart` and `lib/core/app_config.dart` provide environment/Firebase wiring, and the app theme lives in `lib/theme/app_theme.dart`. The README indicates Riverpod is used for state/dependency management, so the UI is likely composed from injected services rather than direct singleton access.

3) **Monitoring subsystem**
The core product is passive risk monitoring. The service layer is split by signal type: `background_monitor_service.dart`, `continuous_monitoring_service.dart`, `network_monitor_service.dart`, `cross_app_url_monitor.dart`, `app_safety_service.dart`, and `email_spam_service.dart`. These services detect privacy-safe behavioral events such as unsafe links, suspicious downloads, unknown app installs, weak passwords, and network/security changes.

4) **Android lifecycle and background execution boundary**
Android native code is used to keep monitoring alive across app restarts and device boots. `BootReceiver.kt` suggests restart-on-boot behavior, `BackgroundMonitorService.kt` provides a native service hook, and `MainActivity.kt` hosts the Flutter runtime. WorkManager is the documented scheduler, running periodic checks roughly every 15 minutes. This is the key boundary between Flutter UI and OS-managed background work.

5) **Domain model and event pipeline**
The data model layer captures the app’s main domain objects: `behavior_event.dart`, `user_risk_profile.dart`, `app_usage_session.dart`, and `spam_email.dart`. Monitoring services create events with timestamp, severity, and metadata; those events become the source of truth for risk, trends, and logs.

6) **Risk computation**
`lib/utils/risk_scoring_engine.dart` is the central business rule engine. It turns accumulated behavior events into a 0–100 cyber risk score with diminishing returns for repeated events, and then maps that score into LOW / MODERATE / HIGH bands. This engine is called both on new events and during periodic background refreshes.

7) **Storage and sync**
`lib/services/firestore_service.dart` is the persistence layer. Firestore appears to store the event history, user risk profile, and trend data that power the dashboard and logs. `firestore.rules` is an important security boundary for what the client can read/write. The README also mentions cache-first access and offline persistence, so local responsiveness is expected even when connectivity is limited.

8) **Alerts and notification delivery**
`lib/services/notification_service.dart` handles on-device notifications, while Firebase Cloud Messaging provides remote alerts. Alerts are triggered by conditions like high risk, suspicious Wi‑Fi, malicious URLs, or background changes. This creates a dual-path notification model: local device alerts for immediate feedback and FCM for remote push events.

9) **Presentation layer**
The UI is organized by screen in `lib/screens/`: dashboard, home, login, consent, alerts, behavior log, profile, app safety, app usage, real-time monitor, email spam, and help. The dashboard is the primary composite view, backed by reusable widgets such as `risk_score_gauge.dart`, `trend_chart.dart`, `recommendation_card.dart`, `stat_card.dart`, `risk_block_overlay.dart`, and `wifi_info_card.dart`.

10) **User flow and gating**
The app flow appears to be: authentication, consent, then monitoring/dashboard. `login_screen.dart` and `consent_screen.dart` are explicit gates before the monitoring experience. That matters architecturally because it separates identity and permission setup from ongoing passive analysis.

11) **Android and Firebase infrastructure**
`android/app/google-services.json`, `firebase_auth`, `cloud_firestore`, and `firebase_messaging` indicate the Firebase stack is essential to the app’s runtime architecture. Android permissions and `network_security_config.xml` support network/Wi‑Fi inspection and notifications. The app also uses a foreground/background service model and periodic scheduler rather than a continuously polling loop, which is important for battery behavior.

12) **Build, flavors, and delivery**
The repo supports dev/prod flavors and a Flutter CI workflow under `.github/workflows/flutter_ci.yml`. The README notes production disables demo/test attack paths, which means the architecture includes feature gating between presentation/demo behavior and real release behavior.

13) **What an architecture diagram should emphasize**
The most important boundaries are:
- Flutter UI vs Android OS services
- Monitoring signals vs scoring engine
- Client app vs Firebase persistence/notifications
- Auth/consent gate vs post-consent monitoring
- Local notification path vs remote FCM path

If diagrammed, the central loop is: monitored signal → event model → Firestore/local cache → risk scoring engine → dashboard/recommendations → notifications/alerts.

Main entry points: [`lib/services/firestore_service.dart`](https://github.com/amritha0503/mini-project/blob/main/lib/services/firestore_service.dart) (Firestore service), [`lib/services/continuous_monitoring_service.dart`](https://github.com/amritha0503/mini-project/blob/main/lib/services/continuous_monitoring_service.dart) (Continuous monitor), [`lib/main.dart`](https://github.com/amritha0503/mini-project/blob/main/lib/main.dart) (App entry), [`lib/screens/dashboard_screen.dart`](https://github.com/amritha0503/mini-project/blob/main/lib/screens/dashboard_screen.dart) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flutter["Flutter app"]
  node_main(("App entry<br/>Flutter entry<br/>[main.dart]"))
  node_app_config["App config<br/>[app_config.dart]"]
  node_firebase_options["Firebase options<br/>Firebase config"]
  node_theme["App theme<br/>[app_theme.dart]"]
end

subgraph group_android["Android glue"]
  node_boot_receiver["Boot receiver<br/>Android receiver<br/>[BootReceiver.kt]"]
  node_bg_service_native["Native service<br/>Android service"]
  node_main_activity["Main activity<br/>Android host<br/>[MainActivity.kt]"]
end

subgraph group_firebase["Firebase boundary"]
  node_firestore_rules["Firestore rules<br/>Security rules<br/>[firestore.rules]"]
end

subgraph group_ui["Presentation"]
  node_dashboard(("Dashboard<br/>Screen"))
  node_home(("Home<br/>Screen<br/>[home_screen.dart]"))
  node_login(("Login<br/>Screen<br/>[login_screen.dart]"))
  node_consent(("Consent<br/>Screen"))
  node_alerts(("Alerts<br/>Screen<br/>[alerts_screen.dart]"))
  node_behavior_log(("Behavior log<br/>Screen"))
  node_profile(("Profile<br/>Screen"))
  node_app_safety_screen(("App safety<br/>Screen"))
  node_app_usage_screen(("Usage<br/>Screen"))
  node_monitor_screen(("Live monitor<br/>Screen"))
  node_email_spam_screen(("Email spam<br/>Screen"))
  node_help(("Help<br/>Screen<br/>[help_screen.dart]"))
  node_dashboard_widgets["Dashboard widgets<br/>UI widgets"]
end

subgraph group_core["Domain core"]
  node_firestore_service[("Firestore service<br/>Persistence")]
  node_notification_service["Notifications<br/>Delivery"]
  node_background_monitor["Background monitor<br/>Orchestrator"]
  node_continuous_monitoring["Continuous monitor<br/>Signal service"]
  node_network_monitor["Network monitor<br/>Signal service"]
  node_url_monitor["URL monitor<br/>Signal service"]
  node_app_safety_service["App safety<br/>Signal service"]
  node_email_spam_service["Spam monitor<br/>Signal service"]
  node_risk_engine{{"Risk engine<br/>Scoring"}}
  node_behavior_event["Behavior event<br/>Event model"]
  node_risk_profile["Risk profile<br/>User model"]
  node_usage_session["Usage session<br/>Session model"]
  node_spam_email["Spam email<br/>Content model<br/>[spam_email.dart]"]
end

node_main -->|"uses"| node_app_config
node_main -->|"uses"| node_firebase_options
node_main -->|"applies"| node_theme
node_main -->|"opens"| node_home
node_main -->|"routes"| node_dashboard
node_login -->|"gates"| node_consent
node_consent -->|"unlocks"| node_home
node_home -->|"navigates"| node_dashboard
node_home -->|"navigates"| node_alerts
node_home -->|"navigates"| node_profile
node_dashboard -->|"composes"| node_dashboard_widgets
node_dashboard -->|"reads"| node_risk_profile
node_behavior_log -->|"shows"| node_behavior_event
node_background_monitor -->|"orchestrates"| node_continuous_monitoring
node_continuous_monitoring -->|"includes"| node_network_monitor
node_continuous_monitoring -->|"includes"| node_url_monitor
node_continuous_monitoring -->|"includes"| node_app_safety_service
node_continuous_monitoring -->|"includes"| node_email_spam_service
node_continuous_monitoring -->|"emits"| node_behavior_event
node_background_monitor -->|"refreshes"| node_behavior_event
node_behavior_event -->|"scores"| node_risk_engine
node_risk_engine -->|"updates"| node_risk_profile
node_risk_engine -->|"drives"| node_dashboard
node_risk_engine -->|"triggers"| node_notification_service
node_firestore_service -->|"stores"| node_behavior_event
node_firestore_service -->|"stores"| node_risk_profile
node_firestore_service -->|"stores"| node_usage_session
node_firestore_service -->|"stores"| node_spam_email
node_firestore_service -->|"constrained by"| node_firestore_rules
node_notification_service -->|"feeds"| node_alerts
node_boot_receiver -->|"starts"| node_bg_service_native
node_bg_service_native -->|"bridges"| node_background_monitor
node_main_activity -->|"hosts"| node_main
node_firestore_service -->|"serves"| node_dashboard
node_firestore_service -->|"serves"| node_behavior_log
node_firestore_service -->|"serves"| node_app_safety_screen
node_firestore_service -->|"serves"| node_email_spam_screen
node_firestore_service -->|"serves"| node_monitor_screen

click node_main "https://github.com/amritha0503/mini-project/blob/main/lib/main.dart"
click node_app_config "https://github.com/amritha0503/mini-project/blob/main/lib/core/app_config.dart"
click node_firebase_options "https://github.com/amritha0503/mini-project/blob/main/lib/firebase_options.dart"
click node_theme "https://github.com/amritha0503/mini-project/blob/main/lib/theme/app_theme.dart"
click node_boot_receiver "https://github.com/amritha0503/mini-project/blob/main/android/app/src/main/kotlin/com/cyberriskanalyzer/BootReceiver.kt"
click node_bg_service_native "https://github.com/amritha0503/mini-project/blob/main/android/app/src/main/kotlin/com/cyberriskanalyzer/BackgroundMonitorService.kt"
click node_main_activity "https://github.com/amritha0503/mini-project/blob/main/android/app/src/main/kotlin/com/cyberriskanalyzer/MainActivity.kt"
click node_firestore_rules "https://github.com/amritha0503/mini-project/blob/main/firestore.rules"
click node_firestore_service "https://github.com/amritha0503/mini-project/blob/main/lib/services/firestore_service.dart"
click node_notification_service "https://github.com/amritha0503/mini-project/blob/main/lib/services/notification_service.dart"
click node_background_monitor "https://github.com/amritha0503/mini-project/blob/main/lib/services/background_monitor_service.dart"
click node_continuous_monitoring "https://github.com/amritha0503/mini-project/blob/main/lib/services/continuous_monitoring_service.dart"
click node_network_monitor "https://github.com/amritha0503/mini-project/blob/main/lib/services/network_monitor_service.dart"
click node_url_monitor "https://github.com/amritha0503/mini-project/blob/main/lib/services/cross_app_url_monitor.dart"
click node_app_safety_service "https://github.com/amritha0503/mini-project/blob/main/lib/services/app_safety_service.dart"
click node_email_spam_service "https://github.com/amritha0503/mini-project/blob/main/lib/services/email_spam_service.dart"
click node_risk_engine "https://github.com/amritha0503/mini-project/blob/main/lib/utils/risk_scoring_engine.dart"
click node_behavior_event "https://github.com/amritha0503/mini-project/blob/main/lib/models/behavior_event.dart"
click node_risk_profile "https://github.com/amritha0503/mini-project/blob/main/lib/models/user_risk_profile.dart"
click node_usage_session "https://github.com/amritha0503/mini-project/blob/main/lib/models/app_usage_session.dart"
click node_spam_email "https://github.com/amritha0503/mini-project/blob/main/lib/models/spam_email.dart"
click node_dashboard "https://github.com/amritha0503/mini-project/blob/main/lib/screens/dashboard_screen.dart"
click node_home "https://github.com/amritha0503/mini-project/blob/main/lib/screens/home_screen.dart"
click node_login "https://github.com/amritha0503/mini-project/blob/main/lib/screens/login_screen.dart"
click node_consent "https://github.com/amritha0503/mini-project/blob/main/lib/screens/consent_screen.dart"
click node_alerts "https://github.com/amritha0503/mini-project/blob/main/lib/screens/alerts_screen.dart"
click node_behavior_log "https://github.com/amritha0503/mini-project/blob/main/lib/screens/behavior_log_screen.dart"
click node_profile "https://github.com/amritha0503/mini-project/blob/main/lib/screens/profile_screen.dart"
click node_app_safety_screen "https://github.com/amritha0503/mini-project/blob/main/lib/screens/app_safety_screen.dart"
click node_app_usage_screen "https://github.com/amritha0503/mini-project/blob/main/lib/screens/app_usage_screen.dart"
click node_monitor_screen "https://github.com/amritha0503/mini-project/blob/main/lib/screens/real_time_monitor_screen.dart"
click node_email_spam_screen "https://github.com/amritha0503/mini-project/blob/main/lib/screens/email_spam_screen.dart"
click node_help "https://github.com/amritha0503/mini-project/blob/main/lib/screens/help_screen.dart"
click node_dashboard_widgets "https://github.com/amritha0503/mini-project/blob/main/lib/widgets/risk_score_gauge.dart"

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_app_config,node_firebase_options,node_theme toneBlue
class node_boot_receiver,node_bg_service_native,node_main_activity toneAmber
class node_firestore_rules toneMint
class node_dashboard,node_home,node_login,node_consent,node_alerts,node_behavior_log,node_profile,node_app_safety_screen,node_app_usage_screen,node_monitor_screen,node_email_spam_screen,node_help,node_dashboard_widgets toneRose
class node_firestore_service,node_notification_service,node_background_monitor,node_continuous_monitoring,node_network_monitor,node_url_monitor,node_app_safety_service,node_email_spam_service,node_risk_engine,node_behavior_event,node_risk_profile,node_usage_session,node_spam_email toneIndigo
```

## Components

### Flutter app

Dart-side application, domain logic, UI, and service orchestration.

- [App entry](https://github.com/amritha0503/mini-project/blob/main/lib/main.dart): Flutter entry · Bootstraps the app and wires top-level composition. · `lib/main.dart`
- [App config](https://github.com/amritha0503/mini-project/blob/main/lib/core/app_config.dart): Config · Environment and Firebase wiring. · `lib/core/app_config.dart`
- [Firebase options](https://github.com/amritha0503/mini-project/blob/main/lib/firebase_options.dart): Firebase config · Generated Firebase platform settings. · `lib/firebase_options.dart`
- [App theme](https://github.com/amritha0503/mini-project/blob/main/lib/theme/app_theme.dart): Theme · Global styling and visual tokens. · `lib/theme/app_theme.dart`

### Android glue

Native lifecycle and background execution boundary.

- [Boot receiver](https://github.com/amritha0503/mini-project/blob/main/android/app/src/main/kotlin/com/cyberriskanalyzer/BootReceiver.kt): Android receiver · Restarts monitoring after device boot. · `android/app/src/main/kotlin/com/cyberriskanalyzer/BootReceiver.kt`
- [Native service](https://github.com/amritha0503/mini-project/blob/main/android/app/src/main/kotlin/com/cyberriskanalyzer/BackgroundMonitorService.kt): Android service · Android background service hook for long-running monitoring. · `android/app/src/main/kotlin/com/cyberriskanalyzer/BackgroundMonitorService.kt`
- [Main activity](https://github.com/amritha0503/mini-project/blob/main/android/app/src/main/kotlin/com/cyberriskanalyzer/MainActivity.kt): Android host · Hosts the Flutter runtime on Android. · `android/app/src/main/kotlin/com/cyberriskanalyzer/MainActivity.kt`

### Firebase boundary

Cloud persistence, auth, and push messaging integration.

- [Firestore rules](https://github.com/amritha0503/mini-project/blob/main/firestore.rules): Security rules · Client read/write boundary for persisted app data. · `firestore.rules`

### Presentation

Screens and reusable dashboard widgets.

- [Dashboard](https://github.com/amritha0503/mini-project/blob/main/lib/screens/dashboard_screen.dart): Screen · Primary overview of risk, trends, and recommendations. · `lib/screens/dashboard_screen.dart`
- [Home](https://github.com/amritha0503/mini-project/blob/main/lib/screens/home_screen.dart): Screen · Top-level landing and navigation shell. · `lib/screens/home_screen.dart`
- [Login](https://github.com/amritha0503/mini-project/blob/main/lib/screens/login_screen.dart): Screen · Authentication gate before monitoring starts. · `lib/screens/login_screen.dart`
- [Consent](https://github.com/amritha0503/mini-project/blob/main/lib/screens/consent_screen.dart): Screen · Permission and privacy gate for monitoring. · `lib/screens/consent_screen.dart`
- [Alerts](https://github.com/amritha0503/mini-project/blob/main/lib/screens/alerts_screen.dart): Screen · User-facing alert and notification log. · `lib/screens/alerts_screen.dart`
- [Behavior log](https://github.com/amritha0503/mini-project/blob/main/lib/screens/behavior_log_screen.dart): Screen · Historical event timeline and audit view. · `lib/screens/behavior_log_screen.dart`
- [Profile](https://github.com/amritha0503/mini-project/blob/main/lib/screens/profile_screen.dart): Screen · User settings and account state. · `lib/screens/profile_screen.dart`
- [App safety](https://github.com/amritha0503/mini-project/blob/main/lib/screens/app_safety_screen.dart): Screen · Visibility into app and device safety checks. · `lib/screens/app_safety_screen.dart`
- [Usage](https://github.com/amritha0503/mini-project/blob/main/lib/screens/app_usage_screen.dart): Screen · App usage and session insights. · `lib/screens/app_usage_screen.dart`
- [Live monitor](https://github.com/amritha0503/mini-project/blob/main/lib/screens/real_time_monitor_screen.dart): Screen · Real-time monitoring status and signal view. · `lib/screens/real_time_monitor_screen.dart`
- [Email spam](https://github.com/amritha0503/mini-project/blob/main/lib/screens/email_spam_screen.dart): Screen · Spam analysis and email risk view. · `lib/screens/email_spam_screen.dart`
- [Help](https://github.com/amritha0503/mini-project/blob/main/lib/screens/help_screen.dart): Screen · User guidance and support content. · `lib/screens/help_screen.dart`
- [Dashboard widgets](https://github.com/amritha0503/mini-project/blob/main/lib/widgets/risk_score_gauge.dart): UI widgets · Reusable dashboard components for scores, trends, cards, and overlays. · `lib/widgets/risk_score_gauge.dart`

### Domain core

Event, risk, and monitoring services.

- [Firestore service](https://github.com/amritha0503/mini-project/blob/main/lib/services/firestore_service.dart): Persistence · Client-side storage and sync for events, trends, and risk state. · `lib/services/firestore_service.dart`
- [Notifications](https://github.com/amritha0503/mini-project/blob/main/lib/services/notification_service.dart): Delivery · Local on-device alert delivery. · `lib/services/notification_service.dart`
- [Background monitor](https://github.com/amritha0503/mini-project/blob/main/lib/services/background_monitor_service.dart): Orchestrator · Coordinates periodic background checks and refreshes. · `lib/services/background_monitor_service.dart`
- [Continuous monitor](https://github.com/amritha0503/mini-project/blob/main/lib/services/continuous_monitoring_service.dart): Signal service · Runs ongoing passive monitoring workflows. · `lib/services/continuous_monitoring_service.dart`
- [Network monitor](https://github.com/amritha0503/mini-project/blob/main/lib/services/network_monitor_service.dart): Signal service · Detects suspicious Wi-Fi and network changes. · `lib/services/network_monitor_service.dart`
- [URL monitor](https://github.com/amritha0503/mini-project/blob/main/lib/services/cross_app_url_monitor.dart): Signal service · Tracks unsafe links across apps and browsing surfaces. · `lib/services/cross_app_url_monitor.dart`
- [App safety](https://github.com/amritha0503/mini-project/blob/main/lib/services/app_safety_service.dart): Signal service · Checks app-install and device-safety conditions. · `lib/services/app_safety_service.dart`
- [Spam monitor](https://github.com/amritha0503/mini-project/blob/main/lib/services/email_spam_service.dart): Signal service · Analyzes suspicious email and spam signals. · `lib/services/email_spam_service.dart`
- [Risk engine](https://github.com/amritha0503/mini-project/blob/main/lib/utils/risk_scoring_engine.dart): Scoring · Converts accumulated events into risk score and bands. · `lib/utils/risk_scoring_engine.dart`
- [Behavior event](https://github.com/amritha0503/mini-project/blob/main/lib/models/behavior_event.dart): Event model · Canonical monitored event with severity and metadata. · `lib/models/behavior_event.dart`
- [Risk profile](https://github.com/amritha0503/mini-project/blob/main/lib/models/user_risk_profile.dart): User model · User-level risk state and derived trends. · `lib/models/user_risk_profile.dart`
- [Usage session](https://github.com/amritha0503/mini-project/blob/main/lib/models/app_usage_session.dart): Session model · App usage timeline and session record. · `lib/models/app_usage_session.dart`
- [Spam email](https://github.com/amritha0503/mini-project/blob/main/lib/models/spam_email.dart): Content model · Structured email/spam payload used by detection flows. · `lib/models/spam_email.dart`

## Connections

- App entry → App config: uses · Initializes environment and runtime wiring.
- App entry → Firebase options: uses · Loads generated Firebase settings.
- App entry → App theme: applies · Sets the application theme.
- App entry → Home: opens · Starts the user-facing shell.
- App entry → Dashboard: routes · Navigates into the monitoring experience.
- Login → Consent: gates · Authentication precedes consent.
- Consent → Home: unlocks · Monitoring UI becomes available after consent.
- Home → Dashboard: navigates · Primary entry into the app overview.
- Home → Alerts: navigates · Surfaces alert history.
- Home → Profile: navigates · Opens user settings and identity state.
- Dashboard → Dashboard widgets: composes · Uses gauges, charts, cards, and overlays.
- Dashboard → Risk profile: reads · Displays derived user risk state.
- Behavior log → Behavior event: shows · Presents raw monitored events.
- Background monitor → Continuous monitor: orchestrates · Coordinates ongoing passive checks.
- Continuous monitor → Network monitor: includes · Monitors Wi-Fi and network changes.
- Continuous monitor → URL monitor: includes · Detects unsafe link behavior.
- Continuous monitor → App safety: includes · Checks app and device safety conditions.
- Continuous monitor → Spam monitor: includes · Analyzes spam and suspicious email.
- Continuous monitor → Behavior event: emits · Produces canonical risk events.
- Background monitor → Behavior event: refreshes · Feeds periodic checks into event creation.
- Behavior event → Risk engine: scores · Events are the input to risk calculation.
- Risk engine → Risk profile: updates · Derives score and band into profile state.
- Risk engine → Dashboard: drives · Feeds risk, trends, and recommendations.
- Risk engine → Notifications: triggers · High-risk changes can trigger local alerts.
- Firestore service → Behavior event: stores · Persists event history and logs.
- Firestore service → Risk profile: stores · Persists score and trend state.
- Firestore service → Usage session: stores · Persists usage/session records.
- Firestore service → Spam email: stores · Persists email analysis artifacts.
- Firestore service → Firestore rules: constrained by · Read/write access is restricted by rules.
- Notifications → Alerts: feeds · Populates user-visible alert views.
- Boot receiver → Native service: starts · Restarts background execution after boot.
- Native service → Background monitor: bridges · Native Android hook into Flutter monitoring.
- Main activity → App entry: hosts · Android entrypoint for Flutter runtime.
- Firestore service → Dashboard: serves · Supplies data for dashboard views.
- Firestore service → Behavior log: serves · Supplies historical event data.
- Firestore service → App safety: serves · Supplies safety status data.
- Firestore service → Email spam: serves · Supplies spam analysis data.
- Firestore service → Live monitor: serves · Supplies live monitoring state.
