# itssaksham00/herenow architecture

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

- Interactive diagram: https://gitdiagram.com/itssaksham00/herenow
- Repository: https://github.com/itssaksham00/herenow

## Overview

HereNow is a mobile app for finding and publishing nearby, time-bounded activities. The main workflow runs from sign-in and area selection through a filtered feed or map, then activity details and participation; a separate create flow supports photo suggestions and publishing. The API handles authenticated domain operations backed by Supabase, with SQL providing nearby filtering and atomic interest behavior. The graph combines sampled module references with README-documented capabilities; unsampled subsystem links are omitted or marked unverified.

Main entry points: [`apps/mobile/App.tsx`](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/App.tsx) (Navigation and session), [`apps/mobile/src/lib/api.ts`](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/lib/api.ts) (Authenticated API client), [`apps/api/src/common/supabase.service.ts`](https://github.com/itssaksham00/herenow/blob/main/apps/api/src/common/supabase.service.ts) (Server data client), [`apps/api/src/posts/posts.service.ts`](https://github.com/itssaksham00/herenow/blob/main/apps/api/src/posts/posts.service.ts) (Posts and AI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile experience"]
  node_app["Navigation and session<br/>[App.tsx]"]
  node_authscreen["Sign in<br/>[AuthScreen.tsx]"]
  node_location["Choose area<br/>[LocationScreen.tsx]"]
  node_search["Place search<br/>[LocationSearch.tsx]"]
  node_feed["Nearby feed<br/>[FeedScreen.tsx]"]
  node_map["Activity map<br/>[MapScreen.tsx]"]
  node_create["Create activity"]
  node_detail["Activity details"]
  node_activity["Activity inbox<br/>[ActivityScreen.tsx]"]
  node_profile["Profile management<br/>[ProfileScreen.tsx]"]
  node_apihelper["Authenticated API client<br/>[api.ts]"]
  node_mobileauth["Supabase client<br/>[supabase.ts]"]
end

subgraph group_api["API domain"]
  node_api["REST API<br/>[main.ts]"]
  node_authguard["Token verification<br/>[auth.guard.ts]"]
  node_posts["Posts and AI<br/>[posts.service.ts]"]
  node_users["User profiles"]
  node_comments["Comments"]
  node_interests["Interest action"]
  node_notifications["Notifications"]
end

subgraph group_backend["Backend services"]
  node_dbclient["Server data client"]
  node_dtos["Request validation<br/>[dtos.ts]"]
end

subgraph group_data["Supabase data"]
  node_supabaseauth["Supabase Auth"]
  node_database[("PostgreSQL and storage<br/>[001_init.sql]")]
  node_postingmigration[("Activity feed rules")]
end

node_person(("App user"))
node_openai["OpenAI vision"]

node_person -->|"uses"| node_app
node_app -->|"checks session"| node_mobileauth
node_app -->|"shows signed out"| node_authscreen
node_app -->|"selects area"| node_location
node_app -->|"opens feed"| node_feed
node_app -->|"opens map"| node_map
node_app -->|"opens activity"| node_detail
node_app -->|"opens composer"| node_create
node_app -->|"opens inbox"| node_activity
node_app -->|"opens profile"| node_profile
node_location -.->|"offers search"| node_search
node_feed -->|"requests feed"| node_apihelper
node_map -->|"requests markers"| node_apihelper
node_create -->|"publishes activity"| node_apihelper
node_detail -->|"loads and participates"| node_apihelper
node_activity -->|"loads inbox"| node_apihelper
node_profile -->|"updates profile"| node_apihelper
node_apihelper -->|"gets access token"| node_mobileauth
node_apihelper -->|"sends REST requests"| node_api
node_api -->|"guards routes"| node_authguard
node_api -->|"routes post actions"| node_posts
node_posts -->|"reads and writes"| node_dbclient
node_posts -->|"uses validated inputs"| node_dtos
node_users -->|"reads and writes"| node_dbclient
node_comments -->|"reads and writes"| node_dbclient
node_comments -->|"validates comments"| node_dtos
node_interests -->|"records interest"| node_dbclient
node_notifications -->|"reads and updates"| node_dbclient
node_authguard -->|"verifies token"| node_dbclient
node_dbclient -->|"verifies identity"| node_supabaseauth
node_dbclient -->|"queries and stores"| node_database
node_database -->|"extends feed behavior"| node_postingmigration
node_posts -.->|"requests suggestions"| node_openai
node_database -.->|"stores photos privately"| node_openai

click node_app "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/App.tsx"
click node_authscreen "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/AuthScreen.tsx"
click node_location "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/LocationScreen.tsx"
click node_search "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/components/LocationSearch.tsx"
click node_feed "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/FeedScreen.tsx"
click node_map "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/MapScreen.tsx"
click node_create "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/CreatePostScreen.tsx"
click node_detail "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/PostDetailScreen.tsx"
click node_activity "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/ActivityScreen.tsx"
click node_profile "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/ProfileScreen.tsx"
click node_apihelper "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/lib/api.ts"
click node_mobileauth "https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/lib/supabase.ts"
click node_api "https://github.com/itssaksham00/herenow/blob/main/apps/api/src/main.ts"
click node_authguard "https://github.com/itssaksham00/herenow/blob/main/apps/api/src/auth/auth.guard.ts"
click node_posts "https://github.com/itssaksham00/herenow/blob/main/apps/api/src/posts/posts.service.ts"
click node_users "https://github.com/itssaksham00/herenow/blob/main/apps/api/src/users/users.controller.ts"
click node_comments "https://github.com/itssaksham00/herenow/blob/main/apps/api/src/comments/comments.controller.ts"
click node_interests "https://github.com/itssaksham00/herenow/blob/main/apps/api/src/interests/interests.controller.ts"
click node_notifications "https://github.com/itssaksham00/herenow/blob/main/apps/api/src/notifications/notifications.controller.ts"
click node_dbclient "https://github.com/itssaksham00/herenow/blob/main/apps/api/src/common/supabase.service.ts"
click node_dtos "https://github.com/itssaksham00/herenow/blob/main/apps/api/src/common/dtos.ts"
click node_database "https://github.com/itssaksham00/herenow/blob/main/supabase/001_init.sql"
click node_postingmigration "https://github.com/itssaksham00/herenow/blob/main/supabase/002_activity_posting.sql"

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_authscreen,node_location,node_search,node_feed,node_map,node_create,node_detail,node_activity,node_profile,node_apihelper,node_mobileauth,node_person toneBlue
class node_api,node_authguard,node_posts,node_users,node_comments,node_interests,node_notifications toneAmber
class node_dbclient,node_dtos toneMint
class node_supabaseauth,node_database,node_postingmigration toneRose
class node_openai toneIndigo
```

## Components

### Mobile experience

- [Navigation and session](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/App.tsx): `apps/mobile/App.tsx`
- [Sign in](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/AuthScreen.tsx): `apps/mobile/src/screens/AuthScreen.tsx`
- [Choose area](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/LocationScreen.tsx): `apps/mobile/src/screens/LocationScreen.tsx`
- [Place search](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/components/LocationSearch.tsx): `apps/mobile/src/components/LocationSearch.tsx`
- [Nearby feed](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/FeedScreen.tsx): `apps/mobile/src/screens/FeedScreen.tsx`
- [Activity map](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/MapScreen.tsx): `apps/mobile/src/screens/MapScreen.tsx`
- [Create activity](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/CreatePostScreen.tsx): `apps/mobile/src/screens/CreatePostScreen.tsx`
- [Activity details](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/PostDetailScreen.tsx): `apps/mobile/src/screens/PostDetailScreen.tsx`
- [Activity inbox](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/ActivityScreen.tsx): `apps/mobile/src/screens/ActivityScreen.tsx`
- [Profile management](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/screens/ProfileScreen.tsx): `apps/mobile/src/screens/ProfileScreen.tsx`
- [Authenticated API client](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/lib/api.ts): `apps/mobile/src/lib/api.ts`
- [Supabase client](https://github.com/itssaksham00/herenow/blob/main/apps/mobile/src/lib/supabase.ts): `apps/mobile/src/lib/supabase.ts`

### API domain

- [REST API](https://github.com/itssaksham00/herenow/blob/main/apps/api/src/main.ts): `apps/api/src/main.ts`
- [Token verification](https://github.com/itssaksham00/herenow/blob/main/apps/api/src/auth/auth.guard.ts): `apps/api/src/auth/auth.guard.ts`
- [Posts and AI](https://github.com/itssaksham00/herenow/blob/main/apps/api/src/posts/posts.service.ts): `apps/api/src/posts/posts.service.ts`
- [User profiles](https://github.com/itssaksham00/herenow/blob/main/apps/api/src/users/users.controller.ts): `apps/api/src/users/users.controller.ts`
- [Comments](https://github.com/itssaksham00/herenow/blob/main/apps/api/src/comments/comments.controller.ts): `apps/api/src/comments/comments.controller.ts`
- [Interest action](https://github.com/itssaksham00/herenow/blob/main/apps/api/src/interests/interests.controller.ts): `apps/api/src/interests/interests.controller.ts`
- [Notifications](https://github.com/itssaksham00/herenow/blob/main/apps/api/src/notifications/notifications.controller.ts): `apps/api/src/notifications/notifications.controller.ts`

### Backend services

- [Server data client](https://github.com/itssaksham00/herenow/blob/main/apps/api/src/common/supabase.service.ts): `apps/api/src/common/supabase.service.ts`
- [Request validation](https://github.com/itssaksham00/herenow/blob/main/apps/api/src/common/dtos.ts): `apps/api/src/common/dtos.ts`

### Supabase data

- **Supabase Auth**
- [PostgreSQL and storage](https://github.com/itssaksham00/herenow/blob/main/supabase/001_init.sql): `supabase/001_init.sql`
- [Activity feed rules](https://github.com/itssaksham00/herenow/blob/main/supabase/002_activity_posting.sql): `supabase/002_activity_posting.sql`

### Other components

- **App user**
- **OpenAI vision**

## Connections

- App user → Navigation and session: uses (evidence: `README.md`)
- Navigation and session → Supabase client: checks session (evidence: `apps/mobile/App.tsx`)
- Navigation and session → Sign in: shows signed out (evidence: `apps/mobile/App.tsx`)
- Navigation and session → Choose area: selects area (evidence: `apps/mobile/App.tsx`)
- Navigation and session → Nearby feed: opens feed (evidence: `apps/mobile/App.tsx`)
- Navigation and session → Activity map: opens map (evidence: `apps/mobile/App.tsx`)
- Navigation and session → Activity details: opens activity (evidence: `apps/mobile/App.tsx`)
- Navigation and session → Create activity: opens composer (evidence: `apps/mobile/App.tsx`)
- Navigation and session → Activity inbox: opens inbox (evidence: `apps/mobile/App.tsx`)
- Navigation and session → Profile management: opens profile (evidence: `apps/mobile/App.tsx`)
- Choose area → Place search: offers search (evidence: `apps/mobile/src/components/LocationSearch.tsx`)
- Nearby feed → Authenticated API client: requests feed (evidence: `README.md`)
- Activity map → Authenticated API client: requests markers (evidence: `README.md`)
- Create activity → Authenticated API client: publishes activity (evidence: `README.md`)
- Activity details → Authenticated API client: loads and participates (evidence: `README.md`)
- Activity inbox → Authenticated API client: loads inbox (evidence: `README.md`)
- Profile management → Authenticated API client: updates profile (evidence: `README.md`)
- Authenticated API client → Supabase client: gets access token (evidence: `apps/mobile/src/lib/api.ts`)
- Authenticated API client → REST API: sends REST requests (evidence: `README.md`)
- REST API → Token verification: guards routes
- REST API → Posts and AI: routes post actions
- Posts and AI → Server data client: reads and writes (evidence: `apps/api/src/posts/posts.service.ts`)
- Posts and AI → Request validation: uses validated inputs (evidence: `apps/api/src/posts/posts.service.ts`)
- User profiles → Server data client: reads and writes (evidence: `apps/api/src/users/users.controller.ts`)
- Comments → Server data client: reads and writes (evidence: `apps/api/src/comments/comments.controller.ts`)
- Comments → Request validation: validates comments (evidence: `apps/api/src/comments/comments.controller.ts`)
- Interest action → Server data client: records interest (evidence: `apps/api/src/interests/interests.controller.ts`)
- Notifications → Server data client: reads and updates (evidence: `apps/api/src/notifications/notifications.controller.ts`)
- Token verification → Server data client: verifies token (evidence: `apps/api/src/auth/auth.guard.ts`)
- Server data client → Supabase Auth: verifies identity
- Server data client → PostgreSQL and storage: queries and stores (evidence: `README.md`)
- PostgreSQL and storage → Activity feed rules: extends feed behavior (evidence: `README.md`)
- Posts and AI → OpenAI vision: requests suggestions (evidence: `README.md`)
- PostgreSQL and storage → OpenAI vision: stores photos privately
