# aminnateghi/yadli-react-native architecture

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

- Interactive diagram: https://gitdiagram.com/aminnateghi/yadli-react-native
- Repository: https://github.com/aminnateghi/yadli-react-native

## Overview

Yadli is an offline vehicle-maintenance app: users select a vehicle, record refueling, services, and expenses, manage reminders, and review dashboard statistics. Its domain repositories use on-device SQLite; reminder scheduling is a separate native-notification concern, while profile data also supplies language preferences. The README documents the product capabilities and offline model; several route and repository implementations are unsampled, so edges between those layers are omitted unless the source index or excerpts support them.

Main entry points: [`src/repositories/statistics/statistics-repository.ts`](https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/statistics/statistics-repository.ts) (Statistics engine), [`src/db/index.ts`](https://github.com/aminnateghi/yadli-react-native/blob/main/src/db/index.ts) (SQLite client), [`src/utils/reminder-notifications.ts`](https://github.com/aminnateghi/yadli-react-native/blob/main/src/utils/reminder-notifications.ts) (Reminder notifications), [`src/app/(tabs)/fuel/index.tsx`](https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/fuel/index.tsx) (Fuel log)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_home["Dashboard<br/>[index.tsx]"]
end

subgraph group_records["Vehicle records"]
  node_fuel["Fuel log<br/>[index.tsx]"]
  node_service["Service log<br/>[index.tsx]"]
  node_expense["Expense log<br/>[index.tsx]"]
  node_vehicles["Vehicle manager<br/>[index.tsx]"]
  node_fuel_repo["Fuel records<br/>[fuel-repository.ts]"]
  node_service_repo["Service records"]
  node_expense_repo["Expense records"]
  node_vehicle_repo["Vehicle records"]
  node_active_vehicle["Active vehicle<br/>[active-vehicle.ts]"]
end

subgraph group_insights["Reminders and reports"]
  node_reminder_ui["Reminder screens<br/>[index.tsx]"]
  node_report_ui["Reports screen<br/>[reports.tsx]"]
  node_reminder_repo["Reminder records"]
  node_statistics["Statistics engine"]
  node_stats_types["Statistics models"]
  node_stats_utils["Statistics helpers"]
  node_notifications["Reminder notifications"]
end

subgraph group_foundation["Local data and platform"]
  node_profile_repo["Profile settings"]
  node_translations["Translations<br/>[translation.ts]"]
  node_db_client["SQLite client<br/>[index.ts]"]
  node_schema["Data schema<br/>[schema.ts]"]
  node_sqlite[("On-device SQLite")]
end

node_driver(("Vehicle owner"))

node_driver -->|"views dashboard"| node_home
node_driver -->|"logs refueling"| node_fuel
node_driver -->|"logs services"| node_service
node_driver -->|"logs expenses"| node_expense
node_driver -->|"manages vehicles"| node_vehicles
node_driver -->|"manages reminders"| node_reminder_ui
node_driver -->|"views reports"| node_report_ui
node_home -->|"reads statistics"| node_statistics
node_home -->|"reads profile"| node_profile_repo
node_fuel -->|"uses fuel records"| node_fuel_repo
node_fuel -->|"reads statistics"| node_statistics
node_fuel -->|"reads active vehicle"| node_active_vehicle
node_statistics -->|"reads fuel records"| node_fuel_repo
node_statistics -->|"reads service records"| node_service_repo
node_statistics -->|"reads expense records"| node_expense_repo
node_statistics -->|"reads reminders"| node_reminder_repo
node_statistics -->|"uses helpers"| node_stats_utils
node_statistics -->|"uses models"| node_stats_types
node_service_repo -->|"gets vehicle"| node_active_vehicle
node_service_repo -->|"refreshes schedules"| node_notifications
node_expense_repo -->|"refreshes schedules"| node_notifications
node_reminder_repo -->|"refreshes schedules"| node_notifications
node_fuel_repo -->|"gets vehicle"| node_active_vehicle
node_active_vehicle -->|"queries"| node_db_client
node_service_repo -->|"reads and writes"| node_db_client
node_expense_repo -->|"reads and writes"| node_db_client
node_reminder_repo -->|"reads and writes"| node_db_client
node_vehicle_repo -->|"reads and writes"| node_db_client
node_profile_repo -->|"reads and writes"| node_db_client
node_db_client -->|"opens database"| node_sqlite
node_db_client -->|"configures tables"| node_schema
node_notifications -->|"loads reminder data"| node_sqlite
node_notifications -->|"sends alerts"| node_driver
node_profile_repo -->|"provides language"| node_translations
node_driver -->|"switches vehicle"| node_home

click node_home "https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/(home)/index.tsx"
click node_fuel "https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/fuel/index.tsx"
click node_service "https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/services/index.tsx"
click node_expense "https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/expenses/index.tsx"
click node_vehicles "https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/vehicles/index.tsx"
click node_reminder_ui "https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/reminders/index.tsx"
click node_report_ui "https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/(home)/reports.tsx"
click node_fuel_repo "https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/fuel-repository.ts"
click node_service_repo "https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/service-repository.ts"
click node_expense_repo "https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/expense-repository.ts"
click node_vehicle_repo "https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/vehicle-repository.ts"
click node_active_vehicle "https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/active-vehicle.ts"
click node_reminder_repo "https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/reminder-repository.ts"
click node_statistics "https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/statistics/statistics-repository.ts"
click node_stats_types "https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/statistics/statistics-types.ts"
click node_stats_utils "https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/statistics/statistics-utils.ts"
click node_notifications "https://github.com/aminnateghi/yadli-react-native/blob/main/src/utils/reminder-notifications.ts"
click node_profile_repo "https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/profile-repository.ts"
click node_translations "https://github.com/aminnateghi/yadli-react-native/blob/main/src/languages/translation.ts"
click node_db_client "https://github.com/aminnateghi/yadli-react-native/blob/main/src/db/index.ts"
click node_schema "https://github.com/aminnateghi/yadli-react-native/blob/main/src/db/schema.ts"

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_home toneBlue
class node_fuel,node_service,node_expense,node_vehicles,node_fuel_repo,node_service_repo,node_expense_repo,node_vehicle_repo,node_active_vehicle toneAmber
class node_reminder_ui,node_report_ui,node_reminder_repo,node_statistics,node_stats_types,node_stats_utils,node_notifications toneMint
class node_profile_repo,node_translations,node_db_client,node_schema,node_sqlite toneRose
class node_driver toneIndigo
```

## Components

### App experience

- [Dashboard](https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/(home)/index.tsx): `src/app/(tabs)/(home)/index.tsx`

### Vehicle records

- [Fuel log](https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/fuel/index.tsx): `src/app/(tabs)/fuel/index.tsx`
- [Service log](https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/services/index.tsx): `src/app/(tabs)/services/index.tsx`
- [Expense log](https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/expenses/index.tsx): `src/app/(tabs)/expenses/index.tsx`
- [Vehicle manager](https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/vehicles/index.tsx): `src/app/(tabs)/vehicles/index.tsx`
- [Fuel records](https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/fuel-repository.ts): `src/repositories/fuel-repository.ts`
- [Service records](https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/service-repository.ts): `src/repositories/service-repository.ts`
- [Expense records](https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/expense-repository.ts): `src/repositories/expense-repository.ts`
- [Vehicle records](https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/vehicle-repository.ts): `src/repositories/vehicle-repository.ts`
- [Active vehicle](https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/active-vehicle.ts): `src/repositories/active-vehicle.ts`

### Reminders and reports

- [Reminder screens](https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/reminders/index.tsx): `src/app/(tabs)/reminders/index.tsx`
- [Reports screen](https://github.com/aminnateghi/yadli-react-native/blob/main/src/app/(tabs)/(home)/reports.tsx): `src/app/(tabs)/(home)/reports.tsx`
- [Reminder records](https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/reminder-repository.ts): `src/repositories/reminder-repository.ts`
- [Statistics engine](https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/statistics/statistics-repository.ts): `src/repositories/statistics/statistics-repository.ts`
- [Statistics models](https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/statistics/statistics-types.ts): `src/repositories/statistics/statistics-types.ts`
- [Statistics helpers](https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/statistics/statistics-utils.ts): `src/repositories/statistics/statistics-utils.ts`
- [Reminder notifications](https://github.com/aminnateghi/yadli-react-native/blob/main/src/utils/reminder-notifications.ts): `src/utils/reminder-notifications.ts`

### Local data and platform

- [Profile settings](https://github.com/aminnateghi/yadli-react-native/blob/main/src/repositories/profile-repository.ts): `src/repositories/profile-repository.ts`
- [Translations](https://github.com/aminnateghi/yadli-react-native/blob/main/src/languages/translation.ts): `src/languages/translation.ts`
- [SQLite client](https://github.com/aminnateghi/yadli-react-native/blob/main/src/db/index.ts): `src/db/index.ts`
- [Data schema](https://github.com/aminnateghi/yadli-react-native/blob/main/src/db/schema.ts): `src/db/schema.ts`
- **On-device SQLite**

### Other components

- **Vehicle owner**

## Connections

- Vehicle owner → Dashboard: views dashboard
- Vehicle owner → Fuel log: logs refueling
- Vehicle owner → Service log: logs services
- Vehicle owner → Expense log: logs expenses
- Vehicle owner → Vehicle manager: manages vehicles
- Vehicle owner → Reminder screens: manages reminders
- Vehicle owner → Reports screen: views reports
- Dashboard → Statistics engine: reads statistics (evidence: `src/app/(tabs)/(home)/index.tsx`)
- Dashboard → Profile settings: reads profile (evidence: `src/app/(tabs)/(home)/index.tsx`)
- Fuel log → Fuel records: uses fuel records (evidence: `src/app/(tabs)/fuel/index.tsx`)
- Fuel log → Statistics engine: reads statistics (evidence: `src/app/(tabs)/fuel/index.tsx`)
- Fuel log → Active vehicle: reads active vehicle (evidence: `src/app/(tabs)/fuel/index.tsx`)
- Statistics engine → Fuel records: reads fuel records (evidence: `src/repositories/statistics/statistics-repository.ts`)
- Statistics engine → Service records: reads service records (evidence: `src/repositories/statistics/statistics-repository.ts`)
- Statistics engine → Expense records: reads expense records (evidence: `src/repositories/statistics/statistics-repository.ts`)
- Statistics engine → Reminder records: reads reminders (evidence: `src/repositories/statistics/statistics-repository.ts`)
- Statistics engine → Statistics helpers: uses helpers (evidence: `src/repositories/statistics/statistics-repository.ts`)
- Statistics engine → Statistics models: uses models (evidence: `src/repositories/statistics/statistics-repository.ts`)
- Service records → Active vehicle: gets vehicle (evidence: `src/repositories/service-repository.ts`)
- Service records → Reminder notifications: refreshes schedules (evidence: `src/repositories/service-repository.ts`)
- Expense records → Reminder notifications: refreshes schedules (evidence: `src/repositories/expense-repository.ts`)
- Reminder records → Reminder notifications: refreshes schedules (evidence: `src/repositories/reminder-repository.ts`)
- Fuel records → Active vehicle: gets vehicle (evidence: `src/repositories/fuel-repository.ts`)
- Active vehicle → SQLite client: queries (evidence: `src/repositories/active-vehicle.ts`)
- Service records → SQLite client: reads and writes (evidence: `src/repositories/service-repository.ts`)
- Expense records → SQLite client: reads and writes (evidence: `src/repositories/expense-repository.ts`)
- Reminder records → SQLite client: reads and writes (evidence: `src/repositories/reminder-repository.ts`)
- Vehicle records → SQLite client: reads and writes (evidence: `src/repositories/vehicle-repository.ts`)
- Profile settings → SQLite client: reads and writes (evidence: `src/repositories/profile-repository.ts`)
- SQLite client → On-device SQLite: opens database (evidence: `src/db/index.ts`)
- SQLite client → Data schema: configures tables (evidence: `src/db/index.ts`)
- Reminder notifications → On-device SQLite: loads reminder data (evidence: `src/utils/reminder-notifications.ts`)
- Reminder notifications → Vehicle owner: sends alerts
- Profile settings → Translations: provides language (evidence: `src/languages/useTranslation.ts`)
- Vehicle owner → Dashboard: switches vehicle
