# arbaanw/sih26-prototype architecture

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

- Interactive diagram: https://gitdiagram.com/arbaanw/sih26-prototype
- Repository: https://github.com/arbaanw/sih26-prototype

## Overview

CribeIt is an offline-first Flutter demo assistant for Indian artisans, guiding a user from onboarding through product preparation and simulated marketplace publishing. The documented workflow covers image enhancement, multilingual catalog drafting, voice-language detection, cost-based pricing, listing preview, and publishing to simulated buyer/ONDC/GeM channels. The README identifies a shared ChangeNotifier service for app logic and demo AI, plus local persistence and seeded data. Dart implementation excerpts were not provided, so links between screens and services below reflect documented flow only.

Main entry points: [`lib/screens/home_screen.dart`](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/home_screen.dart) (Home), [`lib/screens/image_studio_screen.dart`](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/image_studio_screen.dart) (Image studio), [`lib/services/demo_service.dart`](https://github.com/arbaanw/sih26-prototype/blob/main/lib/services/demo_service.dart) (Demo app state), [`lib/screens/markets_screen.dart`](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/markets_screen.dart) (Markets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Artisan journey"]
  node_splash["Splash<br/>[splash_screen.dart]"]
  node_language["Language choice"]
  node_onboarding["Onboarding"]
  node_home["Home<br/>[home_screen.dart]"]
  node_addproduct["Add product"]
  node_imagestudio["Image studio"]
  node_catalog["Catalog drafting"]
  node_voice["Voice demo"]
end

subgraph group_commerce["Commerce workflows"]
  node_pricing["Smart pricing"]
  node_listing["Listing preview"]
  node_publish["Publish"]
  node_markets["Markets"]
  node_products["Product catalog"]
  node_productdetail["Product detail"]
  node_profile["Artisan profile"]
end

subgraph group_foundation["App foundation"]
  node_appstate["Demo app state<br/>[demo_service.dart]"]
  node_storage[("Local persistence")]
  node_models["Domain models<br/>[models.dart]"]
  node_seeddata["Seeded data<br/>[demo_data.dart]"]
end

subgraph group_presentation["Reusable UI"]
  node_processing["AI processing view"]
  node_craftvisual["Craft visual<br/>[craft_visual.dart]"]
  node_productcard["Product card<br/>[product_card.dart]"]
end

node_artisan(("Artisan"))
node_buyers(("B2B buyers"))
node_marketchannels(("ONDC / GeM"))

node_artisan -->|"starts at"| node_splash
node_splash -->|"continues to"| node_language
node_language -->|"continues to"| node_onboarding
node_onboarding -->|"continues to"| node_home
node_home -->|"opens"| node_addproduct
node_addproduct -->|"selects product"| node_imagestudio
node_imagestudio -->|"uses enhanced image"| node_catalog
node_catalog -->|"continues to"| node_voice
node_voice -->|"continues to"| node_pricing
node_pricing -->|"continues to"| node_listing
node_listing -->|"continues to"| node_publish
node_publish -->|"continues to"| node_markets
node_markets -->|"shows buyers"| node_buyers
node_markets -->|"simulates connection"| node_marketchannels
node_home -.->|"offers catalog"| node_products
node_products -.->|"opens detail"| node_productdetail
node_home -.->|"offers profile"| node_profile
node_home -->|"uses shared logic"| node_appstate
node_appstate -->|"persists locally"| node_storage
node_appstate -->|"uses demo data"| node_seeddata
node_appstate -.->|"manages domain state"| node_models
node_imagestudio -.->|"shows processing"| node_processing
node_imagestudio -->|"uses placeholder"| node_craftvisual
node_products -.->|"renders cards"| node_productcard

click node_splash "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/splash_screen.dart"
click node_language "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/language_screen.dart"
click node_onboarding "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/onboarding_screen.dart"
click node_home "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/home_screen.dart"
click node_addproduct "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/add_product_screen.dart"
click node_imagestudio "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/image_studio_screen.dart"
click node_catalog "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/assistant_screen.dart"
click node_voice "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/voice_demo_screen.dart"
click node_pricing "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/pricing_screen.dart"
click node_listing "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/listing_screen.dart"
click node_publish "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/publish_screen.dart"
click node_markets "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/markets_screen.dart"
click node_products "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/products_screen.dart"
click node_productdetail "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/product_detail_screen.dart"
click node_profile "https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/profile_screen.dart"
click node_appstate "https://github.com/arbaanw/sih26-prototype/blob/main/lib/services/demo_service.dart"
click node_storage "https://github.com/arbaanw/sih26-prototype/blob/main/lib/services/storage_service.dart"
click node_models "https://github.com/arbaanw/sih26-prototype/blob/main/lib/models/models.dart"
click node_seeddata "https://github.com/arbaanw/sih26-prototype/blob/main/lib/data/demo_data.dart"
click node_processing "https://github.com/arbaanw/sih26-prototype/blob/main/lib/widgets/ai_processing_view.dart"
click node_craftvisual "https://github.com/arbaanw/sih26-prototype/blob/main/lib/widgets/craft_visual.dart"
click node_productcard "https://github.com/arbaanw/sih26-prototype/blob/main/lib/widgets/product_card.dart"

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_splash,node_language,node_onboarding,node_home,node_addproduct,node_imagestudio,node_catalog,node_voice toneBlue
class node_pricing,node_listing,node_publish,node_markets,node_products,node_productdetail,node_profile toneAmber
class node_appstate,node_storage,node_models,node_seeddata toneMint
class node_processing,node_craftvisual,node_productcard toneRose
class node_artisan,node_buyers,node_marketchannels toneIndigo
```

## Components

### Artisan journey

- [Splash](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/splash_screen.dart): `lib/screens/splash_screen.dart`
- [Language choice](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/language_screen.dart): `lib/screens/language_screen.dart`
- [Onboarding](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/onboarding_screen.dart): `lib/screens/onboarding_screen.dart`
- [Home](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/home_screen.dart): `lib/screens/home_screen.dart`
- [Add product](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/add_product_screen.dart): `lib/screens/add_product_screen.dart`
- [Image studio](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/image_studio_screen.dart): `lib/screens/image_studio_screen.dart`
- [Catalog drafting](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/assistant_screen.dart): `lib/screens/assistant_screen.dart`
- [Voice demo](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/voice_demo_screen.dart): `lib/screens/voice_demo_screen.dart`

### Commerce workflows

- [Smart pricing](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/pricing_screen.dart): `lib/screens/pricing_screen.dart`
- [Listing preview](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/listing_screen.dart): `lib/screens/listing_screen.dart`
- [Publish](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/publish_screen.dart): `lib/screens/publish_screen.dart`
- [Markets](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/markets_screen.dart): `lib/screens/markets_screen.dart`
- [Product catalog](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/products_screen.dart): `lib/screens/products_screen.dart`
- [Product detail](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/product_detail_screen.dart): `lib/screens/product_detail_screen.dart`
- [Artisan profile](https://github.com/arbaanw/sih26-prototype/blob/main/lib/screens/profile_screen.dart): `lib/screens/profile_screen.dart`

### App foundation

- [Demo app state](https://github.com/arbaanw/sih26-prototype/blob/main/lib/services/demo_service.dart): `lib/services/demo_service.dart`
- [Local persistence](https://github.com/arbaanw/sih26-prototype/blob/main/lib/services/storage_service.dart): `lib/services/storage_service.dart`
- [Domain models](https://github.com/arbaanw/sih26-prototype/blob/main/lib/models/models.dart): `lib/models/models.dart`
- [Seeded data](https://github.com/arbaanw/sih26-prototype/blob/main/lib/data/demo_data.dart): `lib/data/demo_data.dart`

### Reusable UI

- [AI processing view](https://github.com/arbaanw/sih26-prototype/blob/main/lib/widgets/ai_processing_view.dart): `lib/widgets/ai_processing_view.dart`
- [Craft visual](https://github.com/arbaanw/sih26-prototype/blob/main/lib/widgets/craft_visual.dart): `lib/widgets/craft_visual.dart`
- [Product card](https://github.com/arbaanw/sih26-prototype/blob/main/lib/widgets/product_card.dart): `lib/widgets/product_card.dart`

### Other components

- **Artisan**
- **B2B buyers**
- **ONDC / GeM**

## Connections

- Artisan → Splash: starts at (evidence: `README.md`)
- Splash → Language choice: continues to (evidence: `README.md`)
- Language choice → Onboarding: continues to (evidence: `README.md`)
- Onboarding → Home: continues to (evidence: `README.md`)
- Home → Add product: opens (evidence: `README.md`)
- Add product → Image studio: selects product (evidence: `README.md`)
- Image studio → Catalog drafting: uses enhanced image (evidence: `README.md`)
- Catalog drafting → Voice demo: continues to (evidence: `README.md`)
- Voice demo → Smart pricing: continues to (evidence: `README.md`)
- Smart pricing → Listing preview: continues to (evidence: `README.md`)
- Listing preview → Publish: continues to (evidence: `README.md`)
- Publish → Markets: continues to (evidence: `README.md`)
- Markets → B2B buyers: shows buyers (evidence: `README.md`)
- Markets → ONDC / GeM: simulates connection (evidence: `README.md`)
- Home → Product catalog: offers catalog
- Product catalog → Product detail: opens detail
- Home → Artisan profile: offers profile
- Home → Demo app state: uses shared logic (evidence: `README.md`)
- Demo app state → Local persistence: persists locally (evidence: `README.md`)
- Demo app state → Seeded data: uses demo data (evidence: `README.md`)
- Demo app state → Domain models: manages domain state
- Image studio → AI processing view: shows processing
- Image studio → Craft visual: uses placeholder (evidence: `README.md`)
- Product catalog → Product card: renders cards
