# emynona3110/infflunch architecture

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

- Interactive diagram: https://gitdiagram.com/emynona3110/infflunch
- Repository: https://github.com/emynona3110/infflunch

## Overview

This is a restaurant-discovery and community app, with authenticated browsing and contributions as its main user workflow: users reach restaurant pages, submit reviews, and manage their own activity. Administrators maintain restaurant, tag, and badge data; the tree also shows profiles, lunch coordination, achievements, feedback, maps, and event features. The graph includes the sampled runtime entry points and documented source-index relationships. Unsampled feature internals and their connections are represented only where the tree or source index supports them.

Main entry points: [`src/admin/Dialogs/RestaurantDialog.tsx`](https://github.com/emynona3110/infflunch/blob/main/src/admin/Dialogs/RestaurantDialog.tsx) (Restaurant editor), [`src/services/supabaseClient.ts`](https://github.com/emynona3110/infflunch/blob/main/src/services/supabaseClient.ts) (Supabase client), [`src/components/ReviewForm.tsx`](https://github.com/emynona3110/infflunch/blob/main/src/components/ReviewForm.tsx) (Review submission), [`src/admin/DataManager.tsx`](https://github.com/emynona3110/infflunch/blob/main/src/admin/DataManager.tsx) (Admin data manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app_entry["App routing<br/>[App.tsx]"]
  node_authenticated["Authenticated app"]
  node_user_page["User page<br/>[UserPage.tsx]"]
  node_legal["Legal pages<br/>[LegalPage.tsx]"]
end

subgraph group_restaurants["Restaurant discovery"]
  node_restaurant_page["Restaurant page<br/>[RestaurantPage.tsx]"]
  node_restaurant_data["Restaurant queries<br/>[useRestaurants.ts]"]
end

subgraph group_community["Community features"]
  node_review_form["Review submission<br/>[ReviewForm.tsx]"]
  node_review_query["Review queries<br/>[useReviews.ts]"]
  node_my_reviews["My reviews<br/>[MyReviews.tsx]"]
  node_user_reviews["User review queries<br/>[useMyReviews.ts]"]
  node_lunch["Lunch coordination<br/>[LunchToday.tsx]"]
  node_achievements["Achievements<br/>[achievements.ts]"]
  node_feedback["Feedback<br/>[useFeedback.ts]"]
  node_events["Event features<br/>[index.ts]"]
  node_event_theme["Halloween theme<br/>[index.ts]"]
end

subgraph group_admin["Administration"]
  node_restaurant_dialog["Restaurant editor"]
  node_admin_manager["Admin data manager<br/>[DataManager.tsx]"]
  node_admin_table["Admin table<br/>[AdminTable.tsx]"]
  node_admin_dialogs["Admin dialogs"]
  node_badge_map["Badge mapping<br/>[badgeMap.ts]"]
  node_tag_categories["Tag categories<br/>[tagCategories.ts]"]
end

subgraph group_runtime["Shared runtime"]
  node_supabase["Supabase client<br/>[supabaseClient.ts]"]
  node_session["Session state<br/>[useSession.ts]"]
  node_optimistic["Optimistic updates<br/>[optimistic.ts]"]
  node_toast["Toast adapter<br/>[toast.ts]"]
  node_ui["UI primitives"]
  node_hold_delete["Hold to delete"]
  node_screen_loader["Screen loader<br/>[ScreenLoader.tsx]"]
  node_loader_control["Loader control"]
  node_storage_paths["Storage path rules<br/>[storagePaths.ts]"]
end

node_visitor(("Visitor or member"))

node_visitor -->|"opens"| node_app_entry
node_app_entry -->|"routes to"| node_authenticated
node_app_entry -->|"routes to"| node_legal
node_authenticated -->|"renders"| node_user_page
node_user_page -.->|"routes to"| node_restaurant_page
node_restaurant_page -.->|"loads data"| node_restaurant_data
node_restaurant_page -.->|"loads reviews"| node_review_query
node_restaurant_page -.->|"offers review"| node_review_form
node_review_form -->|"reads session"| node_session
node_review_form -->|"upserts review"| node_supabase
node_review_form -->|"invalidates cache"| node_review_query
node_my_reviews -->|"loads reviews"| node_user_reviews
node_user_reviews -->|"queries"| node_supabase
node_admin_manager -->|"renders"| node_admin_table
node_admin_manager -->|"opens editor"| node_admin_dialogs
node_admin_manager -->|"deletes rows"| node_supabase
node_admin_dialogs -->|"includes editor"| node_restaurant_dialog
node_restaurant_dialog -->|"writes restaurant"| node_supabase
node_restaurant_dialog -->|"uses categories"| node_tag_categories
node_restaurant_dialog -.->|"uses path rules"| node_storage_paths
node_restaurant_dialog -->|"reports status"| node_toast
node_admin_manager -->|"reports status"| node_toast
node_admin_table -->|"uses mapping"| node_badge_map
node_session -->|"reads auth"| node_supabase
node_user_reviews -->|"uses updates"| node_optimistic
node_review_query -->|"queries"| node_supabase
node_screen_loader -->|"reads control"| node_loader_control
node_restaurant_dialog -->|"uses controls"| node_ui
node_review_form -->|"uses controls"| node_ui
node_events -->|"loads theme"| node_event_theme

click node_app_entry "https://github.com/emynona3110/infflunch/blob/main/src/App.tsx"
click node_authenticated "https://github.com/emynona3110/infflunch/blob/main/src/pages/AuthenticatedApp.tsx"
click node_user_page "https://github.com/emynona3110/infflunch/blob/main/src/pages/UserPage.tsx"
click node_restaurant_page "https://github.com/emynona3110/infflunch/blob/main/src/pages/RestaurantPage.tsx"
click node_restaurant_dialog "https://github.com/emynona3110/infflunch/blob/main/src/admin/Dialogs/RestaurantDialog.tsx"
click node_restaurant_data "https://github.com/emynona3110/infflunch/blob/main/src/hooks/useRestaurants.ts"
click node_review_form "https://github.com/emynona3110/infflunch/blob/main/src/components/ReviewForm.tsx"
click node_review_query "https://github.com/emynona3110/infflunch/blob/main/src/hooks/useReviews.ts"
click node_my_reviews "https://github.com/emynona3110/infflunch/blob/main/src/sections/MyReviews.tsx"
click node_user_reviews "https://github.com/emynona3110/infflunch/blob/main/src/hooks/useMyReviews.ts"
click node_lunch "https://github.com/emynona3110/infflunch/blob/main/src/sections/LunchToday.tsx"
click node_achievements "https://github.com/emynona3110/infflunch/blob/main/src/data/achievements.ts"
click node_feedback "https://github.com/emynona3110/infflunch/blob/main/src/hooks/useFeedback.ts"
click node_events "https://github.com/emynona3110/infflunch/blob/main/src/events/index.ts"
click node_event_theme "https://github.com/emynona3110/infflunch/blob/main/src/events/halloween/index.ts"
click node_admin_manager "https://github.com/emynona3110/infflunch/blob/main/src/admin/DataManager.tsx"
click node_admin_table "https://github.com/emynona3110/infflunch/blob/main/src/admin/AdminTable.tsx"
click node_admin_dialogs "https://github.com/emynona3110/infflunch/tree/main/src/admin/Dialogs"
click node_supabase "https://github.com/emynona3110/infflunch/blob/main/src/services/supabaseClient.ts"
click node_session "https://github.com/emynona3110/infflunch/blob/main/src/hooks/useSession.ts"
click node_optimistic "https://github.com/emynona3110/infflunch/blob/main/src/lib/optimistic.ts"
click node_toast "https://github.com/emynona3110/infflunch/blob/main/src/lib/toast.ts"
click node_ui "https://github.com/emynona3110/infflunch/tree/main/src/components/ui"
click node_hold_delete "https://github.com/emynona3110/infflunch/blob/main/src/components/HoldToDeleteButton.tsx"
click node_screen_loader "https://github.com/emynona3110/infflunch/blob/main/src/components/brand/ScreenLoader.tsx"
click node_loader_control "https://github.com/emynona3110/infflunch/blob/main/src/components/brand/screenLoaderControl.ts"
click node_legal "https://github.com/emynona3110/infflunch/blob/main/src/pages/LegalPage.tsx"
click node_badge_map "https://github.com/emynona3110/infflunch/blob/main/src/services/badgeMap.ts"
click node_tag_categories "https://github.com/emynona3110/infflunch/blob/main/src/services/tagCategories.ts"
click node_storage_paths "https://github.com/emynona3110/infflunch/blob/main/src/services/storagePaths.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_entry,node_authenticated,node_user_page,node_legal toneBlue
class node_restaurant_page,node_restaurant_data toneAmber
class node_review_form,node_review_query,node_my_reviews,node_user_reviews,node_lunch,node_achievements,node_feedback,node_events,node_event_theme toneMint
class node_restaurant_dialog,node_admin_manager,node_admin_table,node_admin_dialogs,node_badge_map,node_tag_categories toneRose
class node_supabase,node_session,node_optimistic,node_toast,node_ui,node_hold_delete,node_screen_loader,node_loader_control,node_storage_paths,node_visitor toneIndigo
```

## Components

### Application shell

- [App routing](https://github.com/emynona3110/infflunch/blob/main/src/App.tsx): `src/App.tsx`
- [Authenticated app](https://github.com/emynona3110/infflunch/blob/main/src/pages/AuthenticatedApp.tsx): `src/pages/AuthenticatedApp.tsx`
- [User page](https://github.com/emynona3110/infflunch/blob/main/src/pages/UserPage.tsx): `src/pages/UserPage.tsx`
- [Legal pages](https://github.com/emynona3110/infflunch/blob/main/src/pages/LegalPage.tsx): `src/pages/LegalPage.tsx`

### Restaurant discovery

- [Restaurant page](https://github.com/emynona3110/infflunch/blob/main/src/pages/RestaurantPage.tsx): `src/pages/RestaurantPage.tsx`
- [Restaurant queries](https://github.com/emynona3110/infflunch/blob/main/src/hooks/useRestaurants.ts): `src/hooks/useRestaurants.ts`

### Community features

- [Review submission](https://github.com/emynona3110/infflunch/blob/main/src/components/ReviewForm.tsx): `src/components/ReviewForm.tsx`
- [Review queries](https://github.com/emynona3110/infflunch/blob/main/src/hooks/useReviews.ts): `src/hooks/useReviews.ts`
- [My reviews](https://github.com/emynona3110/infflunch/blob/main/src/sections/MyReviews.tsx): `src/sections/MyReviews.tsx`
- [User review queries](https://github.com/emynona3110/infflunch/blob/main/src/hooks/useMyReviews.ts): `src/hooks/useMyReviews.ts`
- [Lunch coordination](https://github.com/emynona3110/infflunch/blob/main/src/sections/LunchToday.tsx): `src/sections/LunchToday.tsx`
- [Achievements](https://github.com/emynona3110/infflunch/blob/main/src/data/achievements.ts): `src/data/achievements.ts`
- [Feedback](https://github.com/emynona3110/infflunch/blob/main/src/hooks/useFeedback.ts): `src/hooks/useFeedback.ts`
- [Event features](https://github.com/emynona3110/infflunch/blob/main/src/events/index.ts): `src/events/index.ts`
- [Halloween theme](https://github.com/emynona3110/infflunch/blob/main/src/events/halloween/index.ts): `src/events/halloween/index.ts`

### Administration

- [Restaurant editor](https://github.com/emynona3110/infflunch/blob/main/src/admin/Dialogs/RestaurantDialog.tsx): `src/admin/Dialogs/RestaurantDialog.tsx`
- [Admin data manager](https://github.com/emynona3110/infflunch/blob/main/src/admin/DataManager.tsx): `src/admin/DataManager.tsx`
- [Admin table](https://github.com/emynona3110/infflunch/blob/main/src/admin/AdminTable.tsx): `src/admin/AdminTable.tsx`
- [Admin dialogs](https://github.com/emynona3110/infflunch/tree/main/src/admin/Dialogs): `src/admin/Dialogs`
- [Badge mapping](https://github.com/emynona3110/infflunch/blob/main/src/services/badgeMap.ts): `src/services/badgeMap.ts`
- [Tag categories](https://github.com/emynona3110/infflunch/blob/main/src/services/tagCategories.ts): `src/services/tagCategories.ts`

### Shared runtime

- [Supabase client](https://github.com/emynona3110/infflunch/blob/main/src/services/supabaseClient.ts): `src/services/supabaseClient.ts`
- [Session state](https://github.com/emynona3110/infflunch/blob/main/src/hooks/useSession.ts): `src/hooks/useSession.ts`
- [Optimistic updates](https://github.com/emynona3110/infflunch/blob/main/src/lib/optimistic.ts): `src/lib/optimistic.ts`
- [Toast adapter](https://github.com/emynona3110/infflunch/blob/main/src/lib/toast.ts): `src/lib/toast.ts`
- [UI primitives](https://github.com/emynona3110/infflunch/tree/main/src/components/ui): `src/components/ui`
- [Hold to delete](https://github.com/emynona3110/infflunch/blob/main/src/components/HoldToDeleteButton.tsx): `src/components/HoldToDeleteButton.tsx`
- [Screen loader](https://github.com/emynona3110/infflunch/blob/main/src/components/brand/ScreenLoader.tsx): `src/components/brand/ScreenLoader.tsx`
- [Loader control](https://github.com/emynona3110/infflunch/blob/main/src/components/brand/screenLoaderControl.ts): `src/components/brand/screenLoaderControl.ts`
- [Storage path rules](https://github.com/emynona3110/infflunch/blob/main/src/services/storagePaths.ts): `src/services/storagePaths.ts`

### Other components

- **Visitor or member**

## Connections

- Visitor or member → App routing: opens (evidence: `src/App.tsx`)
- App routing → Authenticated app: routes to (evidence: `src/App.tsx`)
- App routing → Legal pages: routes to (evidence: `src/App.tsx`)
- Authenticated app → User page: renders (evidence: `src/pages/AuthenticatedApp.tsx`)
- User page → Restaurant page: routes to
- Restaurant page → Restaurant queries: loads data
- Restaurant page → Review queries: loads reviews
- Restaurant page → Review submission: offers review
- Review submission → Session state: reads session (evidence: `src/components/ReviewForm.tsx`)
- Review submission → Supabase client: upserts review (evidence: `src/components/ReviewForm.tsx`)
- Review submission → Review queries: invalidates cache (evidence: `src/components/ReviewForm.tsx`)
- My reviews → User review queries: loads reviews (evidence: `src/sections/MyReviews.tsx`)
- User review queries → Supabase client: queries (evidence: `src/hooks/useMyReviews.ts`)
- Admin data manager → Admin table: renders (evidence: `src/admin/DataManager.tsx`)
- Admin data manager → Admin dialogs: opens editor (evidence: `src/admin/DataManager.tsx`)
- Admin data manager → Supabase client: deletes rows (evidence: `src/admin/DataManager.tsx`)
- Admin dialogs → Restaurant editor: includes editor (evidence: `src/admin/DataManager.tsx`)
- Restaurant editor → Supabase client: writes restaurant (evidence: `src/admin/Dialogs/RestaurantDialog.tsx`)
- Restaurant editor → Tag categories: uses categories (evidence: `src/admin/Dialogs/RestaurantDialog.tsx`)
- Restaurant editor → Storage path rules: uses path rules (evidence: `src/admin/Dialogs/RestaurantDialog.tsx`)
- Restaurant editor → Toast adapter: reports status (evidence: `src/admin/Dialogs/RestaurantDialog.tsx`)
- Admin data manager → Toast adapter: reports status (evidence: `src/admin/DataManager.tsx`)
- Admin table → Badge mapping: uses mapping (evidence: `src/admin/AdminTable.tsx`)
- Session state → Supabase client: reads auth (evidence: `src/hooks/useSession.ts`)
- User review queries → Optimistic updates: uses updates
- Review queries → Supabase client: queries (evidence: `src/hooks/useReviews.ts`)
- Screen loader → Loader control: reads control (evidence: `src/components/brand/ScreenLoader.tsx`)
- Restaurant editor → UI primitives: uses controls (evidence: `src/admin/Dialogs/RestaurantDialog.tsx`)
- Review submission → UI primitives: uses controls (evidence: `src/components/ReviewForm.tsx`)
- Event features → Halloween theme: loads theme (evidence: `src/events/index.ts`)
