# mohamed-elrabany/recall architecture

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

- Interactive diagram: https://gitdiagram.com/mohamed-elrabany/recall
- Repository: https://github.com/mohamed-elrabany/recall

## Overview

Recall is a smart bookmarking app: users sign in, save and organize links, then browse bookmarks, favorites, and tags. Edited bookmark content is embedded asynchronously for meaning-based retrieval; Supabase supplies authentication and persistence. The graph also covers account preferences and the protected/public route split. Semantic search is a documented product capability, but its UI and retrieval implementation are not visible in the sampled source, so no search execution path is inferred.

Main entry points: [`src/routes/AppRoutes.tsx`](https://github.com/mohamed-elrabany/recall/blob/main/src/routes/AppRoutes.tsx) (Route map), [`src/services/bookmarkServices.ts`](https://github.com/mohamed-elrabany/recall/blob/main/src/services/bookmarkServices.ts) (Bookmark service), [`src/store/store.ts`](https://github.com/mohamed-elrabany/recall/blob/main/src/store/store.ts) (Redux store), [`src/App.tsx`](https://github.com/mohamed-elrabany/recall/blob/main/src/App.tsx) (App bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App bootstrap<br/>[App.tsx]"]
  node_router["Route map<br/>[AppRoutes.tsx]"]
  node_protected["Protected shell"]
  node_public["Public routes<br/>[PublicRoutes.tsx]"]
end

subgraph group_bookmark["Bookmark workflow"]
  node_bookmark_pages["Bookmark pages<br/>[AddBookmark.tsx]"]
  node_browse_pages["Browse pages<br/>[Dashboard.tsx]"]
  node_details_page["Bookmark details"]
  node_tags_page["Tag browsing<br/>[Tags.tsx]"]
  node_bookmark_hook["Bookmark loading<br/>[useBookmark.tsx]"]
  node_bookmark_service["Bookmark service"]
  node_embedding_function["Embedding function<br/>[index.ts]"]
  node_extract_function["Content extraction<br/>[index.tsx]"]
end

subgraph group_identity["Identity and preferences"]
  node_auth_pages["Sign-in pages<br/>[Login.tsx]"]
  node_auth_hook["Auth lifecycle<br/>[useAuth.tsx]"]
  node_auth_service["Auth service<br/>[authServices.ts]"]
  node_settings_page["Settings<br/>[Settings.tsx]"]
  node_user_service["User service<br/>[userServices.ts]"]
end

subgraph group_platform["State and services"]
  node_supabase[("Supabase<br/>[supabaseClient.ts]")]
  node_store["Redux store<br/>[store.ts]"]
  node_auth_state["Auth state<br/>[authSlice.ts]"]
  node_bookmark_state["Bookmark state<br/>[bookmarkSlice.ts]"]
  node_user_state["User state<br/>[userSlice.ts]"]
  node_bookmark_selectors["Bookmark selectors"]
  node_bookmark_model["Bookmark model<br/>[bookmark.ts]"]
end

node_user(("User"))

node_user -->|"navigates"| node_router
node_app -->|"renders"| node_router
node_app -->|"starts auth"| node_auth_hook
node_app -->|"loads bookmarks"| node_bookmark_hook
node_router -->|"routes public"| node_public
node_router -->|"routes protected"| node_protected
node_router -->|"routes bookmark"| node_bookmark_pages
node_router -->|"routes browsing"| node_browse_pages
node_router -->|"routes details"| node_details_page
node_router -->|"routes tags"| node_tags_page
node_router -->|"routes sign-in"| node_auth_pages
node_router -->|"routes settings"| node_settings_page
node_protected -->|"checks auth"| node_store
node_bookmark_hook -->|"fetches bookmarks"| node_bookmark_service
node_bookmark_hook -->|"updates state"| node_bookmark_state
node_bookmark_pages -->|"saves bookmarks"| node_bookmark_service
node_details_page -->|"selects bookmark"| node_bookmark_selectors
node_tags_page -->|"selects by tag"| node_bookmark_selectors
node_bookmark_service -->|"reads and writes"| node_supabase
node_bookmark_service -->|"requests embedding"| node_embedding_function
node_bookmark_service -->|"uses bookmark type"| node_bookmark_model
node_auth_pages -->|"submits credentials"| node_auth_service
node_auth_hook -->|"loads session"| node_auth_service
node_auth_hook -->|"updates auth state"| node_auth_state
node_auth_service -->|"calls auth"| node_supabase
node_settings_page -->|"reads preferences"| node_user_state
node_user_state -->|"persists changes"| node_user_service
node_user_service -->|"stores profile"| node_supabase
node_store -->|"combines reducer"| node_auth_state
node_store -->|"combines reducer"| node_bookmark_state
node_store -->|"combines reducer"| node_user_state

click node_app "https://github.com/mohamed-elrabany/recall/blob/main/src/App.tsx"
click node_router "https://github.com/mohamed-elrabany/recall/blob/main/src/routes/AppRoutes.tsx"
click node_protected "https://github.com/mohamed-elrabany/recall/blob/main/src/routes/ProtectedRoutes.tsx"
click node_public "https://github.com/mohamed-elrabany/recall/blob/main/src/routes/PublicRoutes.tsx"
click node_bookmark_pages "https://github.com/mohamed-elrabany/recall/blob/main/src/pages/AddBookmark.tsx"
click node_browse_pages "https://github.com/mohamed-elrabany/recall/blob/main/src/pages/Dashboard.tsx"
click node_details_page "https://github.com/mohamed-elrabany/recall/blob/main/src/pages/BookmarkDetails.tsx"
click node_tags_page "https://github.com/mohamed-elrabany/recall/blob/main/src/pages/Tags.tsx"
click node_bookmark_hook "https://github.com/mohamed-elrabany/recall/blob/main/src/hooks/useBookmark.tsx"
click node_bookmark_service "https://github.com/mohamed-elrabany/recall/blob/main/src/services/bookmarkServices.ts"
click node_embedding_function "https://github.com/mohamed-elrabany/recall/blob/main/supabase/functions/generate-embedding/index.ts"
click node_extract_function "https://github.com/mohamed-elrabany/recall/blob/main/supabase/functions/extract-content/index.tsx"
click node_auth_pages "https://github.com/mohamed-elrabany/recall/blob/main/src/pages/Login.tsx"
click node_auth_hook "https://github.com/mohamed-elrabany/recall/blob/main/src/hooks/useAuth.tsx"
click node_auth_service "https://github.com/mohamed-elrabany/recall/blob/main/src/services/authServices.ts"
click node_settings_page "https://github.com/mohamed-elrabany/recall/blob/main/src/pages/Settings.tsx"
click node_user_service "https://github.com/mohamed-elrabany/recall/blob/main/src/services/userServices.ts"
click node_supabase "https://github.com/mohamed-elrabany/recall/blob/main/src/lib/supabaseClient.ts"
click node_store "https://github.com/mohamed-elrabany/recall/blob/main/src/store/store.ts"
click node_auth_state "https://github.com/mohamed-elrabany/recall/blob/main/src/store/slices/authSlice.ts"
click node_bookmark_state "https://github.com/mohamed-elrabany/recall/blob/main/src/store/slices/bookmarkSlice.ts"
click node_user_state "https://github.com/mohamed-elrabany/recall/blob/main/src/store/slices/userSlice.ts"
click node_bookmark_selectors "https://github.com/mohamed-elrabany/recall/blob/main/src/store/selectors/bookmarkSelectors.ts"
click node_bookmark_model "https://github.com/mohamed-elrabany/recall/blob/main/src/types/bookmark.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_app,node_router,node_protected,node_public,node_user toneBlue
class node_bookmark_pages,node_browse_pages,node_details_page,node_tags_page,node_bookmark_hook,node_bookmark_service,node_embedding_function,node_extract_function toneAmber
class node_auth_pages,node_auth_hook,node_auth_service,node_settings_page,node_user_service toneMint
class node_supabase,node_store,node_auth_state,node_bookmark_state,node_user_state,node_bookmark_selectors,node_bookmark_model toneRose
```

## Components

### App experience

- [App bootstrap](https://github.com/mohamed-elrabany/recall/blob/main/src/App.tsx): `src/App.tsx`
- [Route map](https://github.com/mohamed-elrabany/recall/blob/main/src/routes/AppRoutes.tsx): `src/routes/AppRoutes.tsx`
- [Protected shell](https://github.com/mohamed-elrabany/recall/blob/main/src/routes/ProtectedRoutes.tsx): `src/routes/ProtectedRoutes.tsx`
- [Public routes](https://github.com/mohamed-elrabany/recall/blob/main/src/routes/PublicRoutes.tsx): `src/routes/PublicRoutes.tsx`

### Bookmark workflow

- [Bookmark pages](https://github.com/mohamed-elrabany/recall/blob/main/src/pages/AddBookmark.tsx): `src/pages/AddBookmark.tsx`
- [Browse pages](https://github.com/mohamed-elrabany/recall/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Bookmark details](https://github.com/mohamed-elrabany/recall/blob/main/src/pages/BookmarkDetails.tsx): `src/pages/BookmarkDetails.tsx`
- [Tag browsing](https://github.com/mohamed-elrabany/recall/blob/main/src/pages/Tags.tsx): `src/pages/Tags.tsx`
- [Bookmark loading](https://github.com/mohamed-elrabany/recall/blob/main/src/hooks/useBookmark.tsx): `src/hooks/useBookmark.tsx`
- [Bookmark service](https://github.com/mohamed-elrabany/recall/blob/main/src/services/bookmarkServices.ts): `src/services/bookmarkServices.ts`
- [Embedding function](https://github.com/mohamed-elrabany/recall/blob/main/supabase/functions/generate-embedding/index.ts): `supabase/functions/generate-embedding/index.ts`
- [Content extraction](https://github.com/mohamed-elrabany/recall/blob/main/supabase/functions/extract-content/index.tsx): `supabase/functions/extract-content/index.tsx`

### Identity and preferences

- [Sign-in pages](https://github.com/mohamed-elrabany/recall/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`
- [Auth lifecycle](https://github.com/mohamed-elrabany/recall/blob/main/src/hooks/useAuth.tsx): `src/hooks/useAuth.tsx`
- [Auth service](https://github.com/mohamed-elrabany/recall/blob/main/src/services/authServices.ts): `src/services/authServices.ts`
- [Settings](https://github.com/mohamed-elrabany/recall/blob/main/src/pages/Settings.tsx): `src/pages/Settings.tsx`
- [User service](https://github.com/mohamed-elrabany/recall/blob/main/src/services/userServices.ts): `src/services/userServices.ts`

### State and services

- [Supabase](https://github.com/mohamed-elrabany/recall/blob/main/src/lib/supabaseClient.ts): `src/lib/supabaseClient.ts`
- [Redux store](https://github.com/mohamed-elrabany/recall/blob/main/src/store/store.ts): `src/store/store.ts`
- [Auth state](https://github.com/mohamed-elrabany/recall/blob/main/src/store/slices/authSlice.ts): `src/store/slices/authSlice.ts`
- [Bookmark state](https://github.com/mohamed-elrabany/recall/blob/main/src/store/slices/bookmarkSlice.ts): `src/store/slices/bookmarkSlice.ts`
- [User state](https://github.com/mohamed-elrabany/recall/blob/main/src/store/slices/userSlice.ts): `src/store/slices/userSlice.ts`
- [Bookmark selectors](https://github.com/mohamed-elrabany/recall/blob/main/src/store/selectors/bookmarkSelectors.ts): `src/store/selectors/bookmarkSelectors.ts`
- [Bookmark model](https://github.com/mohamed-elrabany/recall/blob/main/src/types/bookmark.ts): `src/types/bookmark.ts`

### Other components

- **User**

## Connections

- User → Route map: navigates (evidence: `src/routes/AppRoutes.tsx`)
- App bootstrap → Route map: renders (evidence: `src/App.tsx`)
- App bootstrap → Auth lifecycle: starts auth (evidence: `src/App.tsx`)
- App bootstrap → Bookmark loading: loads bookmarks (evidence: `src/App.tsx`)
- Route map → Public routes: routes public (evidence: `src/routes/AppRoutes.tsx`)
- Route map → Protected shell: routes protected (evidence: `src/routes/AppRoutes.tsx`)
- Route map → Bookmark pages: routes bookmark (evidence: `src/routes/AppRoutes.tsx`)
- Route map → Browse pages: routes browsing (evidence: `src/routes/AppRoutes.tsx`)
- Route map → Bookmark details: routes details (evidence: `src/routes/AppRoutes.tsx`)
- Route map → Tag browsing: routes tags (evidence: `src/routes/AppRoutes.tsx`)
- Route map → Sign-in pages: routes sign-in (evidence: `src/routes/AppRoutes.tsx`)
- Route map → Settings: routes settings (evidence: `src/routes/AppRoutes.tsx`)
- Protected shell → Redux store: checks auth (evidence: `src/routes/ProtectedRoutes.tsx`)
- Bookmark loading → Bookmark service: fetches bookmarks (evidence: `src/hooks/useBookmark.tsx`)
- Bookmark loading → Bookmark state: updates state (evidence: `src/hooks/useBookmark.tsx`)
- Bookmark pages → Bookmark service: saves bookmarks (evidence: `src/pages/AddBookmark.tsx`)
- Bookmark details → Bookmark selectors: selects bookmark (evidence: `src/pages/BookmarkDetails.tsx`)
- Tag browsing → Bookmark selectors: selects by tag (evidence: `src/pages/Tags.tsx`)
- Bookmark service → Supabase: reads and writes (evidence: `src/services/bookmarkServices.ts`)
- Bookmark service → Embedding function: requests embedding (evidence: `src/services/bookmarkServices.ts`)
- Bookmark service → Bookmark model: uses bookmark type (evidence: `src/services/bookmarkServices.ts`)
- Sign-in pages → Auth service: submits credentials (evidence: `src/pages/Login.tsx`)
- Auth lifecycle → Auth service: loads session (evidence: `src/hooks/useAuth.tsx`)
- Auth lifecycle → Auth state: updates auth state (evidence: `src/hooks/useAuth.tsx`)
- Auth service → Supabase: calls auth (evidence: `src/services/authServices.ts`)
- Settings → User state: reads preferences (evidence: `src/pages/Settings.tsx`)
- User state → User service: persists changes (evidence: `src/store/slices/userSlice.ts`)
- User service → Supabase: stores profile (evidence: `src/services/userServices.ts`)
- Redux store → Auth state: combines reducer (evidence: `src/store/store.ts`)
- Redux store → Bookmark state: combines reducer (evidence: `src/store/store.ts`)
- Redux store → User state: combines reducer (evidence: `src/store/store.ts`)
