# akhil-codecaptives/vastranantamobile architecture

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

- Interactive diagram: https://gitdiagram.com/akhil-codecaptives/vastranantamobile
- Repository: https://github.com/akhil-codecaptives/vastranantamobile

## Overview

Vastrananta is a mobile product-catalog and AI product-imaging app. Users create or select a product, add product and model references, generate and review images, then publish a product to Wix; the app also supports catalog and model-set management. The graph distinguishes workspace orchestration, generation, media analysis, persistence, and publishing. Relationships are limited to calls shown in excerpts or imports listed in the source index; unsampled subsystem behavior is represented cautiously.

Main entry points: [`services/productGenerationService.ts`](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/productGenerationService.ts) (Image generation workflow), [`App.tsx`](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/App.tsx) (App entry), [`components/ProductWorkspace.tsx`](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/ProductWorkspace.tsx) (Product workspace), [`components/ModelCatalog.tsx`](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/ModelCatalog.tsx) (Model catalog UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App workflows"]
  node_app["App entry<br/>[App.tsx]"]
  node_workspace["Product workspace"]
  node_local_products["Local products<br/>[LocalProducts.tsx]"]
  node_model_catalog_ui["Model catalog UI<br/>[ModelCatalog.tsx]"]
  node_product_media_ui["Product media UI<br/>[ProductMedia.tsx]"]
  node_wix_service["Wix store interface<br/>[WixStore.tsx]"]
end

subgraph group_catalog["Product and model data"]
  node_product_store[("Product store<br/>[productStore.ts]")]
  node_product_registry[("Product registry<br/>[productRegistry.ts]")]
  node_product_media_store[("Product media store")]
  node_generated_media_store[("Generated media store")]
  node_catalog_data[("Product taxonomy<br/>[catalog.ts]")]
  node_model_catalog_store[("Model-set store")]
  node_shot_types["Shot definitions<br/>[shotTypes.ts]"]
end

subgraph group_ai["AI services"]
  node_generation_service["Image generation workflow"]
  node_prompt_builder["Prompt builder<br/>[promptBuilder.ts]"]
  node_provider_router["Generation provider router<br/>[provider.ts]"]
  node_generation_providers["Generation providers"]
  node_quality_gate["Generated-image quality gate"]
  node_media_intelligence["Media intelligence<br/>[index.ts]"]
  node_vision["NVIDIA vision<br/>[nvidiaVision.ts]"]
end

subgraph group_publishing["Wix publishing"]
  node_wix_publisher["Wix publisher<br/>[publisher.ts]"]
  node_wix_client["Wix API client<br/>[client.ts]"]
  node_wix_credentials[("Wix credentials<br/>[storage.ts]")]
end

node_user(("Product editor"))

node_user -.->|"opens"| node_app
node_app -->|"opens"| node_workspace
node_app -->|"opens"| node_local_products
node_app -->|"opens"| node_model_catalog_ui
node_app -->|"opens"| node_wix_service
node_app -->|"lists products"| node_product_store
node_app -->|"checks publish status"| node_product_registry
node_workspace -->|"requests generation"| node_generation_service
node_workspace -->|"persists media"| node_product_media_store
node_workspace -->|"loads model sets"| node_model_catalog_store
node_workspace -->|"requests reasoning"| node_media_intelligence
node_workspace -->|"publishes product"| node_wix_publisher
node_workspace -->|"loads shot mood"| node_shot_types
node_product_media_ui -->|"persists media"| node_product_media_store
node_model_catalog_ui -->|"uses model sets"| node_model_catalog_store
node_model_catalog_ui -->|"analyzes references"| node_media_intelligence
node_generation_service -->|"persists outputs"| node_generated_media_store
node_generation_service -->|"saves product"| node_product_store
node_generation_service -->|"loads model set"| node_model_catalog_store
node_generation_service -->|"builds prompts"| node_prompt_builder
node_generation_service -->|"reads shot rules"| node_shot_types
node_generation_service -->|"checks images"| node_quality_gate
node_generation_service -->|"requests generation"| node_provider_router
node_provider_router -->|"selects provider"| node_generation_providers
node_media_intelligence -->|"analyzes references"| node_vision
node_wix_client -->|"reads credentials"| node_wix_credentials
node_wix_publisher -.->|"uses API client"| node_wix_client
node_local_products -.->|"uses product data"| node_product_store

click node_app "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/App.tsx"
click node_workspace "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/ProductWorkspace.tsx"
click node_local_products "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/LocalProducts.tsx"
click node_model_catalog_ui "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/ModelCatalog.tsx"
click node_product_media_ui "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/ProductMedia.tsx"
click node_product_store "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/productStore.ts"
click node_product_registry "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/productRegistry.ts"
click node_product_media_store "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/productMediaStore.ts"
click node_generated_media_store "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/productGeneratedMediaStore.ts"
click node_catalog_data "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/catalog.ts"
click node_model_catalog_store "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/modelCatalogStore.ts"
click node_shot_types "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/shotTypes.ts"
click node_generation_service "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/productGenerationService.ts"
click node_prompt_builder "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/imageGeneration/promptBuilder.ts"
click node_provider_router "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/imageGeneration/provider.ts"
click node_generation_providers "https://github.com/akhil-codecaptives/vastranantamobile/tree/main/services/imageGeneration"
click node_quality_gate "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/imageQualityGate.ts"
click node_media_intelligence "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/mediaIntelligence/index.ts"
click node_vision "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/nvidiaVision.ts"
click node_wix_publisher "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/wix/publisher.ts"
click node_wix_client "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/wix/client.ts"
click node_wix_credentials "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/wix/storage.ts"
click node_wix_service "https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/WixStore.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_workspace,node_local_products,node_model_catalog_ui,node_product_media_ui,node_wix_service toneBlue
class node_product_store,node_product_registry,node_product_media_store,node_generated_media_store,node_catalog_data,node_model_catalog_store,node_shot_types toneAmber
class node_generation_service,node_prompt_builder,node_provider_router,node_generation_providers,node_quality_gate,node_media_intelligence,node_vision toneMint
class node_wix_publisher,node_wix_client,node_wix_credentials toneRose
class node_user toneIndigo
```

## Components

### App workflows

- [App entry](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/App.tsx): `App.tsx`
- [Product workspace](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/ProductWorkspace.tsx): `components/ProductWorkspace.tsx`
- [Local products](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/LocalProducts.tsx): `components/LocalProducts.tsx`
- [Model catalog UI](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/ModelCatalog.tsx): `components/ModelCatalog.tsx`
- [Product media UI](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/ProductMedia.tsx): `components/ProductMedia.tsx`
- [Wix store interface](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/components/WixStore.tsx): `components/WixStore.tsx`

### Product and model data

- [Product store](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/productStore.ts): `data/productStore.ts`
- [Product registry](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/productRegistry.ts): `data/productRegistry.ts`
- [Product media store](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/productMediaStore.ts): `data/productMediaStore.ts`
- [Generated media store](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/productGeneratedMediaStore.ts): `data/productGeneratedMediaStore.ts`
- [Product taxonomy](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/catalog.ts): `data/catalog.ts`
- [Model-set store](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/modelCatalogStore.ts): `data/modelCatalogStore.ts`
- [Shot definitions](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/data/shotTypes.ts): `data/shotTypes.ts`

### AI services

- [Image generation workflow](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/productGenerationService.ts): `services/productGenerationService.ts`
- [Prompt builder](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/imageGeneration/promptBuilder.ts): `services/imageGeneration/promptBuilder.ts`
- [Generation provider router](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/imageGeneration/provider.ts): `services/imageGeneration/provider.ts`
- [Generation providers](https://github.com/akhil-codecaptives/vastranantamobile/tree/main/services/imageGeneration): `services/imageGeneration`
- [Generated-image quality gate](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/imageQualityGate.ts): `services/imageQualityGate.ts`
- [Media intelligence](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/mediaIntelligence/index.ts): `services/mediaIntelligence/index.ts`
- [NVIDIA vision](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/nvidiaVision.ts): `services/nvidiaVision.ts`

### Wix publishing

- [Wix publisher](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/wix/publisher.ts): `services/wix/publisher.ts`
- [Wix API client](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/wix/client.ts): `services/wix/client.ts`
- [Wix credentials](https://github.com/akhil-codecaptives/vastranantamobile/blob/main/services/wix/storage.ts): `services/wix/storage.ts`

### Other components

- **Product editor**

## Connections

- Product editor → App entry: opens
- App entry → Product workspace: opens (evidence: `App.tsx`)
- App entry → Local products: opens (evidence: `App.tsx`)
- App entry → Model catalog UI: opens (evidence: `App.tsx`)
- App entry → Wix store interface: opens (evidence: `App.tsx`)
- App entry → Product store: lists products (evidence: `App.tsx`)
- App entry → Product registry: checks publish status (evidence: `App.tsx`)
- Product workspace → Image generation workflow: requests generation (evidence: `components/ProductWorkspace.tsx`)
- Product workspace → Product media store: persists media (evidence: `components/ProductWorkspace.tsx`)
- Product workspace → Model-set store: loads model sets (evidence: `components/ProductWorkspace.tsx`)
- Product workspace → Media intelligence: requests reasoning (evidence: `components/ProductWorkspace.tsx`)
- Product workspace → Wix publisher: publishes product (evidence: `components/ProductWorkspace.tsx`)
- Product workspace → Shot definitions: loads shot mood (evidence: `components/ProductWorkspace.tsx`)
- Product media UI → Product media store: persists media (evidence: `components/ProductMedia.tsx`)
- Model catalog UI → Model-set store: uses model sets (evidence: `components/ModelCatalog.tsx`)
- Model catalog UI → Media intelligence: analyzes references (evidence: `components/ModelCatalog.tsx`)
- Image generation workflow → Generated media store: persists outputs (evidence: `services/productGenerationService.ts`)
- Image generation workflow → Product store: saves product (evidence: `services/productGenerationService.ts`)
- Image generation workflow → Model-set store: loads model set (evidence: `services/productGenerationService.ts`)
- Image generation workflow → Prompt builder: builds prompts (evidence: `services/productGenerationService.ts`)
- Image generation workflow → Shot definitions: reads shot rules (evidence: `services/productGenerationService.ts`)
- Image generation workflow → Generated-image quality gate: checks images (evidence: `services/productGenerationService.ts`)
- Image generation workflow → Generation provider router: requests generation (evidence: `services/productGenerationService.ts`)
- Generation provider router → Generation providers: selects provider (evidence: `services/imageGeneration/provider.ts`)
- Media intelligence → NVIDIA vision: analyzes references (evidence: `services/mediaIntelligence/index.ts`)
- Wix API client → Wix credentials: reads credentials (evidence: `services/wix/client.ts`)
- Wix publisher → Wix API client: uses API client
- Local products → Product store: uses product data
