# d1da-1103/rocket24h architecture

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

- Interactive diagram: https://gitdiagram.com/d1da-1103/rocket24h
- Repository: https://github.com/d1da-1103/rocket24h

## Overview

Rocket24h is a place-and-visit memory journal: users choose or create a Place, record a Spot with photos, rating, price, caption, visit date and sharing/location privacy, then revisit entries through feeds, profiles and maps. Friends, likes, saved places and notifications support selective sharing and discovery. The graph combines sampled calls and SOURCE INDEX references with README-documented capabilities; unsampled page and service internals are represented only at their supported paths, so some links are documented rather than source-verified.

Main entry points: [`src/app/page.tsx`](https://github.com/d1da-1103/rocket24h/blob/main/src/app/page.tsx) (Activity feed), [`src/components/SpotCard.tsx`](https://github.com/d1da-1103/rocket24h/blob/main/src/components/SpotCard.tsx) (Spot display), [`src/lib/data/spots.ts`](https://github.com/d1da-1103/rocket24h/blob/main/src/lib/data/spots.ts) (Spot data), [`src/app/spots/new/page.tsx`](https://github.com/d1da-1103/rocket24h/blob/main/src/app/spots/new/page.tsx) (Create a Spot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_authui["Sign-in and profile<br/>[AuthContext.tsx]"]
  node_feed["Activity feed<br/>[page.tsx]"]
  node_spotform["Create a Spot<br/>[page.tsx]"]
  node_placepicker["Place picker<br/>[PlacePicker.tsx]"]
  node_map["Personal map<br/>[page.tsx]"]
  node_mapview["Interactive map"]
  node_spotcard["Spot display<br/>[SpotCard.tsx]"]
  node_spotdetail["Spot detail<br/>[page.tsx]"]
  node_placedetail["Place detail<br/>[page.tsx]"]
  node_userprofile["User profile<br/>[page.tsx]"]
  node_friendsui["Friends<br/>[page.tsx]"]
  node_notificationsui["Notifications<br/>[page.tsx]"]
end

subgraph group_domain["Domain and data"]
  node_feedloader["Feed loading<br/>[feed-loader.ts]"]
  node_spotdata["Spot data<br/>[spots.ts]"]
  node_placedata["Place data<br/>[places.ts]"]
  node_socialdata["Social data<br/>[friends.ts]"]
  node_supportdata["Likes and saves<br/>[likes.ts]"]
  node_media["Media URLs<br/>[useMediaUrls.ts]"]
  node_geo["Geospatial search<br/>[index.ts]"]
end

subgraph group_server["Server operations"]
  node_api["Friend API<br/>[route.ts]"]
  node_friendservice["Friend operations<br/>[friends.ts]"]
end

subgraph group_platform["External platform"]
  node_firebase[("Firebase services")]
  node_maptiles["Map tiles"]
end

node_visitor(("User"))

node_visitor -->|"signs in"| node_authui
node_visitor -->|"browses"| node_feed
node_visitor -->|"records visit"| node_spotform
node_spotform -->|"selects place"| node_placepicker
node_placepicker -->|"finds nearby"| node_placedata
node_placedata -->|"queries bounds"| node_geo
node_spotform -->|"creates Spot"| node_spotdata
node_spotdata -->|"writes records and media"| node_firebase
node_feed -->|"loads feed"| node_feedloader
node_feedloader -->|"fetches entries"| node_spotdata
node_feedloader -->|"reads data"| node_firebase
node_feed -->|"loads friends"| node_socialdata
node_feed -.->|"renders entries"| node_spotcard
node_spotcard -->|"resolves images"| node_media
node_media -.->|"resolves storage paths"| node_firebase
node_spotcard -->|"updates visibility"| node_spotdata
node_spotcard -->|"toggles saved place"| node_supportdata
node_visitor -->|"explores visits"| node_map
node_map -.->|"shows locations"| node_mapview
node_mapview -.->|"loads tiles"| node_maptiles
node_visitor -->|"opens Spot"| node_spotdetail
node_visitor -->|"opens Place"| node_placedetail
node_visitor -->|"views profile"| node_userprofile
node_visitor -->|"manages friends"| node_friendsui
node_friendsui -->|"reads relationships"| node_socialdata
node_friendsui -.->|"submits friend action"| node_api
node_api -->|"applies action"| node_friendservice
node_visitor -->|"checks updates"| node_notificationsui
node_notificationsui -.->|"loads notifications"| node_firebase
node_authui -->|"authenticates and stores profile"| node_firebase

click node_authui "https://github.com/d1da-1103/rocket24h/blob/main/src/features/auth/AuthContext.tsx"
click node_feed "https://github.com/d1da-1103/rocket24h/blob/main/src/app/page.tsx"
click node_feedloader "https://github.com/d1da-1103/rocket24h/blob/main/src/features/feed/feed-loader.ts"
click node_spotform "https://github.com/d1da-1103/rocket24h/blob/main/src/app/spots/new/page.tsx"
click node_placepicker "https://github.com/d1da-1103/rocket24h/blob/main/src/components/PlacePicker.tsx"
click node_map "https://github.com/d1da-1103/rocket24h/blob/main/src/app/map/page.tsx"
click node_mapview "https://github.com/d1da-1103/rocket24h/blob/main/src/components/map/LeafletMapInner.tsx"
click node_spotcard "https://github.com/d1da-1103/rocket24h/blob/main/src/components/SpotCard.tsx"
click node_spotdetail "https://github.com/d1da-1103/rocket24h/blob/main/src/app/spots/%5Bid%5D/page.tsx"
click node_placedetail "https://github.com/d1da-1103/rocket24h/blob/main/src/app/places/%5Bid%5D/page.tsx"
click node_userprofile "https://github.com/d1da-1103/rocket24h/blob/main/src/app/users/%5Buid%5D/page.tsx"
click node_friendsui "https://github.com/d1da-1103/rocket24h/blob/main/src/app/friends/page.tsx"
click node_notificationsui "https://github.com/d1da-1103/rocket24h/blob/main/src/app/notifications/page.tsx"
click node_spotdata "https://github.com/d1da-1103/rocket24h/blob/main/src/lib/data/spots.ts"
click node_placedata "https://github.com/d1da-1103/rocket24h/blob/main/src/lib/data/places.ts"
click node_socialdata "https://github.com/d1da-1103/rocket24h/blob/main/src/lib/data/friends.ts"
click node_supportdata "https://github.com/d1da-1103/rocket24h/blob/main/src/lib/data/likes.ts"
click node_media "https://github.com/d1da-1103/rocket24h/blob/main/src/features/media/useMediaUrls.ts"
click node_geo "https://github.com/d1da-1103/rocket24h/blob/main/src/lib/geo/index.ts"
click node_api "https://github.com/d1da-1103/rocket24h/blob/main/src/app/api/friends/route.ts"
click node_friendservice "https://github.com/d1da-1103/rocket24h/blob/main/src/server/friends.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_authui,node_feed,node_spotform,node_placepicker,node_map,node_mapview,node_spotcard,node_spotdetail,node_placedetail,node_userprofile,node_friendsui,node_notificationsui,node_visitor toneBlue
class node_feedloader,node_spotdata,node_placedata,node_socialdata,node_supportdata,node_media,node_geo toneAmber
class node_api,node_friendservice toneMint
class node_firebase,node_maptiles toneRose
```

## Components

### User experience

- [Sign-in and profile](https://github.com/d1da-1103/rocket24h/blob/main/src/features/auth/AuthContext.tsx): `src/features/auth/AuthContext.tsx`
- [Activity feed](https://github.com/d1da-1103/rocket24h/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Create a Spot](https://github.com/d1da-1103/rocket24h/blob/main/src/app/spots/new/page.tsx): `src/app/spots/new/page.tsx`
- [Place picker](https://github.com/d1da-1103/rocket24h/blob/main/src/components/PlacePicker.tsx): `src/components/PlacePicker.tsx`
- [Personal map](https://github.com/d1da-1103/rocket24h/blob/main/src/app/map/page.tsx): `src/app/map/page.tsx`
- [Interactive map](https://github.com/d1da-1103/rocket24h/blob/main/src/components/map/LeafletMapInner.tsx): `src/components/map/LeafletMapInner.tsx`
- [Spot display](https://github.com/d1da-1103/rocket24h/blob/main/src/components/SpotCard.tsx): `src/components/SpotCard.tsx`
- [Spot detail](https://github.com/d1da-1103/rocket24h/blob/main/src/app/spots/%5Bid%5D/page.tsx): `src/app/spots/[id]/page.tsx`
- [Place detail](https://github.com/d1da-1103/rocket24h/blob/main/src/app/places/%5Bid%5D/page.tsx): `src/app/places/[id]/page.tsx`
- [User profile](https://github.com/d1da-1103/rocket24h/blob/main/src/app/users/%5Buid%5D/page.tsx): `src/app/users/[uid]/page.tsx`
- [Friends](https://github.com/d1da-1103/rocket24h/blob/main/src/app/friends/page.tsx): `src/app/friends/page.tsx`
- [Notifications](https://github.com/d1da-1103/rocket24h/blob/main/src/app/notifications/page.tsx): `src/app/notifications/page.tsx`

### Domain and data

- [Feed loading](https://github.com/d1da-1103/rocket24h/blob/main/src/features/feed/feed-loader.ts): `src/features/feed/feed-loader.ts`
- [Spot data](https://github.com/d1da-1103/rocket24h/blob/main/src/lib/data/spots.ts): `src/lib/data/spots.ts`
- [Place data](https://github.com/d1da-1103/rocket24h/blob/main/src/lib/data/places.ts): `src/lib/data/places.ts`
- [Social data](https://github.com/d1da-1103/rocket24h/blob/main/src/lib/data/friends.ts): `src/lib/data/friends.ts`
- [Likes and saves](https://github.com/d1da-1103/rocket24h/blob/main/src/lib/data/likes.ts): `src/lib/data/likes.ts`
- [Media URLs](https://github.com/d1da-1103/rocket24h/blob/main/src/features/media/useMediaUrls.ts): `src/features/media/useMediaUrls.ts`
- [Geospatial search](https://github.com/d1da-1103/rocket24h/blob/main/src/lib/geo/index.ts): `src/lib/geo/index.ts`

### Server operations

- [Friend API](https://github.com/d1da-1103/rocket24h/blob/main/src/app/api/friends/route.ts): `src/app/api/friends/route.ts`
- [Friend operations](https://github.com/d1da-1103/rocket24h/blob/main/src/server/friends.ts): `src/server/friends.ts`

### External platform

- **Firebase services**
- **Map tiles**

### Other components

- **User**

## Connections

- User → Sign-in and profile: signs in
- User → Activity feed: browses
- User → Create a Spot: records visit
- Create a Spot → Place picker: selects place (evidence: `src/app/spots/new/page.tsx`)
- Place picker → Place data: finds nearby (evidence: `src/components/PlacePicker.tsx`)
- Place data → Geospatial search: queries bounds (evidence: `src/lib/data/places.ts`)
- Create a Spot → Spot data: creates Spot (evidence: `src/app/spots/new/page.tsx`)
- Spot data → Firebase services: writes records and media (evidence: `src/lib/data/spots.ts`)
- Activity feed → Feed loading: loads feed (evidence: `src/app/page.tsx`)
- Feed loading → Spot data: fetches entries (evidence: `src/features/feed/feed-loader.ts`)
- Feed loading → Firebase services: reads data (evidence: `src/features/feed/feed-loader.ts`)
- Activity feed → Social data: loads friends (evidence: `src/app/page.tsx`)
- Activity feed → Spot display: renders entries (evidence: `src/app/page.tsx`)
- Spot display → Media URLs: resolves images (evidence: `src/components/SpotCard.tsx`)
- Media URLs → Firebase services: resolves storage paths
- Spot display → Spot data: updates visibility (evidence: `src/components/SpotCard.tsx`)
- Spot display → Likes and saves: toggles saved place (evidence: `src/components/SpotCard.tsx`)
- User → Personal map: explores visits
- Personal map → Interactive map: shows locations
- Interactive map → Map tiles: loads tiles
- User → Spot detail: opens Spot
- User → Place detail: opens Place
- User → User profile: views profile
- User → Friends: manages friends
- Friends → Social data: reads relationships (evidence: `src/app/friends/page.tsx`)
- Friends → Friend API: submits friend action
- Friend API → Friend operations: applies action (evidence: `src/app/api/friends/route.ts`)
- User → Notifications: checks updates
- Notifications → Firebase services: loads notifications
- Sign-in and profile → Firebase services: authenticates and stores profile (evidence: `src/features/auth/AuthContext.tsx`)
