# marriam00/hekaya architecture

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

- Interactive diagram: https://gitdiagram.com/marriam00/hekaya
- Repository: https://github.com/marriam00/hekaya

## Overview

Hekaya appears to be a Flutter app for personal book libraries, discovering books and members, lending, and reading-community posts. Its likely user journey runs from authentication into the app shell and then through library, discovery, lending, and community screens. The tree also shows profile and settings features, shared UI, and mock and Supabase-backed data implementations. The supplied excerpts contain no Dart runtime code, and the README is only a Flutter template, so the connections below are unverified; they are shown as dashed rather than asserted as calls.

Main entry points: [`lib/shell/app_shell.dart`](https://github.com/marriam00/hekaya/blob/main/lib/shell/app_shell.dart) (App shell), [`lib/features/home/home_screen.dart`](https://github.com/marriam00/hekaya/blob/main/lib/features/home/home_screen.dart) (Home dashboard), [`lib/features/profile/member_profile_screen.dart`](https://github.com/marriam00/hekaya/blob/main/lib/features/profile/member_profile_screen.dart) (Member profile), [`lib/features/library/my_library_screen.dart`](https://github.com/marriam00/hekaya/blob/main/lib/features/library/my_library_screen.dart) (My library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App navigation"]
  node_entry["App entry<br/>[main.dart]"]
  node_shell["App shell<br/>[app_shell.dart]"]
  node_home["Home dashboard<br/>[home_screen.dart]"]
end

subgraph group_identity["Identity and profile"]
  node_auth["Authentication<br/>[auth_gate.dart]"]
  node_profile["Member profile"]
  node_settings["Profile settings"]
end

subgraph group_books["Books and lending"]
  node_library["My library"]
  node_bookedit["Book editing"]
  node_discover["Book discovery"]
  node_bookdetails["Book details"]
  node_lending["Borrowing and lending"]
end

subgraph group_community["Reading community"]
  node_corner["Reading corner"]
  node_postdetails["Post details"]
end

subgraph group_data["Data access"]
  node_booksrepo["Books repository"]
  node_lendingrepo["Lending repository"]
  node_postsrepo["Posts repository"]
  node_profilerepo["Profile repository"]
  node_authrepo["Auth repository"]
  node_image["Image storage"]
end

node_user(("Reader"))
node_supabase[("Supabase")]

node_user -.->|"opens"| node_entry
node_entry -.->|"starts"| node_shell
node_shell -.->|"gates access"| node_auth
node_shell -.->|"shows"| node_home
node_home -.->|"navigates"| node_library
node_home -.->|"navigates"| node_discover
node_library -.->|"edits books"| node_bookedit
node_discover -.->|"opens details"| node_bookdetails
node_bookdetails -.->|"starts lending"| node_lending
node_shell -.->|"shows"| node_corner
node_corner -.->|"opens posts"| node_postdetails
node_shell -.->|"shows"| node_profile
node_profile -.->|"opens settings"| node_settings
node_library -.->|"uses"| node_booksrepo
node_discover -.->|"uses"| node_booksrepo
node_lending -.->|"uses"| node_lendingrepo
node_corner -.->|"uses"| node_postsrepo
node_profile -.->|"uses"| node_profilerepo
node_auth -.->|"uses"| node_authrepo
node_booksrepo -.->|"may access"| node_supabase
node_profilerepo -.->|"may access"| node_supabase

click node_entry "https://github.com/marriam00/hekaya/blob/main/lib/main.dart"
click node_shell "https://github.com/marriam00/hekaya/blob/main/lib/shell/app_shell.dart"
click node_auth "https://github.com/marriam00/hekaya/blob/main/lib/features/auth/auth_gate.dart"
click node_profile "https://github.com/marriam00/hekaya/blob/main/lib/features/profile/member_profile_screen.dart"
click node_settings "https://github.com/marriam00/hekaya/blob/main/lib/features/profile_settings/profile_settings_screen.dart"
click node_home "https://github.com/marriam00/hekaya/blob/main/lib/features/home/home_screen.dart"
click node_library "https://github.com/marriam00/hekaya/blob/main/lib/features/library/my_library_screen.dart"
click node_bookedit "https://github.com/marriam00/hekaya/blob/main/lib/features/add_edit_book/add_edit_book_screen.dart"
click node_discover "https://github.com/marriam00/hekaya/blob/main/lib/features/discover/discover_screen.dart"
click node_bookdetails "https://github.com/marriam00/hekaya/blob/main/lib/features/book_details/book_details_screen.dart"
click node_lending "https://github.com/marriam00/hekaya/blob/main/lib/features/borrowing_lending/borrowing_lending_screen.dart"
click node_corner "https://github.com/marriam00/hekaya/blob/main/lib/features/reading_corner/reading_corner_screen.dart"
click node_postdetails "https://github.com/marriam00/hekaya/blob/main/lib/features/post_details/post_details_screen.dart"
click node_booksrepo "https://github.com/marriam00/hekaya/blob/main/lib/data/repositories/books_repository.dart"
click node_lendingrepo "https://github.com/marriam00/hekaya/blob/main/lib/data/repositories/lending_repository.dart"
click node_postsrepo "https://github.com/marriam00/hekaya/blob/main/lib/data/repositories/posts_repository.dart"
click node_profilerepo "https://github.com/marriam00/hekaya/blob/main/lib/data/repositories/profile_repository.dart"
click node_authrepo "https://github.com/marriam00/hekaya/blob/main/lib/features/auth/auth_repository.dart"
click node_image "https://github.com/marriam00/hekaya/blob/main/lib/core/services/image_storage_service.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_entry,node_shell,node_home toneBlue
class node_auth,node_profile,node_settings,node_supabase toneAmber
class node_library,node_bookedit,node_discover,node_bookdetails,node_lending toneMint
class node_corner,node_postdetails toneRose
class node_booksrepo,node_lendingrepo,node_postsrepo,node_profilerepo,node_authrepo,node_image,node_user toneIndigo
```

## Components

### App navigation

- [App entry](https://github.com/marriam00/hekaya/blob/main/lib/main.dart): `lib/main.dart`
- [App shell](https://github.com/marriam00/hekaya/blob/main/lib/shell/app_shell.dart): `lib/shell/app_shell.dart`
- [Home dashboard](https://github.com/marriam00/hekaya/blob/main/lib/features/home/home_screen.dart): `lib/features/home/home_screen.dart`

### Identity and profile

- [Authentication](https://github.com/marriam00/hekaya/blob/main/lib/features/auth/auth_gate.dart): `lib/features/auth/auth_gate.dart`
- [Member profile](https://github.com/marriam00/hekaya/blob/main/lib/features/profile/member_profile_screen.dart): `lib/features/profile/member_profile_screen.dart`
- [Profile settings](https://github.com/marriam00/hekaya/blob/main/lib/features/profile_settings/profile_settings_screen.dart): `lib/features/profile_settings/profile_settings_screen.dart`

### Books and lending

- [My library](https://github.com/marriam00/hekaya/blob/main/lib/features/library/my_library_screen.dart): `lib/features/library/my_library_screen.dart`
- [Book editing](https://github.com/marriam00/hekaya/blob/main/lib/features/add_edit_book/add_edit_book_screen.dart): `lib/features/add_edit_book/add_edit_book_screen.dart`
- [Book discovery](https://github.com/marriam00/hekaya/blob/main/lib/features/discover/discover_screen.dart): `lib/features/discover/discover_screen.dart`
- [Book details](https://github.com/marriam00/hekaya/blob/main/lib/features/book_details/book_details_screen.dart): `lib/features/book_details/book_details_screen.dart`
- [Borrowing and lending](https://github.com/marriam00/hekaya/blob/main/lib/features/borrowing_lending/borrowing_lending_screen.dart): `lib/features/borrowing_lending/borrowing_lending_screen.dart`

### Reading community

- [Reading corner](https://github.com/marriam00/hekaya/blob/main/lib/features/reading_corner/reading_corner_screen.dart): `lib/features/reading_corner/reading_corner_screen.dart`
- [Post details](https://github.com/marriam00/hekaya/blob/main/lib/features/post_details/post_details_screen.dart): `lib/features/post_details/post_details_screen.dart`

### Data access

- [Books repository](https://github.com/marriam00/hekaya/blob/main/lib/data/repositories/books_repository.dart): `lib/data/repositories/books_repository.dart`
- [Lending repository](https://github.com/marriam00/hekaya/blob/main/lib/data/repositories/lending_repository.dart): `lib/data/repositories/lending_repository.dart`
- [Posts repository](https://github.com/marriam00/hekaya/blob/main/lib/data/repositories/posts_repository.dart): `lib/data/repositories/posts_repository.dart`
- [Profile repository](https://github.com/marriam00/hekaya/blob/main/lib/data/repositories/profile_repository.dart): `lib/data/repositories/profile_repository.dart`
- [Auth repository](https://github.com/marriam00/hekaya/blob/main/lib/features/auth/auth_repository.dart): `lib/features/auth/auth_repository.dart`
- [Image storage](https://github.com/marriam00/hekaya/blob/main/lib/core/services/image_storage_service.dart): `lib/core/services/image_storage_service.dart`

### Other components

- **Reader**
- **Supabase**

## Connections

- Reader → App entry: opens
- App entry → App shell: starts
- App shell → Authentication: gates access
- App shell → Home dashboard: shows
- Home dashboard → My library: navigates
- Home dashboard → Book discovery: navigates
- My library → Book editing: edits books
- Book discovery → Book details: opens details
- Book details → Borrowing and lending: starts lending
- App shell → Reading corner: shows
- Reading corner → Post details: opens posts
- App shell → Member profile: shows
- Member profile → Profile settings: opens settings
- My library → Books repository: uses
- Book discovery → Books repository: uses
- Borrowing and lending → Lending repository: uses
- Reading corner → Posts repository: uses
- Member profile → Profile repository: uses
- Authentication → Auth repository: uses
- Books repository → Supabase: may access
- Profile repository → Supabase: may access
