# h3llynx/rollerscape architecture

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

- Interactive diagram: https://gitdiagram.com/h3llynx/rollerscape
- Repository: https://github.com/h3llynx/rollerscape

## Overview

RollerScape is a community map for inline skaters to discover, contribute, review, and navigate skating spots. The main journey runs from public map browsing and filtering to selecting a spot and viewing its details or route; signed-in users can submit spots and manage favorites, reviews, and skating profiles. The map, auth, profile, and spot-management stages are represented alongside Supabase-backed services and external map/location capabilities. Arrows are limited to relationships shown in excerpts or explicitly documented; some capability links remain unverified because their page implementations were not sampled.

Main entry points: [`src/features/map/MapPage.tsx`](https://github.com/h3llynx/rollerscape/blob/main/src/features/map/MapPage.tsx) (Map Discovery), [`src/router/router.tsx`](https://github.com/h3llynx/rollerscape/blob/main/src/router/router.tsx) (Route Configuration), [`src/router/ProtectedRoute.tsx`](https://github.com/h3llynx/rollerscape/blob/main/src/router/ProtectedRoute.tsx) (Protected Routes), [`src/features/spot_management/AddSpotPage.tsx`](https://github.com/h3llynx/rollerscape/blob/main/src/features/spot_management/AddSpotPage.tsx) (Spot Submission)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["App Providers<br/>[App.tsx]"]
  node_router["Route Configuration<br/>[router.tsx]"]
  node_guard["Protected Routes<br/>[ProtectedRoute.tsx]"]
end

subgraph group_discovery["Map Discovery"]
  node_map["Map Discovery<br/>[MapPage.tsx]"]
  node_mapcontexts["Map Context Hooks<br/>[useContexts.tsx]"]
  node_locationsearch["Location Search<br/>[LocationSearch.tsx]"]
  node_mapping["Map &amp; Routes<br/>[MapBase.tsx]"]
  node_spotpanel["Spot Details<br/>[SpotLeftPanel.tsx]"]
end

subgraph group_contributions["Spot Contributions"]
  node_addspot["Spot Submission<br/>[AddSpotPage.tsx]"]
  node_spotform["Spot Form State<br/>[useSpotForm.tsx]"]
  node_addmap["Spot Map Input<br/>[useAddSpotMap.tsx]"]
  node_reviews["Reviews<br/>[ReviewForm.tsx]"]
end

subgraph group_identity["Accounts &amp; Profiles"]
  node_authpage["Sign In / Register<br/>[AuthPage.tsx]"]
  node_authprovider["Auth Session<br/>[AuthProvider.tsx]"]
  node_profile["User Profile<br/>[ProfilePage.tsx]"]
  node_onboarding["Skater Onboarding<br/>[OnboardingPage.tsx]"]
end

subgraph group_platform["Services &amp; Data"]
  node_authservice["Auth Operations<br/>[auth.ts]"]
  node_supabase["Supabase Client<br/>[supabase.ts]"]
  node_mapservices["Spot Data Services<br/>[spots.ts]"]
  node_geolocation["Location Services<br/>[geolocation.ts]"]
  node_imagehost["Photo Hosting<br/>[image-hosting.ts]"]
  node_data["Data Operations<br/>[data.ts]"]
  node_database[("Supabase Database")]
  node_osrm["OSRM Routing"]
  node_nominatim["Nominatim Search"]
  node_browsergeo["Browser Geolocation"]
end

node_skater(("Skater"))

node_skater -->|"opens"| node_router
node_router -->|"routes to"| node_map
node_router -->|"routes to"| node_authpage
node_router -->|"wraps"| node_guard
node_guard -->|"allows"| node_profile
node_guard -->|"allows"| node_addspot
node_guard -->|"allows"| node_onboarding
node_app -->|"provides"| node_router
node_app -->|"provides"| node_authprovider
node_authpage -->|"calls"| node_authservice
node_authprovider -->|"calls"| node_authservice
node_authservice -->|"uses"| node_supabase
node_supabase -->|"connects"| node_database
node_map -->|"reads context"| node_mapcontexts
node_map -->|"renders"| node_mapping
node_map -->|"renders"| node_spotpanel
node_map --> node_locationsearch
node_map -.-> node_mapservices
node_mapservices -->|"uses"| node_supabase
node_locationsearch -.->|"searches"| node_nominatim
node_mapping -.->|"previews routes"| node_osrm
node_map -->|"requests position"| node_geolocation
node_geolocation -.->|"uses"| node_browsergeo
node_addspot -.->|"uses form"| node_spotform
node_addspot -.->|"uses map input"| node_addmap
node_spotform -->|"uploads photos"| node_imagehost
node_profile -.->|"loads profile data"| node_data
node_reviews -->|"calls"| node_data
node_data -->|"uses"| node_supabase
node_data -.->|"reads and writes"| node_database
node_skater -->|"views"| node_profile
node_skater -->|"submits"| node_addspot

click node_app "https://github.com/h3llynx/rollerscape/blob/main/src/App.tsx"
click node_router "https://github.com/h3llynx/rollerscape/blob/main/src/router/router.tsx"
click node_guard "https://github.com/h3llynx/rollerscape/blob/main/src/router/ProtectedRoute.tsx"
click node_authpage "https://github.com/h3llynx/rollerscape/blob/main/src/features/auth/AuthPage.tsx"
click node_authprovider "https://github.com/h3llynx/rollerscape/blob/main/src/features/auth/context/AuthProvider.tsx"
click node_authservice "https://github.com/h3llynx/rollerscape/blob/main/src/services/auth.ts"
click node_supabase "https://github.com/h3llynx/rollerscape/blob/main/src/utils/supabase.ts"
click node_map "https://github.com/h3llynx/rollerscape/blob/main/src/features/map/MapPage.tsx"
click node_mapcontexts "https://github.com/h3llynx/rollerscape/blob/main/src/features/map/hooks/useContexts.tsx"
click node_locationsearch "https://github.com/h3llynx/rollerscape/blob/main/src/features/map/components/LocationSearch/LocationSearch.tsx"
click node_mapservices "https://github.com/h3llynx/rollerscape/blob/main/src/services/spots.ts"
click node_geolocation "https://github.com/h3llynx/rollerscape/blob/main/src/services/geolocation.ts"
click node_mapping "https://github.com/h3llynx/rollerscape/blob/main/src/features/map/components/MapBase/MapBase.tsx"
click node_spotpanel "https://github.com/h3llynx/rollerscape/blob/main/src/features/spot_management/components/SpotLeftPanel/SpotLeftPanel.tsx"
click node_addspot "https://github.com/h3llynx/rollerscape/blob/main/src/features/spot_management/AddSpotPage.tsx"
click node_spotform "https://github.com/h3llynx/rollerscape/blob/main/src/features/spot_management/hooks/useSpotForm.tsx"
click node_addmap "https://github.com/h3llynx/rollerscape/blob/main/src/features/spot_management/hooks/useAddSpotMap.tsx"
click node_imagehost "https://github.com/h3llynx/rollerscape/blob/main/src/services/image-hosting.ts"
click node_profile "https://github.com/h3llynx/rollerscape/blob/main/src/features/profile/ProfilePage.tsx"
click node_onboarding "https://github.com/h3llynx/rollerscape/blob/main/src/features/profile/OnboardingPage.tsx"
click node_reviews "https://github.com/h3llynx/rollerscape/blob/main/src/features/spot_management/components/ReviewForm/ReviewForm.tsx"
click node_data "https://github.com/h3llynx/rollerscape/blob/main/src/services/data.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_guard toneBlue
class node_map,node_mapcontexts,node_locationsearch,node_mapping,node_spotpanel toneAmber
class node_addspot,node_spotform,node_addmap,node_reviews toneMint
class node_authpage,node_authprovider,node_profile,node_onboarding toneRose
class node_authservice,node_supabase,node_mapservices,node_geolocation,node_imagehost,node_data,node_database,node_osrm,node_nominatim,node_browsergeo,node_skater toneIndigo
```

## Components

### Application

- [App Providers](https://github.com/h3llynx/rollerscape/blob/main/src/App.tsx): `src/App.tsx`
- [Route Configuration](https://github.com/h3llynx/rollerscape/blob/main/src/router/router.tsx): `src/router/router.tsx`
- [Protected Routes](https://github.com/h3llynx/rollerscape/blob/main/src/router/ProtectedRoute.tsx): `src/router/ProtectedRoute.tsx`

### Map Discovery

- [Map Discovery](https://github.com/h3llynx/rollerscape/blob/main/src/features/map/MapPage.tsx): `src/features/map/MapPage.tsx`
- [Map Context Hooks](https://github.com/h3llynx/rollerscape/blob/main/src/features/map/hooks/useContexts.tsx): `src/features/map/hooks/useContexts.tsx`
- [Location Search](https://github.com/h3llynx/rollerscape/blob/main/src/features/map/components/LocationSearch/LocationSearch.tsx): `src/features/map/components/LocationSearch/LocationSearch.tsx`
- [Map & Routes](https://github.com/h3llynx/rollerscape/blob/main/src/features/map/components/MapBase/MapBase.tsx): `src/features/map/components/MapBase/MapBase.tsx`
- [Spot Details](https://github.com/h3llynx/rollerscape/blob/main/src/features/spot_management/components/SpotLeftPanel/SpotLeftPanel.tsx): `src/features/spot_management/components/SpotLeftPanel/SpotLeftPanel.tsx`

### Spot Contributions

- [Spot Submission](https://github.com/h3llynx/rollerscape/blob/main/src/features/spot_management/AddSpotPage.tsx): `src/features/spot_management/AddSpotPage.tsx`
- [Spot Form State](https://github.com/h3llynx/rollerscape/blob/main/src/features/spot_management/hooks/useSpotForm.tsx): `src/features/spot_management/hooks/useSpotForm.tsx`
- [Spot Map Input](https://github.com/h3llynx/rollerscape/blob/main/src/features/spot_management/hooks/useAddSpotMap.tsx): `src/features/spot_management/hooks/useAddSpotMap.tsx`
- [Reviews](https://github.com/h3llynx/rollerscape/blob/main/src/features/spot_management/components/ReviewForm/ReviewForm.tsx): `src/features/spot_management/components/ReviewForm/ReviewForm.tsx`

### Accounts & Profiles

- [Sign In / Register](https://github.com/h3llynx/rollerscape/blob/main/src/features/auth/AuthPage.tsx): `src/features/auth/AuthPage.tsx`
- [Auth Session](https://github.com/h3llynx/rollerscape/blob/main/src/features/auth/context/AuthProvider.tsx): `src/features/auth/context/AuthProvider.tsx`
- [User Profile](https://github.com/h3llynx/rollerscape/blob/main/src/features/profile/ProfilePage.tsx): `src/features/profile/ProfilePage.tsx`
- [Skater Onboarding](https://github.com/h3llynx/rollerscape/blob/main/src/features/profile/OnboardingPage.tsx): `src/features/profile/OnboardingPage.tsx`

### Services & Data

- [Auth Operations](https://github.com/h3llynx/rollerscape/blob/main/src/services/auth.ts): `src/services/auth.ts`
- [Supabase Client](https://github.com/h3llynx/rollerscape/blob/main/src/utils/supabase.ts): `src/utils/supabase.ts`
- [Spot Data Services](https://github.com/h3llynx/rollerscape/blob/main/src/services/spots.ts): `src/services/spots.ts`
- [Location Services](https://github.com/h3llynx/rollerscape/blob/main/src/services/geolocation.ts): `src/services/geolocation.ts`
- [Photo Hosting](https://github.com/h3llynx/rollerscape/blob/main/src/services/image-hosting.ts): `src/services/image-hosting.ts`
- [Data Operations](https://github.com/h3llynx/rollerscape/blob/main/src/services/data.ts): `src/services/data.ts`
- **Supabase Database**
- **OSRM Routing**
- **Nominatim Search**
- **Browser Geolocation**

### Other components

- **Skater**

## Connections

- Skater → Route Configuration: opens (evidence: `src/router/router.tsx`)
- Route Configuration → Map Discovery: routes to (evidence: `src/router/router.tsx`)
- Route Configuration → Sign In / Register: routes to (evidence: `src/router/router.tsx`)
- Route Configuration → Protected Routes: wraps (evidence: `src/router/router.tsx`)
- Protected Routes → User Profile: allows (evidence: `src/router/router.tsx`)
- Protected Routes → Spot Submission: allows (evidence: `src/router/router.tsx`)
- Protected Routes → Skater Onboarding: allows (evidence: `src/router/router.tsx`)
- App Providers → Route Configuration: provides (evidence: `src/App.tsx`)
- App Providers → Auth Session: provides (evidence: `src/App.tsx`)
- Sign In / Register → Auth Operations: calls (evidence: `src/features/auth/AuthPage.tsx`)
- Auth Session → Auth Operations: calls (evidence: `src/features/auth/context/AuthProvider.tsx`)
- Auth Operations → Supabase Client: uses (evidence: `src/services/auth.ts`)
- Supabase Client → Supabase Database: connects (evidence: `src/utils/supabase.ts`)
- Map Discovery → Map Context Hooks: reads context (evidence: `src/features/map/MapPage.tsx`)
- Map Discovery → Map & Routes: renders (evidence: `src/features/map/MapPage.tsx`)
- Map Discovery → Spot Details: renders (evidence: `src/features/map/MapPage.tsx`)
- Map Discovery → Location Search (evidence: `src/features/map/MapPage.tsx`)
- Map Discovery → Spot Data Services
- Spot Data Services → Supabase Client: uses (evidence: `src/services/spots.ts`)
- Location Search → Nominatim Search: searches
- Map & Routes → OSRM Routing: previews routes
- Map Discovery → Location Services: requests position
- Location Services → Browser Geolocation: uses
- Spot Submission → Spot Form State: uses form
- Spot Submission → Spot Map Input: uses map input
- Spot Form State → Photo Hosting: uploads photos (evidence: `src/features/spot_management/hooks/useSpotForm.tsx`)
- User Profile → Data Operations: loads profile data
- Reviews → Data Operations: calls (evidence: `src/features/spot_management/components/ReviewForm/ReviewForm.tsx`)
- Data Operations → Supabase Client: uses (evidence: `src/services/data.ts`)
- Data Operations → Supabase Database: reads and writes
- Skater → User Profile: views
- Skater → Spot Submission: submits
