# flameztech01/localspot architecture

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

- Interactive diagram: https://gitdiagram.com/flameztech01/localspot
- Repository: https://github.com/flameztech01/localspot

## Overview

LocalSpot is a frontend for discovering local businesses and places, with account features plus business-owner and administrator workspaces. Visitors browse/search listings, inspect details and reviews, and save places; businesses manage profiles, verification, promotions and ads; administrators oversee listings and platform operations. React routes connect these screens to shared RTK Query endpoint modules, which use a common authenticated API client. The README documents an `/api` proxy to a backend. Some major subsystems are represented by tree paths and SOURCE INDEX references rather than sampled implementation excerpts, so only their documented or indexed relationships are shown.

Main entry points: [`src/App.jsx`](https://github.com/flameztech01/localspot/blob/main/src/App.jsx) (Route application), [`src/features/businessApiSlice.js`](https://github.com/flameztech01/localspot/blob/main/src/features/businessApiSlice.js) (Business API), [`src/features/apiSlice.js`](https://github.com/flameztech01/localspot/blob/main/src/features/apiSlice.js) (Shared API client), [`src/components/admin`](https://github.com/flameztech01/localspot/tree/main/src/components/admin) (Admin operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Place discovery"]
  node_search["Search results<br/>[SearchResults.jsx]"]
  node_business_detail["Place details<br/>[PlacesDetails.jsx]"]
  node_place_detail_alt["Place detail page<br/>[Details.jsx]"]
  node_saved["Saved places<br/>[SavedPlaces.jsx]"]
  node_home["Home discovery<br/>[Home.jsx]"]
end

subgraph group_identity["Accounts"]
  node_auth_pages["Account screens<br/>[Signin.jsx]"]
  node_auth_api["Authentication API<br/>[authApiSlice.js]"]
  node_auth_state["Credential state<br/>[authSlice.js]"]
end

subgraph group_business["Business workspace"]
  node_business_portal["Business workspace"]
  node_business_profile["Business profile"]
  node_verification["Business verification"]
  node_business_ads["Business advertising<br/>[BusinessAds.jsx]"]
  node_business_promotion["Business promotions"]
  node_business_reviews["Business reviews"]
  node_business_api["Business API"]
  node_review_api["Reviews API<br/>[reviewApiSlice.js]"]
  node_ads_api["Advertising API<br/>[adsApiSlice.js]"]
end

subgraph group_admin["Administration"]
  node_admin_page["Admin workspace<br/>[AdminPage.jsx]"]
  node_admin_views["Admin operations"]
  node_admin_api["Administration API<br/>[adminApiSlice.js]"]
  node_analytics_api["Analytics API"]
end

subgraph group_platform["Shared API"]
  node_app["Route application<br/>[App.jsx]"]
  node_shared_api["Shared API client<br/>[apiSlice.js]"]
end

node_visitor(("Visitor"))
node_owner(("Business owner"))
node_administrator(("Administrator"))
node_backend["Backend API"]

node_visitor -->|"opens"| node_app
node_owner -->|"opens"| node_app
node_administrator -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_search
node_app -->|"routes to"| node_business_detail
node_app -->|"routes to"| node_place_detail_alt
node_app -->|"routes to"| node_saved
node_app -->|"routes to"| node_auth_pages
node_app -->|"routes to"| node_business_portal
node_app -->|"routes to"| node_admin_page
node_search -->|"queries listings"| node_business_api
node_business_detail -->|"loads business"| node_business_api
node_business_detail -->|"loads reviews"| node_review_api
node_auth_pages -.->|"authenticates"| node_auth_api
node_auth_api -.->|"sets credentials"| node_auth_state
node_business_portal -.->|"includes"| node_business_profile
node_business_profile -->|"manages profile"| node_business_api
node_verification -->|"submits verification"| node_business_api
node_business_ads -->|"manages ads"| node_ads_api
node_business_promotion -.->|"manages promotions"| node_business_api
node_business_reviews -.->|"manages reviews"| node_review_api
node_admin_page -->|"dispatches views"| node_admin_views
node_admin_page -->|"lists businesses"| node_business_api
node_admin_views -.->|"reviews businesses"| node_business_api
node_admin_views -.->|"administers listings"| node_admin_api
node_admin_views -.->|"loads analytics"| node_analytics_api
node_auth_api -->|"injects endpoints"| node_shared_api
node_business_api -->|"injects endpoints"| node_shared_api
node_review_api -->|"injects endpoints"| node_shared_api
node_ads_api -->|"injects endpoints"| node_shared_api
node_shared_api -->|"requests &#96;/api&#96;"| node_backend

click node_app "https://github.com/flameztech01/localspot/blob/main/src/App.jsx"
click node_search "https://github.com/flameztech01/localspot/blob/main/src/pages/SearchResults.jsx"
click node_business_detail "https://github.com/flameztech01/localspot/blob/main/src/pages/PlacesDetails.jsx"
click node_place_detail_alt "https://github.com/flameztech01/localspot/blob/main/src/pages/Details.jsx"
click node_saved "https://github.com/flameztech01/localspot/blob/main/src/pages/SavedPlaces.jsx"
click node_home "https://github.com/flameztech01/localspot/blob/main/src/pages/Home.jsx"
click node_auth_pages "https://github.com/flameztech01/localspot/blob/main/src/pages/Signin.jsx"
click node_auth_api "https://github.com/flameztech01/localspot/blob/main/src/features/authApiSlice.js"
click node_auth_state "https://github.com/flameztech01/localspot/blob/main/src/features/auth/authSlice.js"
click node_business_portal "https://github.com/flameztech01/localspot/tree/main/src/pages/business"
click node_business_profile "https://github.com/flameztech01/localspot/blob/main/src/pages/business/BusinessProfile.jsx"
click node_verification "https://github.com/flameztech01/localspot/blob/main/src/pages/business/BusinessVerification.jsx"
click node_business_ads "https://github.com/flameztech01/localspot/blob/main/src/pages/business/BusinessAds.jsx"
click node_business_promotion "https://github.com/flameztech01/localspot/blob/main/src/pages/business/BusinessPromotion.jsx"
click node_business_reviews "https://github.com/flameztech01/localspot/blob/main/src/pages/business/BusinessReviews.jsx"
click node_business_api "https://github.com/flameztech01/localspot/blob/main/src/features/businessApiSlice.js"
click node_review_api "https://github.com/flameztech01/localspot/blob/main/src/features/reviewApiSlice.js"
click node_ads_api "https://github.com/flameztech01/localspot/blob/main/src/features/adsApiSlice.js"
click node_admin_page "https://github.com/flameztech01/localspot/blob/main/src/pages/admin/AdminPage.jsx"
click node_admin_views "https://github.com/flameztech01/localspot/tree/main/src/components/admin"
click node_admin_api "https://github.com/flameztech01/localspot/blob/main/src/features/adminApiSlice.js"
click node_analytics_api "https://github.com/flameztech01/localspot/blob/main/src/features/analyticsApiSlice.js"
click node_shared_api "https://github.com/flameztech01/localspot/blob/main/src/features/apiSlice.js"

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_search,node_business_detail,node_place_detail_alt,node_saved,node_home toneBlue
class node_auth_pages,node_auth_api,node_auth_state toneAmber
class node_business_portal,node_business_profile,node_verification,node_business_ads,node_business_promotion,node_business_reviews,node_business_api,node_review_api,node_ads_api,node_backend toneMint
class node_admin_page,node_admin_views,node_admin_api,node_analytics_api toneRose
class node_app,node_shared_api,node_visitor,node_owner,node_administrator toneIndigo
```

## Components

### Place discovery

- [Search results](https://github.com/flameztech01/localspot/blob/main/src/pages/SearchResults.jsx): `src/pages/SearchResults.jsx`
- [Place details](https://github.com/flameztech01/localspot/blob/main/src/pages/PlacesDetails.jsx): `src/pages/PlacesDetails.jsx`
- [Place detail page](https://github.com/flameztech01/localspot/blob/main/src/pages/Details.jsx): `src/pages/Details.jsx`
- [Saved places](https://github.com/flameztech01/localspot/blob/main/src/pages/SavedPlaces.jsx): `src/pages/SavedPlaces.jsx`
- [Home discovery](https://github.com/flameztech01/localspot/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`

### Accounts

- [Account screens](https://github.com/flameztech01/localspot/blob/main/src/pages/Signin.jsx): `src/pages/Signin.jsx`
- [Authentication API](https://github.com/flameztech01/localspot/blob/main/src/features/authApiSlice.js): `src/features/authApiSlice.js`
- [Credential state](https://github.com/flameztech01/localspot/blob/main/src/features/auth/authSlice.js): `src/features/auth/authSlice.js`

### Business workspace

- [Business workspace](https://github.com/flameztech01/localspot/tree/main/src/pages/business): `src/pages/business`
- [Business profile](https://github.com/flameztech01/localspot/blob/main/src/pages/business/BusinessProfile.jsx): `src/pages/business/BusinessProfile.jsx`
- [Business verification](https://github.com/flameztech01/localspot/blob/main/src/pages/business/BusinessVerification.jsx): `src/pages/business/BusinessVerification.jsx`
- [Business advertising](https://github.com/flameztech01/localspot/blob/main/src/pages/business/BusinessAds.jsx): `src/pages/business/BusinessAds.jsx`
- [Business promotions](https://github.com/flameztech01/localspot/blob/main/src/pages/business/BusinessPromotion.jsx): `src/pages/business/BusinessPromotion.jsx`
- [Business reviews](https://github.com/flameztech01/localspot/blob/main/src/pages/business/BusinessReviews.jsx): `src/pages/business/BusinessReviews.jsx`
- [Business API](https://github.com/flameztech01/localspot/blob/main/src/features/businessApiSlice.js): `src/features/businessApiSlice.js`
- [Reviews API](https://github.com/flameztech01/localspot/blob/main/src/features/reviewApiSlice.js): `src/features/reviewApiSlice.js`
- [Advertising API](https://github.com/flameztech01/localspot/blob/main/src/features/adsApiSlice.js): `src/features/adsApiSlice.js`

### Administration

- [Admin workspace](https://github.com/flameztech01/localspot/blob/main/src/pages/admin/AdminPage.jsx): `src/pages/admin/AdminPage.jsx`
- [Admin operations](https://github.com/flameztech01/localspot/tree/main/src/components/admin): `src/components/admin`
- [Administration API](https://github.com/flameztech01/localspot/blob/main/src/features/adminApiSlice.js): `src/features/adminApiSlice.js`
- [Analytics API](https://github.com/flameztech01/localspot/blob/main/src/features/analyticsApiSlice.js): `src/features/analyticsApiSlice.js`

### Shared API

- [Route application](https://github.com/flameztech01/localspot/blob/main/src/App.jsx): `src/App.jsx`
- [Shared API client](https://github.com/flameztech01/localspot/blob/main/src/features/apiSlice.js): `src/features/apiSlice.js`

### Other components

- **Visitor**
- **Business owner**
- **Administrator**
- **Backend API**

## Connections

- Visitor → Route application: opens (evidence: `src/App.jsx`)
- Business owner → Route application: opens (evidence: `src/App.jsx`)
- Administrator → Route application: opens (evidence: `src/App.jsx`)
- Route application → Home discovery: routes to (evidence: `src/App.jsx`)
- Route application → Search results: routes to (evidence: `src/App.jsx`)
- Route application → Place details: routes to (evidence: `src/App.jsx`)
- Route application → Place detail page: routes to (evidence: `src/App.jsx`)
- Route application → Saved places: routes to (evidence: `src/App.jsx`)
- Route application → Account screens: routes to (evidence: `src/App.jsx`)
- Route application → Business workspace: routes to (evidence: `src/App.jsx`)
- Route application → Admin workspace: routes to (evidence: `src/App.jsx`)
- Search results → Business API: queries listings (evidence: `src/pages/SearchResults.jsx`)
- Place details → Business API: loads business (evidence: `src/pages/PlacesDetails.jsx`)
- Place details → Reviews API: loads reviews (evidence: `src/pages/PlacesDetails.jsx`)
- Account screens → Authentication API: authenticates
- Authentication API → Credential state: sets credentials
- Business workspace → Business profile: includes
- Business profile → Business API: manages profile (evidence: `src/pages/business/BusinessProfile.jsx`)
- Business verification → Business API: submits verification (evidence: `src/pages/business/BusinessVerification.jsx`)
- Business advertising → Advertising API: manages ads (evidence: `src/pages/business/BusinessAds.jsx`)
- Business promotions → Business API: manages promotions
- Business reviews → Reviews API: manages reviews
- Admin workspace → Admin operations: dispatches views (evidence: `src/pages/admin/AdminPage.jsx`)
- Admin workspace → Business API: lists businesses (evidence: `src/pages/admin/AdminPage.jsx`)
- Admin operations → Business API: reviews businesses (evidence: `src/components/admin/AdminBusinessApproval.jsx`)
- Admin operations → Administration API: administers listings (evidence: `src/components/admin/AdminFeaturedView.jsx`)
- Admin operations → Analytics API: loads analytics (evidence: `src/components/admin/AdminDashboardView.jsx`)
- Authentication API → Shared API client: injects endpoints (evidence: `src/features/authApiSlice.js`)
- Business API → Shared API client: injects endpoints (evidence: `src/features/businessApiSlice.js`)
- Reviews API → Shared API client: injects endpoints (evidence: `src/features/reviewApiSlice.js`)
- Advertising API → Shared API client: injects endpoints (evidence: `src/features/adsApiSlice.js`)
- Shared API client → Backend API: requests `/api` (evidence: `src/features/apiSlice.js`)
