# abhishekk-1804/nivora architecture

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

- Interactive diagram: https://gitdiagram.com/abhishekk-1804/nivora
- Repository: https://github.com/abhishekk-1804/nivora

## Overview

Nivora is a local-first Flutter health-tracking app. The principal journey runs from onboarding through cycle and daily-health logging into local history review, with reports and user-controlled export. Routines and reminders, access protection, and data management are additional product branches. The README documents these capabilities and key data-flow relationships; Dart implementation excerpts were not provided, so edges are limited to README-supported relationships.

Main entry points: [`lib/core/database/app_database.dart`](https://github.com/abhishekk-1804/nivora/blob/main/lib/core/database/app_database.dart) (Local health store), [`lib/features/settings/presentation/settings_screen.dart`](https://github.com/abhishekk-1804/nivora/blob/main/lib/features/settings/presentation/settings_screen.dart) (Data management), [`lib/features/routines`](https://github.com/abhishekk-1804/nivora/tree/main/lib/features/routines) (Routines), [`lib/features/cycle/presentation/cycle_controller.dart`](https://github.com/abhishekk-1804/nivora/blob/main/lib/features/cycle/presentation/cycle_controller.dart) (Cycle tracking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and onboarding"]
  node_onboarding["Onboarding"]
  node_app_entry["App entry<br/>[main.dart]"]
end

subgraph group_tracking["Health tracking"]
  node_cycle["Cycle tracking"]
  node_daily["Daily observations"]
  node_routines["Routines"]
  node_reminders["Local reminders"]
end

subgraph group_records["History and reports"]
  node_local_db[("Local health store<br/>[app_database.dart]")]
  node_db_provider["Database providers"]
  node_report["Reports and history"]
  node_pdf["PDF export"]
end

subgraph group_support["Privacy and data controls"]
  node_backup["Backup and restore"]
  node_auth["Biometric access<br/>[auth_service.dart]"]
  node_privacy["Privacy controls"]
  node_settings["Data management"]
end

node_user(("User"))

node_user -->|"starts setup"| node_onboarding
node_onboarding -.->|"enters app"| node_app_entry
node_user -->|"logs cycle"| node_cycle
node_user -->|"logs observations"| node_daily
node_user -->|"records routines"| node_routines
node_cycle -->|"saves events"| node_local_db
node_daily -->|"saves observations"| node_local_db
node_routines -->|"stores schedules"| node_local_db
node_db_provider -->|"streams changes"| node_local_db
node_local_db -->|"feeds review"| node_cycle
node_local_db -->|"provides history"| node_report
node_report -->|"generates summary"| node_pdf
node_routines -->|"schedules reminders"| node_reminders
node_user -->|"manages data"| node_settings
node_settings -->|"exports or restores"| node_backup
node_settings -->|"configures access"| node_auth
node_settings -->|"controls privacy"| node_privacy

click node_onboarding "https://github.com/abhishekk-1804/nivora/blob/main/lib/features/onboarding/presentation/onboarding_screen.dart"
click node_app_entry "https://github.com/abhishekk-1804/nivora/blob/main/lib/main.dart"
click node_cycle "https://github.com/abhishekk-1804/nivora/blob/main/lib/features/cycle/presentation/cycle_controller.dart"
click node_daily "https://github.com/abhishekk-1804/nivora/blob/main/lib/features/today/presentation/today_controller.dart"
click node_routines "https://github.com/abhishekk-1804/nivora/tree/main/lib/features/routines"
click node_local_db "https://github.com/abhishekk-1804/nivora/blob/main/lib/core/database/app_database.dart"
click node_db_provider "https://github.com/abhishekk-1804/nivora/blob/main/lib/core/providers/database_provider.dart"
click node_report "https://github.com/abhishekk-1804/nivora/blob/main/lib/features/report/presentation/report_controller.dart"
click node_pdf "https://github.com/abhishekk-1804/nivora/blob/main/lib/features/report/service/doctor_pdf_generator.dart"
click node_reminders "https://github.com/abhishekk-1804/nivora/blob/main/lib/core/notifications/notification_service.dart"
click node_backup "https://github.com/abhishekk-1804/nivora/blob/main/lib/core/services/backup_service.dart"
click node_auth "https://github.com/abhishekk-1804/nivora/blob/main/lib/core/services/auth_service.dart"
click node_privacy "https://github.com/abhishekk-1804/nivora/blob/main/lib/core/providers/privacy_provider.dart"
click node_settings "https://github.com/abhishekk-1804/nivora/blob/main/lib/features/settings/presentation/settings_screen.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_onboarding,node_app_entry,node_user toneBlue
class node_cycle,node_daily,node_routines,node_reminders toneAmber
class node_local_db,node_db_provider,node_report,node_pdf toneMint
class node_backup,node_auth,node_privacy,node_settings toneRose
```

## Components

### App and onboarding

- [Onboarding](https://github.com/abhishekk-1804/nivora/blob/main/lib/features/onboarding/presentation/onboarding_screen.dart): `lib/features/onboarding/presentation/onboarding_screen.dart`
- [App entry](https://github.com/abhishekk-1804/nivora/blob/main/lib/main.dart): `lib/main.dart`

### Health tracking

- [Cycle tracking](https://github.com/abhishekk-1804/nivora/blob/main/lib/features/cycle/presentation/cycle_controller.dart): `lib/features/cycle/presentation/cycle_controller.dart`
- [Daily observations](https://github.com/abhishekk-1804/nivora/blob/main/lib/features/today/presentation/today_controller.dart): `lib/features/today/presentation/today_controller.dart`
- [Routines](https://github.com/abhishekk-1804/nivora/tree/main/lib/features/routines): `lib/features/routines`
- [Local reminders](https://github.com/abhishekk-1804/nivora/blob/main/lib/core/notifications/notification_service.dart): `lib/core/notifications/notification_service.dart`

### History and reports

- [Local health store](https://github.com/abhishekk-1804/nivora/blob/main/lib/core/database/app_database.dart): `lib/core/database/app_database.dart`
- [Database providers](https://github.com/abhishekk-1804/nivora/blob/main/lib/core/providers/database_provider.dart): `lib/core/providers/database_provider.dart`
- [Reports and history](https://github.com/abhishekk-1804/nivora/blob/main/lib/features/report/presentation/report_controller.dart): `lib/features/report/presentation/report_controller.dart`
- [PDF export](https://github.com/abhishekk-1804/nivora/blob/main/lib/features/report/service/doctor_pdf_generator.dart): `lib/features/report/service/doctor_pdf_generator.dart`

### Privacy and data controls

- [Backup and restore](https://github.com/abhishekk-1804/nivora/blob/main/lib/core/services/backup_service.dart): `lib/core/services/backup_service.dart`
- [Biometric access](https://github.com/abhishekk-1804/nivora/blob/main/lib/core/services/auth_service.dart): `lib/core/services/auth_service.dart`
- [Privacy controls](https://github.com/abhishekk-1804/nivora/blob/main/lib/core/providers/privacy_provider.dart): `lib/core/providers/privacy_provider.dart`
- [Data management](https://github.com/abhishekk-1804/nivora/blob/main/lib/features/settings/presentation/settings_screen.dart): `lib/features/settings/presentation/settings_screen.dart`

### Other components

- **User**

## Connections

- User → Onboarding: starts setup (evidence: `README.md`)
- Onboarding → App entry: enters app
- User → Cycle tracking: logs cycle (evidence: `README.md`)
- User → Daily observations: logs observations (evidence: `README.md`)
- User → Routines: records routines (evidence: `README.md`)
- Cycle tracking → Local health store: saves events (evidence: `README.md`)
- Daily observations → Local health store: saves observations (evidence: `README.md`)
- Routines → Local health store: stores schedules (evidence: `README.md`)
- Database providers → Local health store: streams changes (evidence: `README.md`)
- Local health store → Cycle tracking: feeds review (evidence: `README.md`)
- Local health store → Reports and history: provides history (evidence: `README.md`)
- Reports and history → PDF export: generates summary (evidence: `README.md`)
- Routines → Local reminders: schedules reminders (evidence: `README.md`)
- User → Data management: manages data (evidence: `README.md`)
- Data management → Backup and restore: exports or restores (evidence: `README.md`)
- Data management → Biometric access: configures access (evidence: `README.md`)
- Data management → Privacy controls: controls privacy (evidence: `README.md`)
