# isaiaha09/happyhourapp architecture

> Architecture diagram of the GitHub repository isaiaha09/happyhourapp, 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/isaiaha09/happyhourapp
- Repository: https://github.com/isaiaha09/happyhourapp

## Overview

DiningDealz is a mobile-first local deals and venue discovery product, backed by a Django API and accompanied by a Next.js website. The main user journey is browse/filter venues, open a business profile, and use account or claim features; backend listing responses are assembled from configured and discovered sources, with durable edits kept in snapshots. The README documents these subsystem relationships, while sampled code confirms selected mobile API, storage, and signal behavior. Several feature modules are represented at their exact paths, but their internal calls were not sampled, so those links are omitted rather than inferred.

Main entry points: [`backend/places/services/source_listings.py`](https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/services/source_listings.py) (Listing normalization), [`mobile/src/api.ts`](https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/api.ts) (API client), [`mobile/src/screens/BrowseControls.tsx`](https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/BrowseControls.tsx) (Browse and map), [`backend/places/views.py`](https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/views.py) (Backend API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile experience"]
  node_app["App shell<br/>[App.tsx]"]
  node_browse["Browse and map<br/>[BrowseControls.tsx]"]
  node_place_detail["Place details"]
  node_mobile_api["API client<br/>[api.ts]"]
  node_account_flow["Auth and claims"]
  node_dashboard["Profile dashboard"]
  node_messages["Direct messages"]
  node_preferences["Customer preferences"]
  node_planner["External planner<br/>[externalPlanner.ts]"]
end

subgraph group_listing["Listing and discovery"]
  node_api_routes["Backend API<br/>[views.py]"]
  node_source_records["Configured sources"]
  node_listing_service["Listing normalization<br/>[source_listings.py]"]
  node_snapshot[("Listing snapshots<br/>[models.py]")]
  node_importers["Source importers"]
  node_discovery_file["Discovery data"]
end

subgraph group_accounts["Accounts and business workflow"]
  node_account_services["Account services"]
  node_media["Managed media<br/>[media_storage.py]"]
  node_admin["Admin workflows"]
end

subgraph group_platform["Website and services"]
  node_web["Public website<br/>[page.tsx]"]
  node_web_auth["Website auth<br/>[route.ts]"]
  node_database[("Application database")]
end

node_customer(("Mobile user"))

node_customer -->|"uses"| node_app
node_app -->|"shows"| node_browse
node_browse -->|"requests listings"| node_mobile_api
node_mobile_api -->|"calls API"| node_api_routes
node_api_routes -->|"builds responses"| node_listing_service
node_listing_service -->|"normalizes"| node_source_records
node_listing_service -->|"uses discovery data"| node_discovery_file
node_listing_service -->|"applies durable edits"| node_snapshot
node_importers -.->|"updates discovery data"| node_discovery_file
node_browse -->|"opens profile"| node_place_detail
node_customer -->|"signs in or claims"| node_account_flow
node_account_flow -->|"submits account actions"| node_mobile_api
node_customer -->|"views profile"| node_dashboard
node_dashboard -.->|"loads profile"| node_mobile_api
node_customer -.->|"uses messaging"| node_messages
node_customer -.->|"sets preferences"| node_preferences
node_place_detail -.->|"opens planner"| node_planner
node_account_services -.->|"reads and writes"| node_database
node_snapshot -->|"persists"| node_database
node_media -.->|"records media"| node_database
node_media -->|"deletes stored files"| node_database
node_admin -.->|"edits listings"| node_snapshot
node_web -.->|"serves public pages"| node_customer
node_web_auth -.->|"authenticates"| node_api_routes

click node_app "https://github.com/isaiaha09/happyhourapp/blob/main/mobile/App.tsx"
click node_browse "https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/BrowseControls.tsx"
click node_place_detail "https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/PlaceDetailScreen.tsx"
click node_mobile_api "https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/api.ts"
click node_account_flow "https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/ProfileFlowScreens.tsx"
click node_dashboard "https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/DashboardScreen.tsx"
click node_messages "https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/DirectMessagesScreen.tsx"
click node_preferences "https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/CustomerPreferencesScreen.tsx"
click node_planner "https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/externalPlanner.ts"
click node_api_routes "https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/views.py"
click node_source_records "https://github.com/isaiaha09/happyhourapp/blob/main/backend/config/business_sources.py"
click node_listing_service "https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/services/source_listings.py"
click node_snapshot "https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/models.py"
click node_importers "https://github.com/isaiaha09/happyhourapp/tree/main/backend/places/services/importers"
click node_account_services "https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/services/account_profiles.py"
click node_media "https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/services/media_storage.py"
click node_admin "https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/services/admin_operations.py"
click node_web "https://github.com/isaiaha09/happyhourapp/blob/main/web/src/app/page.tsx"
click node_web_auth "https://github.com/isaiaha09/happyhourapp/blob/main/web/src/app/api/auth/login/route.ts"
click node_discovery_file "https://github.com/isaiaha09/happyhourapp/blob/main/backend/config/discovered_places.json"

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_browse,node_place_detail,node_mobile_api,node_account_flow,node_dashboard,node_messages,node_preferences,node_planner,node_customer toneBlue
class node_api_routes,node_source_records,node_listing_service,node_snapshot,node_importers,node_discovery_file toneAmber
class node_account_services,node_media,node_admin toneMint
class node_web,node_web_auth,node_database toneRose
```

## Components

### Mobile experience

- [App shell](https://github.com/isaiaha09/happyhourapp/blob/main/mobile/App.tsx): `mobile/App.tsx`
- [Browse and map](https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/BrowseControls.tsx): `mobile/src/screens/BrowseControls.tsx`
- [Place details](https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/PlaceDetailScreen.tsx): `mobile/src/screens/PlaceDetailScreen.tsx`
- [API client](https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/api.ts): `mobile/src/api.ts`
- [Auth and claims](https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/ProfileFlowScreens.tsx): `mobile/src/screens/ProfileFlowScreens.tsx`
- [Profile dashboard](https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/DashboardScreen.tsx): `mobile/src/screens/DashboardScreen.tsx`
- [Direct messages](https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/DirectMessagesScreen.tsx): `mobile/src/screens/DirectMessagesScreen.tsx`
- [Customer preferences](https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/screens/CustomerPreferencesScreen.tsx): `mobile/src/screens/CustomerPreferencesScreen.tsx`
- [External planner](https://github.com/isaiaha09/happyhourapp/blob/main/mobile/src/externalPlanner.ts): `mobile/src/externalPlanner.ts`

### Listing and discovery

- [Backend API](https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/views.py): `backend/places/views.py`
- [Configured sources](https://github.com/isaiaha09/happyhourapp/blob/main/backend/config/business_sources.py): `backend/config/business_sources.py`
- [Listing normalization](https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/services/source_listings.py): `backend/places/services/source_listings.py`
- [Listing snapshots](https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/models.py): `backend/places/models.py`
- [Source importers](https://github.com/isaiaha09/happyhourapp/tree/main/backend/places/services/importers): `backend/places/services/importers`
- [Discovery data](https://github.com/isaiaha09/happyhourapp/blob/main/backend/config/discovered_places.json): `backend/config/discovered_places.json`

### Accounts and business workflow

- [Account services](https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/services/account_profiles.py): `backend/places/services/account_profiles.py`
- [Managed media](https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/services/media_storage.py): `backend/places/services/media_storage.py`
- [Admin workflows](https://github.com/isaiaha09/happyhourapp/blob/main/backend/places/services/admin_operations.py): `backend/places/services/admin_operations.py`

### Website and services

- [Public website](https://github.com/isaiaha09/happyhourapp/blob/main/web/src/app/page.tsx): `web/src/app/page.tsx`
- [Website auth](https://github.com/isaiaha09/happyhourapp/blob/main/web/src/app/api/auth/login/route.ts): `web/src/app/api/auth/login/route.ts`
- **Application database**

### Other components

- **Mobile user**

## Connections

- Mobile user → App shell: uses
- App shell → Browse and map: shows (evidence: `mobile/App.tsx`)
- Browse and map → API client: requests listings
- API client → Backend API: calls API
- Backend API → Listing normalization: builds responses
- Listing normalization → Configured sources: normalizes
- Listing normalization → Discovery data: uses discovery data
- Listing normalization → Listing snapshots: applies durable edits
- Source importers → Discovery data: updates discovery data
- Browse and map → Place details: opens profile
- Mobile user → Auth and claims: signs in or claims
- Auth and claims → API client: submits account actions
- Mobile user → Profile dashboard: views profile
- Profile dashboard → API client: loads profile
- Mobile user → Direct messages: uses messaging
- Mobile user → Customer preferences: sets preferences
- Place details → External planner: opens planner
- Account services → Application database: reads and writes
- Listing snapshots → Application database: persists
- Managed media → Application database: records media
- Managed media → Application database: deletes stored files (evidence: `backend/places/services/media_storage.py`)
- Admin workflows → Listing snapshots: edits listings
- Public website → Mobile user: serves public pages
- Website auth → Backend API: authenticates
