# redward42/liftoffapp architecture

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

- Interactive diagram: https://gitdiagram.com/redward42/liftoffapp
- Repository: https://github.com/redward42/liftoffapp

## Overview

LiftOff is a gym-focused social posting app. Visitors search and browse a feed, sort posts by recency or popularity, open a post to view its details and comments, and can create, edit, or delete posts. The React app routes these screens and uses Supabase for post and comment data. The README documents these capabilities; source excerpts show the main screens and their database operations, but do not establish the underlying schema or deployment details.

Main entry points: [`src/App.tsx`](https://github.com/RedWARd42/LiftOffApp/blob/main/src/App.tsx) (App routes), [`src/pages/Details.tsx`](https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Details.tsx) (Post details), [`src/pages/Home.tsx`](https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Home.tsx) (Home feed), [`src/pages/Create.tsx`](https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Create.tsx) (Create post)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_runtime["React entry<br/>[main.tsx]"]
  node_routes["App routes<br/>[App.tsx]"]
  node_navbar["Search navigation<br/>[Navbar.tsx]"]
end

subgraph group_posts["Post workflows"]
  node_home["Home feed<br/>[Home.tsx]"]
  node_postcard["Post card<br/>[Post.tsx]"]
  node_create["Create post<br/>[Create.tsx]"]
  node_details["Post details<br/>[Details.tsx]"]
  node_comments["Post comments<br/>[Details.tsx]"]
  node_edit["Edit and delete<br/>[Edit.tsx]"]
end

subgraph group_data["Data access"]
  node_posttype["Post data type<br/>[PostI.ts]"]
  node_supabase["Supabase client<br/>[supabase-client.ts]"]
  node_postsdb[("Posts store")]
  node_commentsdb[("Comments store")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens app"| node_runtime
node_runtime -->|"renders"| node_routes
node_routes -->|"renders"| node_navbar
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_create
node_routes -->|"routes to"| node_details
node_routes -->|"routes to"| node_edit
node_visitor -->|"searches"| node_navbar
node_navbar -->|"sets search"| node_routes
node_routes -->|"passes search"| node_home
node_home -->|"renders"| node_postcard
node_home -->|"queries and sorts"| node_postsdb
node_create -->|"reads and inserts"| node_postsdb
node_details -->|"reads and updates likes"| node_postsdb
node_details -->|"renders"| node_comments
node_details -->|"reads and inserts"| node_commentsdb
node_edit -->|"reads, updates, deletes"| node_postsdb
node_home -->|"uses client"| node_supabase
node_create -->|"uses client"| node_supabase
node_details -->|"uses client"| node_supabase
node_edit -->|"uses client"| node_supabase
node_create -->|"types records"| node_posttype
node_home -->|"types records"| node_posttype
node_details -->|"types records"| node_posttype
node_edit -->|"types records"| node_posttype

click node_runtime "https://github.com/RedWARd42/LiftOffApp/blob/main/src/main.tsx"
click node_routes "https://github.com/RedWARd42/LiftOffApp/blob/main/src/App.tsx"
click node_navbar "https://github.com/RedWARd42/LiftOffApp/blob/main/src/components/Navbar.tsx"
click node_home "https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Home.tsx"
click node_postcard "https://github.com/RedWARd42/LiftOffApp/blob/main/src/components/Post.tsx"
click node_create "https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Create.tsx"
click node_details "https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Details.tsx"
click node_comments "https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Details.tsx"
click node_edit "https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Edit.tsx"
click node_posttype "https://github.com/RedWARd42/LiftOffApp/blob/main/src/types/PostI.ts"
click node_supabase "https://github.com/RedWARd42/LiftOffApp/blob/main/src/supabase-client.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_runtime,node_routes,node_navbar toneBlue
class node_home,node_postcard,node_create,node_details,node_comments,node_edit toneAmber
class node_posttype,node_supabase,node_postsdb,node_commentsdb toneMint
class node_visitor toneIndigo
```

## Components

### App and navigation

- [React entry](https://github.com/RedWARd42/LiftOffApp/blob/main/src/main.tsx): `src/main.tsx`
- [App routes](https://github.com/RedWARd42/LiftOffApp/blob/main/src/App.tsx): `src/App.tsx`
- [Search navigation](https://github.com/RedWARd42/LiftOffApp/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`

### Post workflows

- [Home feed](https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Post card](https://github.com/RedWARd42/LiftOffApp/blob/main/src/components/Post.tsx): `src/components/Post.tsx`
- [Create post](https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Create.tsx): `src/pages/Create.tsx`
- [Post details](https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Details.tsx): `src/pages/Details.tsx`
- [Post comments](https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Details.tsx): `src/pages/Details.tsx`
- [Edit and delete](https://github.com/RedWARd42/LiftOffApp/blob/main/src/pages/Edit.tsx): `src/pages/Edit.tsx`

### Data access

- [Post data type](https://github.com/RedWARd42/LiftOffApp/blob/main/src/types/PostI.ts): `src/types/PostI.ts`
- [Supabase client](https://github.com/RedWARd42/LiftOffApp/blob/main/src/supabase-client.ts): `src/supabase-client.ts`
- **Posts store**
- **Comments store**

### Other components

- **Visitor**

## Connections

- Visitor → React entry: opens app
- React entry → App routes: renders (evidence: `src/main.tsx`)
- App routes → Search navigation: renders (evidence: `src/App.tsx`)
- App routes → Home feed: routes to (evidence: `src/App.tsx`)
- App routes → Create post: routes to (evidence: `src/App.tsx`)
- App routes → Post details: routes to (evidence: `src/App.tsx`)
- App routes → Edit and delete: routes to (evidence: `src/App.tsx`)
- Visitor → Search navigation: searches
- Search navigation → App routes: sets search (evidence: `src/App.tsx`)
- App routes → Home feed: passes search (evidence: `src/App.tsx`)
- Home feed → Post card: renders (evidence: `src/pages/Home.tsx`)
- Home feed → Posts store: queries and sorts (evidence: `src/pages/Home.tsx`)
- Create post → Posts store: reads and inserts (evidence: `src/pages/Create.tsx`)
- Post details → Posts store: reads and updates likes (evidence: `src/pages/Details.tsx`)
- Post details → Post comments: renders (evidence: `src/pages/Details.tsx`)
- Post details → Comments store: reads and inserts (evidence: `src/pages/Details.tsx`)
- Edit and delete → Posts store: reads, updates, deletes (evidence: `src/pages/Edit.tsx`)
- Home feed → Supabase client: uses client (evidence: `src/pages/Home.tsx`)
- Create post → Supabase client: uses client (evidence: `src/pages/Create.tsx`)
- Post details → Supabase client: uses client (evidence: `src/pages/Details.tsx`)
- Edit and delete → Supabase client: uses client (evidence: `src/pages/Edit.tsx`)
- Create post → Post data type: types records (evidence: `src/pages/Create.tsx`)
- Home feed → Post data type: types records (evidence: `src/pages/Home.tsx`)
- Post details → Post data type: types records (evidence: `src/pages/Details.tsx`)
- Edit and delete → Post data type: types records (evidence: `src/pages/Edit.tsx`)
