# ahmedrosha/taawanu architecture

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

- Interactive diagram: https://gitdiagram.com/ahmedrosha/taawanu
- Repository: https://github.com/ahmedrosha/taawanu

## Overview

Taawanu is a Flutter app centered on shared Quran-completion groups: members join, receive rotating portions, record reading, and progress through recurring cycles. It also contains distinct Quran-reading, prayer, adhkar, personal-ward, and zakat features. The Firebase Functions backend implements group lifecycle, invitations, cycle and progress logic, messaging, profiles, and notifications. Flutter feature paths are identified from the tree; their runtime wiring was not sampled, so no client-to-backend calls are asserted.

Main entry points: [`functions/src/cycles.ts`](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/cycles.ts) (Cycles and progress), [`functions/src/index.ts`](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/index.ts) (Function exports), [`functions/src/invites.ts`](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/invites.ts) (Invites and joining), [`functions/src/groups.ts`](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/groups.ts) (Group management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Flutter app"]
  node_reader["Quran reader"]
  node_prayer["Prayer times"]
  node_adhkar["Adhkar"]
  node_personal["Personal ward"]
  node_zakat["Zakat calculator"]
  node_groupui["Group screens"]
  node_flutterservices["App services"]
end

subgraph group_backend["Group backend"]
  node_entry["Function exports<br/>[index.ts]"]
  node_groupops["Group management<br/>[groups.ts]"]
  node_invites["Invites and joining<br/>[invites.ts]"]
  node_cycles["Cycles and progress<br/>[cycles.ts]"]
  node_rotation["Portion rotation<br/>[rotation.ts]"]
  node_schedule["Cycle scheduling<br/>[schedule.ts]"]
  node_messages["Group messaging<br/>[messages.ts]"]
  node_profile["Profile functions<br/>[profile.ts]"]
  node_authguard["Signup guard<br/>[authGuard.ts]"]
end

subgraph group_shared["Backend foundation"]
  node_validation["Input validation<br/>[validation.ts]"]
  node_common["Shared data access<br/>[common.ts]"]
  node_notify["Notifications<br/>[notify.ts]"]
end

subgraph group_integrations["External services"]
  node_firestore[("Firestore")]
  node_fcm["Firebase messaging"]
end

node_user(("App user"))

node_user -->|"uses"| node_reader
node_user -->|"uses"| node_prayer
node_user -->|"uses"| node_adhkar
node_user -->|"uses"| node_personal
node_user -->|"uses"| node_zakat
node_user -->|"uses"| node_groupui
node_entry -->|"exports"| node_groupops
node_entry -->|"exports"| node_invites
node_entry -->|"exports"| node_cycles
node_entry -->|"exports"| node_authguard
node_entry -->|"exports"| node_profile
node_entry -->|"exports"| node_messages
node_groupops -->|"calls"| node_cycles
node_groupops -->|"calls"| node_notify
node_groupops -->|"validates with"| node_validation
node_invites -->|"calls"| node_cycles
node_invites -->|"uses"| node_rotation
node_invites -->|"calls"| node_notify
node_invites -->|"validates with"| node_validation
node_cycles -->|"calls"| node_notify
node_cycles -->|"uses"| node_rotation
node_cycles -->|"uses"| node_schedule
node_authguard -->|"calls"| node_groupops
node_authguard -->|"checks with"| node_validation
node_common -->|"accesses"| node_firestore
node_notify -->|"stores inbox"| node_firestore
node_notify -->|"sends push"| node_fcm
node_groupops -->|"reads and writes"| node_common
node_invites -->|"reads and writes"| node_common
node_cycles -->|"reads and writes"| node_common
node_messages -->|"uses data access"| node_common
node_profile -->|"uses data access"| node_common

click node_reader "https://github.com/ahmedrosha/taawanu/tree/main/lib/features/reader"
click node_prayer "https://github.com/ahmedrosha/taawanu/tree/main/lib/features/prayer"
click node_adhkar "https://github.com/ahmedrosha/taawanu/tree/main/lib/features/adhkar"
click node_personal "https://github.com/ahmedrosha/taawanu/tree/main/lib/features/personal"
click node_zakat "https://github.com/ahmedrosha/taawanu/tree/main/lib/features/zakat"
click node_groupui "https://github.com/ahmedrosha/taawanu/tree/main/lib/features/groups"
click node_flutterservices "https://github.com/ahmedrosha/taawanu/tree/main/lib/services"
click node_entry "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/index.ts"
click node_groupops "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/groups.ts"
click node_invites "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/invites.ts"
click node_cycles "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/cycles.ts"
click node_rotation "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/rotation.ts"
click node_schedule "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/schedule.ts"
click node_messages "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/messages.ts"
click node_profile "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/profile.ts"
click node_authguard "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/authGuard.ts"
click node_validation "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/validation.ts"
click node_common "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/common.ts"
click node_notify "https://github.com/ahmedrosha/taawanu/blob/main/functions/src/notify.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_reader,node_prayer,node_adhkar,node_personal,node_zakat,node_groupui,node_flutterservices,node_user toneBlue
class node_entry,node_groupops,node_invites,node_cycles,node_rotation,node_schedule,node_messages,node_profile,node_authguard toneAmber
class node_validation,node_common,node_notify toneMint
class node_firestore,node_fcm toneRose
```

## Components

### Flutter app

- [Quran reader](https://github.com/ahmedrosha/taawanu/tree/main/lib/features/reader): `lib/features/reader`
- [Prayer times](https://github.com/ahmedrosha/taawanu/tree/main/lib/features/prayer): `lib/features/prayer`
- [Adhkar](https://github.com/ahmedrosha/taawanu/tree/main/lib/features/adhkar): `lib/features/adhkar`
- [Personal ward](https://github.com/ahmedrosha/taawanu/tree/main/lib/features/personal): `lib/features/personal`
- [Zakat calculator](https://github.com/ahmedrosha/taawanu/tree/main/lib/features/zakat): `lib/features/zakat`
- [Group screens](https://github.com/ahmedrosha/taawanu/tree/main/lib/features/groups): `lib/features/groups`
- [App services](https://github.com/ahmedrosha/taawanu/tree/main/lib/services): `lib/services`

### Group backend

- [Function exports](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/index.ts): `functions/src/index.ts`
- [Group management](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/groups.ts): `functions/src/groups.ts`
- [Invites and joining](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/invites.ts): `functions/src/invites.ts`
- [Cycles and progress](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/cycles.ts): `functions/src/cycles.ts`
- [Portion rotation](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/rotation.ts): `functions/src/rotation.ts`
- [Cycle scheduling](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/schedule.ts): `functions/src/schedule.ts`
- [Group messaging](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/messages.ts): `functions/src/messages.ts`
- [Profile functions](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/profile.ts): `functions/src/profile.ts`
- [Signup guard](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/authGuard.ts): `functions/src/authGuard.ts`

### Backend foundation

- [Input validation](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/validation.ts): `functions/src/validation.ts`
- [Shared data access](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/common.ts): `functions/src/common.ts`
- [Notifications](https://github.com/ahmedrosha/taawanu/blob/main/functions/src/notify.ts): `functions/src/notify.ts`

### External services

- **Firestore**
- **Firebase messaging**

### Other components

- **App user**

## Connections

- App user → Quran reader: uses (evidence: `README.md`)
- App user → Prayer times: uses (evidence: `README.md`)
- App user → Adhkar: uses (evidence: `README.md`)
- App user → Personal ward: uses (evidence: `README.md`)
- App user → Zakat calculator: uses (evidence: `README.md`)
- App user → Group screens: uses (evidence: `README.md`)
- Function exports → Group management: exports (evidence: `functions/src/index.ts`)
- Function exports → Invites and joining: exports (evidence: `functions/src/index.ts`)
- Function exports → Cycles and progress: exports (evidence: `functions/src/index.ts`)
- Function exports → Signup guard: exports (evidence: `functions/src/index.ts`)
- Function exports → Profile functions: exports (evidence: `functions/src/index.ts`)
- Function exports → Group messaging: exports (evidence: `functions/src/index.ts`)
- Group management → Cycles and progress: calls (evidence: `functions/src/groups.ts`)
- Group management → Notifications: calls (evidence: `functions/src/groups.ts`)
- Group management → Input validation: validates with (evidence: `functions/src/groups.ts`)
- Invites and joining → Cycles and progress: calls (evidence: `functions/src/invites.ts`)
- Invites and joining → Portion rotation: uses (evidence: `functions/src/invites.ts`)
- Invites and joining → Notifications: calls (evidence: `functions/src/invites.ts`)
- Invites and joining → Input validation: validates with (evidence: `functions/src/invites.ts`)
- Cycles and progress → Notifications: calls (evidence: `functions/src/cycles.ts`)
- Cycles and progress → Portion rotation: uses (evidence: `functions/src/cycles.ts`)
- Cycles and progress → Cycle scheduling: uses (evidence: `functions/src/cycles.ts`)
- Signup guard → Group management: calls (evidence: `functions/src/authGuard.ts`)
- Signup guard → Input validation: checks with (evidence: `functions/src/authGuard.ts`)
- Shared data access → Firestore: accesses (evidence: `functions/src/common.ts`)
- Notifications → Firestore: stores inbox (evidence: `functions/src/notify.ts`)
- Notifications → Firebase messaging: sends push (evidence: `functions/src/notify.ts`)
- Group management → Shared data access: reads and writes (evidence: `functions/src/groups.ts`)
- Invites and joining → Shared data access: reads and writes (evidence: `functions/src/invites.ts`)
- Cycles and progress → Shared data access: reads and writes (evidence: `functions/src/cycles.ts`)
- Group messaging → Shared data access: uses data access (evidence: `functions/src/messages.ts`)
- Profile functions → Shared data access: uses data access (evidence: `functions/src/profile.ts`)
