# zyronce-ai/tools architecture

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

- Interactive diagram: https://gitdiagram.com/zyronce-ai/tools
- Repository: https://github.com/zyronce-ai/tools

## Overview

NayraTools is a React-based AI toolkit for ecommerce sellers. Users discover tools on the public landing page, enter protected tool pages, submit product or seller content, and receive generated or analyzed results; the sampled review detector demonstrates the streaming request path. The app also provides authentication, pricing, and blog content. The graph preserves the README’s wider tool capabilities, but many tool-page and function implementations were not sampled, so their internal connections are not asserted.

Main entry points: [`src/App.tsx`](https://github.com/zyronce-ai/tools/blob/master/src/App.tsx) (Routes and app shell), [`src/lib/ai-stream.ts`](https://github.com/zyronce-ai/tools/blob/master/src/lib/ai-stream.ts) (Edge stream client), [`src/pages/LandingPage.tsx`](https://github.com/zyronce-ai/tools/blob/master/src/pages/LandingPage.tsx) (Tool discovery), [`src/pages/FakeReviewDetector.tsx`](https://github.com/zyronce-ai/tools/blob/master/src/pages/FakeReviewDetector.tsx) (Review detector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_app["Routes and app shell<br/>[App.tsx]"]
  node_landing["Tool discovery<br/>[LandingPage.tsx]"]
  node_dashboard["Dashboard layout"]
end

subgraph group_tools["Seller tools"]
  node_review["Review detector"]
  node_listing["Listing generation"]
  node_image["Image utilities"]
  node_sellerops["Seller operations"]
  node_market["Market intelligence"]
end

subgraph group_services["AI services"]
  node_ai_stream["Edge stream client<br/>[ai-stream.ts]"]
  node_review_fn["Review analysis function<br/>[index.ts]"]
  node_amazon_fn["Listing generation function<br/>[index.ts]"]
  node_ai_call["Shared AI caller<br/>[ai-call.ts]"]
  node_supabase{{"Supabase Functions"}}
end

subgraph group_account["Accounts and plans"]
  node_auth["Auth context<br/>[useAuth.tsx]"]
  node_firebase{{"Firebase Auth<br/>[firebase.ts]"}}
  node_pricing["Pricing pages and plans<br/>[PricingSection.tsx]"]
end

subgraph group_content["Editorial content"]
  node_blog["Blog listing<br/>[Blog.tsx]"]
  node_post["Blog article<br/>[BlogPost.tsx]"]
end

node_seller(("Seller"))
node_model{{"AI model service"}}

node_seller -->|"opens"| node_app
node_app -->|"routes to"| node_landing
node_landing -->|"links tools"| node_app
node_app -->|"wraps protected tools"| node_dashboard
node_app -->|"routes to"| node_review
node_review -->|"streams request"| node_ai_stream
node_ai_stream -->|"POSTs function request"| node_supabase
node_ai_stream -->|"names function"| node_review_fn
node_review_fn -.->|"analyzes reviews"| node_model
node_app -->|"routes to"| node_listing
node_listing -.->|"requests generation"| node_amazon_fn
node_amazon_fn -->|"uses shared AI caller"| node_ai_call
node_ai_call -.->|"calls model"| node_model
node_app -.->|"routes to tools"| node_image
node_app -.->|"routes to tools"| node_sellerops
node_app -.->|"routes to tools"| node_market
node_app -->|"provides auth"| node_auth
node_auth -->|"observes auth"| node_firebase
node_app -.->|"routes pricing"| node_pricing
node_app -->|"routes to"| node_blog
node_blog -->|"links articles"| node_post

click node_app "https://github.com/zyronce-ai/tools/blob/master/src/App.tsx"
click node_landing "https://github.com/zyronce-ai/tools/blob/master/src/pages/LandingPage.tsx"
click node_dashboard "https://github.com/zyronce-ai/tools/blob/master/src/components/DashboardLayout.tsx"
click node_review "https://github.com/zyronce-ai/tools/blob/master/src/pages/FakeReviewDetector.tsx"
click node_listing "https://github.com/zyronce-ai/tools/blob/master/src/pages/AmazonListingGenerator.tsx"
click node_image "https://github.com/zyronce-ai/tools/tree/master/src/pages"
click node_sellerops "https://github.com/zyronce-ai/tools/tree/master/src/pages"
click node_market "https://github.com/zyronce-ai/tools/tree/master/src/pages"
click node_ai_stream "https://github.com/zyronce-ai/tools/blob/master/src/lib/ai-stream.ts"
click node_review_fn "https://github.com/zyronce-ai/tools/blob/master/supabase/functions/fake-review-detector/index.ts"
click node_amazon_fn "https://github.com/zyronce-ai/tools/blob/master/supabase/functions/generate-amazon-listing/index.ts"
click node_ai_call "https://github.com/zyronce-ai/tools/blob/master/supabase/functions/_shared/ai-call.ts"
click node_auth "https://github.com/zyronce-ai/tools/blob/master/src/hooks/useAuth.tsx"
click node_firebase "https://github.com/zyronce-ai/tools/blob/master/src/lib/firebase.ts"
click node_pricing "https://github.com/zyronce-ai/tools/blob/master/src/components/PricingSection.tsx"
click node_blog "https://github.com/zyronce-ai/tools/blob/master/src/pages/Blog.tsx"
click node_post "https://github.com/zyronce-ai/tools/blob/master/src/pages/BlogPost.tsx"

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_landing,node_dashboard toneBlue
class node_review,node_listing,node_image,node_sellerops,node_market toneAmber
class node_ai_stream,node_review_fn,node_amazon_fn,node_ai_call,node_supabase toneMint
class node_auth,node_firebase,node_pricing toneRose
class node_blog,node_post,node_seller,node_model toneIndigo
```

## Components

### Web experience

- [Routes and app shell](https://github.com/zyronce-ai/tools/blob/master/src/App.tsx): `src/App.tsx`
- [Tool discovery](https://github.com/zyronce-ai/tools/blob/master/src/pages/LandingPage.tsx): `src/pages/LandingPage.tsx`
- [Dashboard layout](https://github.com/zyronce-ai/tools/blob/master/src/components/DashboardLayout.tsx): `src/components/DashboardLayout.tsx`

### Seller tools

- [Review detector](https://github.com/zyronce-ai/tools/blob/master/src/pages/FakeReviewDetector.tsx): `src/pages/FakeReviewDetector.tsx`
- [Listing generation](https://github.com/zyronce-ai/tools/blob/master/src/pages/AmazonListingGenerator.tsx): `src/pages/AmazonListingGenerator.tsx`
- [Image utilities](https://github.com/zyronce-ai/tools/tree/master/src/pages): `src/pages`
- [Seller operations](https://github.com/zyronce-ai/tools/tree/master/src/pages): `src/pages`
- [Market intelligence](https://github.com/zyronce-ai/tools/tree/master/src/pages): `src/pages`

### AI services

- [Edge stream client](https://github.com/zyronce-ai/tools/blob/master/src/lib/ai-stream.ts): `src/lib/ai-stream.ts`
- [Review analysis function](https://github.com/zyronce-ai/tools/blob/master/supabase/functions/fake-review-detector/index.ts): `supabase/functions/fake-review-detector/index.ts`
- [Listing generation function](https://github.com/zyronce-ai/tools/blob/master/supabase/functions/generate-amazon-listing/index.ts): `supabase/functions/generate-amazon-listing/index.ts`
- [Shared AI caller](https://github.com/zyronce-ai/tools/blob/master/supabase/functions/_shared/ai-call.ts): `supabase/functions/_shared/ai-call.ts`
- **Supabase Functions**

### Accounts and plans

- [Auth context](https://github.com/zyronce-ai/tools/blob/master/src/hooks/useAuth.tsx): `src/hooks/useAuth.tsx`
- [Firebase Auth](https://github.com/zyronce-ai/tools/blob/master/src/lib/firebase.ts): `src/lib/firebase.ts`
- [Pricing pages and plans](https://github.com/zyronce-ai/tools/blob/master/src/components/PricingSection.tsx): `src/components/PricingSection.tsx`

### Editorial content

- [Blog listing](https://github.com/zyronce-ai/tools/blob/master/src/pages/Blog.tsx): `src/pages/Blog.tsx`
- [Blog article](https://github.com/zyronce-ai/tools/blob/master/src/pages/BlogPost.tsx): `src/pages/BlogPost.tsx`

### Other components

- **Seller**
- **AI model service**

## Connections

- Seller → Routes and app shell: opens (evidence: `src/App.tsx`)
- Routes and app shell → Tool discovery: routes to (evidence: `src/App.tsx`)
- Tool discovery → Routes and app shell: links tools (evidence: `src/pages/LandingPage.tsx`)
- Routes and app shell → Dashboard layout: wraps protected tools (evidence: `src/App.tsx`)
- Routes and app shell → Review detector: routes to (evidence: `src/App.tsx`)
- Review detector → Edge stream client: streams request (evidence: `src/pages/FakeReviewDetector.tsx`)
- Edge stream client → Supabase Functions: POSTs function request (evidence: `src/lib/ai-stream.ts`)
- Edge stream client → Review analysis function: names function
- Review analysis function → AI model service: analyzes reviews
- Routes and app shell → Listing generation: routes to (evidence: `src/App.tsx`)
- Listing generation → Listing generation function: requests generation
- Listing generation function → Shared AI caller: uses shared AI caller (evidence: `supabase/functions/generate-amazon-listing/index.ts`)
- Shared AI caller → AI model service: calls model
- Routes and app shell → Image utilities: routes to tools (evidence: `src/App.tsx`)
- Routes and app shell → Seller operations: routes to tools (evidence: `src/App.tsx`)
- Routes and app shell → Market intelligence: routes to tools (evidence: `src/App.tsx`)
- Routes and app shell → Auth context: provides auth (evidence: `src/App.tsx`)
- Auth context → Firebase Auth: observes auth (evidence: `src/hooks/useAuth.tsx`)
- Routes and app shell → Pricing pages and plans: routes pricing
- Routes and app shell → Blog listing: routes to (evidence: `src/App.tsx`)
- Blog listing → Blog article: links articles (evidence: `src/pages/Blog.tsx`)
