# kush788/onefimarketplace architecture

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

- Interactive diagram: https://gitdiagram.com/kush788/onefimarketplace
- Repository: https://github.com/kush788/onefimarketplace

## Overview

1Fi Marketplace is a React Native shopping flow: users discover and filter products, inspect variants and 0% EMI plans, review an order, then reach a success state. App.tsx owns screen registration; MarketplaceScreen owns catalogue loading and discovery, while product and order screens handle the later stages. Data is currently supplied through a mock-backed API abstraction. The README also describes loading and empty-search states. Edges reflect explicit imports, API use, and route registration; checkout is simulated, with no payment or lender service shown.

Main entry points: [`src/screens/MarketplaceScreen.tsx`](https://github.com/kush788/onefimarketplace/blob/main/src/screens/MarketplaceScreen.tsx) (Marketplace home), [`App.tsx`](https://github.com/kush788/onefimarketplace/blob/main/App.tsx) (Navigation app), [`src/theme/theme.ts`](https://github.com/kush788/onefimarketplace/blob/main/src/theme/theme.ts) (Design theme), [`src/screens/ProductDetailsScreen.tsx`](https://github.com/kush788/onefimarketplace/blob/main/src/screens/ProductDetailsScreen.tsx) (Product details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Product discovery"]
  node_marketplace["Marketplace home"]
  node_search["Product search<br/>[SearchBar.tsx]"]
  node_category["Category filter<br/>[CategoryCard.tsx]"]
  node_productcard["Product cards<br/>[ProductCard.tsx]"]
end

subgraph group_purchase["Purchase flow"]
  node_app["Navigation app<br/>[App.tsx]"]
  node_details["Product details"]
  node_confirmation["Order summary"]
  node_success["Order success"]
end

subgraph group_data["Catalogue data"]
  node_api["Marketplace API<br/>[marketplaceApi.ts]"]
  node_mockdata["Mock catalogue<br/>[mockData.ts]"]
end

subgraph group_shared["Shared foundations"]
  node_types["Marketplace types<br/>[marketplace.ts]"]
  node_routes["Route parameters<br/>[types.ts]"]
  node_theme["Design theme<br/>[theme.ts]"]
end

node_shopper(("Shopper"))

node_shopper -->|"opens app"| node_app
node_app -->|"starts at"| node_marketplace
node_app -->|"registers route"| node_details
node_app -->|"registers route"| node_confirmation
node_app -->|"registers route"| node_success
node_shopper -->|"browses"| node_marketplace
node_marketplace -->|"loads catalogue"| node_api
node_api -->|"reads products"| node_mockdata
node_api -->|"reads categories"| node_mockdata
node_marketplace -->|"renders"| node_search
node_marketplace -->|"renders"| node_category
node_marketplace -->|"renders"| node_productcard
node_marketplace -.->|"opens product"| node_details
node_details -.->|"continues purchase"| node_confirmation
node_confirmation -.->|"finishes checkout"| node_success
node_details -.->|"loads selected product"| node_mockdata
node_search -->|"uses styling"| node_theme
node_category -->|"uses styling"| node_theme
node_productcard -->|"uses styling"| node_theme
node_marketplace -->|"uses styling"| node_theme
node_details -->|"uses styling"| node_theme
node_confirmation -->|"uses styling"| node_theme
node_success -->|"uses styling"| node_theme
node_app -->|"types navigation"| node_routes
node_marketplace -->|"uses route types"| node_routes
node_details -->|"uses route types"| node_routes
node_confirmation -->|"uses route types"| node_routes
node_success -->|"uses route types"| node_routes
node_api -->|"types catalogue"| node_types
node_mockdata -->|"types catalogue"| node_types
node_category -->|"types category"| node_types
node_productcard -->|"types product"| node_types
node_marketplace -->|"uses product types"| node_types
node_routes -->|"defines route data"| node_types

click node_app "https://github.com/kush788/onefimarketplace/blob/main/App.tsx"
click node_marketplace "https://github.com/kush788/onefimarketplace/blob/main/src/screens/MarketplaceScreen.tsx"
click node_search "https://github.com/kush788/onefimarketplace/blob/main/src/components/SearchBar.tsx"
click node_category "https://github.com/kush788/onefimarketplace/blob/main/src/components/CategoryCard.tsx"
click node_productcard "https://github.com/kush788/onefimarketplace/blob/main/src/components/ProductCard.tsx"
click node_details "https://github.com/kush788/onefimarketplace/blob/main/src/screens/ProductDetailsScreen.tsx"
click node_confirmation "https://github.com/kush788/onefimarketplace/blob/main/src/screens/OrderConfirmationScreen.tsx"
click node_success "https://github.com/kush788/onefimarketplace/blob/main/src/screens/OrderSuccessScreen.tsx"
click node_api "https://github.com/kush788/onefimarketplace/blob/main/src/api/marketplaceApi.ts"
click node_mockdata "https://github.com/kush788/onefimarketplace/blob/main/src/data/mockData.ts"
click node_types "https://github.com/kush788/onefimarketplace/blob/main/src/types/marketplace.ts"
click node_routes "https://github.com/kush788/onefimarketplace/blob/main/src/navigation/types.ts"
click node_theme "https://github.com/kush788/onefimarketplace/blob/main/src/theme/theme.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_marketplace,node_search,node_category,node_productcard toneBlue
class node_app,node_details,node_confirmation,node_success toneAmber
class node_api,node_mockdata toneMint
class node_types,node_routes,node_theme toneRose
class node_shopper toneIndigo
```

## Components

### Product discovery

- [Marketplace home](https://github.com/kush788/onefimarketplace/blob/main/src/screens/MarketplaceScreen.tsx): `src/screens/MarketplaceScreen.tsx`
- [Product search](https://github.com/kush788/onefimarketplace/blob/main/src/components/SearchBar.tsx): `src/components/SearchBar.tsx`
- [Category filter](https://github.com/kush788/onefimarketplace/blob/main/src/components/CategoryCard.tsx): `src/components/CategoryCard.tsx`
- [Product cards](https://github.com/kush788/onefimarketplace/blob/main/src/components/ProductCard.tsx): `src/components/ProductCard.tsx`

### Purchase flow

- [Navigation app](https://github.com/kush788/onefimarketplace/blob/main/App.tsx): `App.tsx`
- [Product details](https://github.com/kush788/onefimarketplace/blob/main/src/screens/ProductDetailsScreen.tsx): `src/screens/ProductDetailsScreen.tsx`
- [Order summary](https://github.com/kush788/onefimarketplace/blob/main/src/screens/OrderConfirmationScreen.tsx): `src/screens/OrderConfirmationScreen.tsx`
- [Order success](https://github.com/kush788/onefimarketplace/blob/main/src/screens/OrderSuccessScreen.tsx): `src/screens/OrderSuccessScreen.tsx`

### Catalogue data

- [Marketplace API](https://github.com/kush788/onefimarketplace/blob/main/src/api/marketplaceApi.ts): `src/api/marketplaceApi.ts`
- [Mock catalogue](https://github.com/kush788/onefimarketplace/blob/main/src/data/mockData.ts): `src/data/mockData.ts`

### Shared foundations

- [Marketplace types](https://github.com/kush788/onefimarketplace/blob/main/src/types/marketplace.ts): `src/types/marketplace.ts`
- [Route parameters](https://github.com/kush788/onefimarketplace/blob/main/src/navigation/types.ts): `src/navigation/types.ts`
- [Design theme](https://github.com/kush788/onefimarketplace/blob/main/src/theme/theme.ts): `src/theme/theme.ts`

### Other components

- **Shopper**

## Connections

- Shopper → Navigation app: opens app (evidence: `README.md`)
- Navigation app → Marketplace home: starts at (evidence: `App.tsx`)
- Navigation app → Product details: registers route (evidence: `App.tsx`)
- Navigation app → Order summary: registers route (evidence: `App.tsx`)
- Navigation app → Order success: registers route (evidence: `App.tsx`)
- Shopper → Marketplace home: browses (evidence: `README.md`)
- Marketplace home → Marketplace API: loads catalogue (evidence: `src/screens/MarketplaceScreen.tsx`)
- Marketplace API → Mock catalogue: reads products (evidence: `src/api/marketplaceApi.ts`)
- Marketplace API → Mock catalogue: reads categories (evidence: `src/api/marketplaceApi.ts`)
- Marketplace home → Product search: renders (evidence: `src/screens/MarketplaceScreen.tsx`)
- Marketplace home → Category filter: renders (evidence: `src/screens/MarketplaceScreen.tsx`)
- Marketplace home → Product cards: renders (evidence: `src/screens/MarketplaceScreen.tsx`)
- Marketplace home → Product details: opens product
- Product details → Order summary: continues purchase
- Order summary → Order success: finishes checkout
- Product details → Mock catalogue: loads selected product
- Product search → Design theme: uses styling (evidence: `src/components/SearchBar.tsx`)
- Category filter → Design theme: uses styling (evidence: `src/components/CategoryCard.tsx`)
- Product cards → Design theme: uses styling (evidence: `src/components/ProductCard.tsx`)
- Marketplace home → Design theme: uses styling (evidence: `src/screens/MarketplaceScreen.tsx`)
- Product details → Design theme: uses styling (evidence: `src/screens/ProductDetailsScreen.tsx`)
- Order summary → Design theme: uses styling (evidence: `src/screens/OrderConfirmationScreen.tsx`)
- Order success → Design theme: uses styling (evidence: `src/screens/OrderSuccessScreen.tsx`)
- Navigation app → Route parameters: types navigation (evidence: `App.tsx`)
- Marketplace home → Route parameters: uses route types (evidence: `src/screens/MarketplaceScreen.tsx`)
- Product details → Route parameters: uses route types (evidence: `src/navigation/types.ts`)
- Order summary → Route parameters: uses route types (evidence: `src/navigation/types.ts`)
- Order success → Route parameters: uses route types (evidence: `src/navigation/types.ts`)
- Marketplace API → Marketplace types: types catalogue (evidence: `src/api/marketplaceApi.ts`)
- Mock catalogue → Marketplace types: types catalogue (evidence: `src/data/mockData.ts`)
- Category filter → Marketplace types: types category (evidence: `src/components/CategoryCard.tsx`)
- Product cards → Marketplace types: types product (evidence: `src/components/ProductCard.tsx`)
- Marketplace home → Marketplace types: uses product types (evidence: `src/screens/MarketplaceScreen.tsx`)
- Route parameters → Marketplace types: defines route data (evidence: `src/navigation/types.ts`)
