# momaksoud/all-verse-lowk architecture

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

- Interactive diagram: https://gitdiagram.com/momaksoud/all-verse-lowk
- Repository: https://github.com/momaksoud/all-verse-lowk

## Overview

All Verse GPT is a cross-platform AI-assisted marketplace. Buyers discover internal listings alongside external products, then can favorite, message sellers, and purchase; sellers create listings and use AI assistance. The graph preserves these documented capabilities and the sampled search orchestration. Source excerpts establish mobile search requests and search-pipeline calls; broader feature-to-service links are documented only at product level, so they are shown as dashed where implementation wiring was not sampled.

Main entry points: [`apps/web/src/lib/search/pipeline/runPipeline.ts`](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/search/pipeline/runPipeline.ts) (Search orchestration), [`apps/mobile/app/(tabs)/search.tsx`](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/mobile/app/(tabs)/search.tsx) (Mobile app), [`apps/web/src/app/sell/page.tsx`](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/sell/page.tsx) (Listing creation), [`apps/web/src/app/api/payments/create-checkout-session/route.ts`](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/api/payments/create-checkout-session/route.ts) (Checkout and orders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Marketplace clients"]
  node_mobile["Mobile app<br/>[search.tsx]"]
  node_web["Web marketplace<br/>[page.tsx]"]
  node_mobile_search["Mobile listing search<br/>[search.tsx]"]
  node_listing_pages["Listing experience<br/>[page.tsx]"]
  node_listing_create["Listing creation<br/>[page.tsx]"]
end

subgraph group_commerce["Marketplace services"]
  node_listing_api["Listings API<br/>[route.ts]"]
  node_chat_api["Messaging API<br/>[route.ts]"]
  node_checkout["Checkout and orders<br/>[route.ts]"]
  node_stripe["Stripe payments<br/>[stripe.ts]"]
end

subgraph group_intelligence["AI and discovery"]
  node_search_route["Universal search API<br/>[route.ts]"]
  node_search_pipeline["Search orchestration<br/>[runPipeline.ts]"]
  node_internal_search["Internal listings search"]
  node_amazon_search["Amazon product feed<br/>[amazonAffiliate.ts]"]
  node_organic_search["Organic product search<br/>[serpapiOrgnaic.ts]"]
  node_query_refine["Query refinement<br/>[refinements.ts]"]
  node_ai_assistant["AI assistant<br/>[route.ts]"]
end

subgraph group_platform["Identity and media"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_firebase[("Firebase services<br/>[firebase-admin.ts]")]
  node_media["Photo storage<br/>[storage.ts]"]
end

node_buyers(("Buyers and sellers"))

node_buyers -->|"uses"| node_mobile
node_buyers -->|"uses"| node_web
node_mobile -->|"searches listings"| node_mobile_search
node_mobile_search -->|"requests listings"| node_listing_api
node_buyers -->|"searches marketplace"| node_search_route
node_search_route -.->|"dispatches search"| node_search_pipeline
node_search_pipeline -->|"queries listings"| node_internal_search
node_search_pipeline -->|"fetches products"| node_amazon_search
node_search_pipeline -->|"fetches products"| node_organic_search
node_search_pipeline -->|"refines query"| node_query_refine
node_buyers -->|"browses listings"| node_listing_pages
node_buyers -->|"creates listings"| node_listing_create
node_buyers -->|"messages sellers"| node_chat_api
node_buyers -->|"purchases listings"| node_checkout
node_checkout -.->|"creates payment"| node_stripe
node_buyers -->|"gets AI assistance"| node_ai_assistant
node_mobile -->|"authenticates users"| node_auth
node_auth -->|"checks profiles"| node_firebase
node_listing_create -.->|"uploads photos"| node_media
node_buyers -->|"sees external results"| node_amazon_search

click node_mobile "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/mobile/app/(tabs)/search.tsx"
click node_web "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/page.tsx"
click node_mobile_search "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/mobile/app/(tabs)/search.tsx"
click node_listing_api "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/api/listings/route.ts"
click node_listing_pages "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/listing/%5BlistingId%5D/page.tsx"
click node_listing_create "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/sell/page.tsx"
click node_chat_api "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/api/chats/%5BchatId%5D/messages/route.ts"
click node_checkout "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/api/payments/create-checkout-session/route.ts"
click node_stripe "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/stripe.ts"
click node_search_route "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/api/universal-search/route.ts"
click node_search_pipeline "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/search/pipeline/runPipeline.ts"
click node_internal_search "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/search/internal/simpleInternalSearch.ts"
click node_amazon_search "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/search/external/amazonAffiliate.ts"
click node_organic_search "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/search/external/serpapiOrgnaic.ts"
click node_query_refine "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/search/pipeline/refinements.ts"
click node_ai_assistant "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/api/ai/chat/route.ts"
click node_auth "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/mobile/lib/firebase/auth.ts"
click node_firebase "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/firebase-admin.ts"
click node_media "https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/storage.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_mobile,node_web,node_mobile_search,node_listing_pages,node_listing_create toneBlue
class node_listing_api,node_chat_api,node_checkout,node_stripe toneAmber
class node_search_route,node_search_pipeline,node_internal_search,node_amazon_search,node_organic_search,node_query_refine,node_ai_assistant toneMint
class node_auth,node_firebase,node_media toneRose
class node_buyers toneIndigo
```

## Components

### Marketplace clients

- [Mobile app](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/mobile/app/(tabs)/search.tsx): `apps/mobile/app/(tabs)/search.tsx`
- [Web marketplace](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/page.tsx): `apps/web/src/app/page.tsx`
- [Mobile listing search](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/mobile/app/(tabs)/search.tsx): `apps/mobile/app/(tabs)/search.tsx`
- [Listing experience](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/listing/%5BlistingId%5D/page.tsx): `apps/web/src/app/listing/[listingId]/page.tsx`
- [Listing creation](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/sell/page.tsx): `apps/web/src/app/sell/page.tsx`

### Marketplace services

- [Listings API](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/api/listings/route.ts): `apps/web/src/app/api/listings/route.ts`
- [Messaging API](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/api/chats/%5BchatId%5D/messages/route.ts): `apps/web/src/app/api/chats/[chatId]/messages/route.ts`
- [Checkout and orders](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/api/payments/create-checkout-session/route.ts): `apps/web/src/app/api/payments/create-checkout-session/route.ts`
- [Stripe payments](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/stripe.ts): `apps/web/src/lib/stripe.ts`

### AI and discovery

- [Universal search API](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/api/universal-search/route.ts): `apps/web/src/app/api/universal-search/route.ts`
- [Search orchestration](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/search/pipeline/runPipeline.ts): `apps/web/src/lib/search/pipeline/runPipeline.ts`
- [Internal listings search](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/search/internal/simpleInternalSearch.ts): `apps/web/src/lib/search/internal/simpleInternalSearch.ts`
- [Amazon product feed](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/search/external/amazonAffiliate.ts): `apps/web/src/lib/search/external/amazonAffiliate.ts`
- [Organic product search](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/search/external/serpapiOrgnaic.ts): `apps/web/src/lib/search/external/serpapiOrgnaic.ts`
- [Query refinement](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/search/pipeline/refinements.ts): `apps/web/src/lib/search/pipeline/refinements.ts`
- [AI assistant](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/app/api/ai/chat/route.ts): `apps/web/src/app/api/ai/chat/route.ts`

### Identity and media

- [Authentication](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/mobile/lib/firebase/auth.ts): `apps/mobile/lib/firebase/auth.ts`
- [Firebase services](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/firebase-admin.ts): `apps/web/src/lib/firebase-admin.ts`
- [Photo storage](https://github.com/momaksoud/all-verse-lowk/blob/main/apps/web/src/lib/storage.ts): `apps/web/src/lib/storage.ts`

### Other components

- **Buyers and sellers**

## Connections

- Buyers and sellers → Mobile app: uses (evidence: `README.md`)
- Buyers and sellers → Web marketplace: uses (evidence: `README.md`)
- Mobile app → Mobile listing search: searches listings (evidence: `apps/mobile/app/(tabs)/search.tsx`)
- Mobile listing search → Listings API: requests listings (evidence: `apps/mobile/app/(tabs)/search.tsx`)
- Buyers and sellers → Universal search API: searches marketplace (evidence: `README.md`)
- Universal search API → Search orchestration: dispatches search
- Search orchestration → Internal listings search: queries listings (evidence: `apps/web/src/lib/search/pipeline/runPipeline.ts`)
- Search orchestration → Amazon product feed: fetches products (evidence: `apps/web/src/lib/search/pipeline/runPipeline.ts`)
- Search orchestration → Organic product search: fetches products (evidence: `apps/web/src/lib/search/pipeline/runPipeline.ts`)
- Search orchestration → Query refinement: refines query (evidence: `apps/web/src/lib/search/pipeline/runPipeline.ts`)
- Buyers and sellers → Listing experience: browses listings (evidence: `README.md`)
- Buyers and sellers → Listing creation: creates listings (evidence: `README.md`)
- Buyers and sellers → Messaging API: messages sellers (evidence: `README.md`)
- Buyers and sellers → Checkout and orders: purchases listings (evidence: `README.md`)
- Checkout and orders → Stripe payments: creates payment
- Buyers and sellers → AI assistant: gets AI assistance (evidence: `README.md`)
- Mobile app → Authentication: authenticates users
- Authentication → Firebase services: checks profiles
- Listing creation → Photo storage: uploads photos
- Buyers and sellers → Amazon product feed: sees external results (evidence: `README.md`)
