> ## Documentation Index
> Fetch the complete documentation index at: https://docs.highailabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Strain Discovery Flow

> The complete strain discovery and browsing flow — search, filter, High Families, strain profiles, favorites, and the path from discovery to stash.

## Overview

Strain discovery is how users explore the 16,000+ strain database, find new strains to try, and deepen their understanding of what they consume. This flow maps every path from initial curiosity to adding a strain to their stash or collection.

## Discovery Entry Points

```mermaid theme={null}
graph TD
    A{How does the user start discovering?} --> B[Dashboard Search Bar]
    A --> C[Dashboard Quick Action: Browse Strains]
    A --> D[Dashboard Trending Strains Carousel]
    A --> E[Strain Profile: Similar Strains]
    A --> F[Notebook: Strain Suggestions]
    A --> G[Ask AI: Strain Recommendations]
    A --> H[Shopping Agent: Menu Results]
    A --> I[Collection: Wishlist Browse]

    B --> J[Search Results Screen]
    C --> J
    D --> K[Strain Profile]
    E --> K
    F --> K
    G --> K
    H --> K
    I --> K
    J --> K
```

## Search Flow

```mermaid theme={null}
sequenceDiagram
    participant U as User
    participant App as High IQ
    participant API as Hono API

    U->>App: Tap search bar
    App->>U: Show keyboard + recent searches
    U->>App: Type strain name
    App->>API: GET /strains/search?q={query}
    Note over App,API: Debounced 300ms

    API-->>App: Search results (up to 20)
    App->>U: Display result cards

    U->>App: Tap a result
    App->>API: GET /strains/slug/{slug}/complete
    API-->>App: Full strain profile
    App->>U: Show strain profile screen
```

### Search Behavior

| Input                      | Results                                                               |
| -------------------------- | --------------------------------------------------------------------- |
| Partial name ("blue")      | All strains containing "blue" (Blue Dream, Blueberry, Blue Cheese...) |
| Full name ("Blue Dream")   | Exact match first, then similar names                                 |
| Misspelling ("bloo dreem") | Fuzzy matching attempts correction                                    |
| Terpene name ("myrcene")   | Strains with dominant myrcene                                         |
| Effect ("relaxing")        | Strains tagged with relaxing effects                                  |
| Empty query                | Trending/popular strains shown                                        |

## Filter & Browse Flow

```mermaid theme={null}
graph TD
    A[Strain Discovery Screen] --> B{Filter Options}

    B --> C[High Families]
    C --> C1[Relaxing High]
    C --> C2[Uplifting High]
    C --> C3[Energetic High]
    C --> C4[Relieving High]
    C --> C5[Balancing High]
    C --> C6[Entourage High]

    B --> D[Strain Type]
    D --> D1[Sativa]
    D --> D2[Hybrid]
    D --> D3[Indica]

    B --> E[Sort Options]
    E --> E1[Popular]
    E --> E2[A-Z]
    E --> E3[THC: High to Low]
    E --> E4[Recently Added]

    C1 --> F[Filtered Results]
    C2 --> F
    C3 --> F
    D1 --> F
    D2 --> F
    D3 --> F
    E1 --> F
    F --> G[Tap Strain Card]
    G --> H[Strain Profile Screen]
```

## Strain Profile Screen

```mermaid theme={null}
graph TD
    A[Strain Profile] --> B[Header]
    B --> B1[Strain Name + Type Badge]
    B --> B2[Strain Image/Mascot]
    B --> B3[High Family Badge]

    A --> C[Effects Section]
    C --> C1[Effect Tags: Relaxed, Happy, Creative...]
    C --> C2[Effect Intensity Bars]

    A --> D[Terpene Profile]
    D --> D1[Visual Terpene Chart]
    D --> D2[Individual Terpene Bars]
    D --> D3[Dominant Terpene Highlighted]

    A --> E[Cannabinoid Data]
    E --> E1[THC Percentage]
    E --> E2[CBD Percentage]
    E --> E3[Other Cannabinoids]

    A --> F[Genetics & Lineage]
    F --> F1[Parent Strains]
    F --> F2[Genetic Tree]

    A --> G[Description]
    G --> G1[AI-Generated Summary]
    G --> G2[Aroma & Flavor Notes]

    A --> H[Similar Strains]
    H --> H1[AI-Recommended Alternatives]
    H --> H2[Terpene-Matched Suggestions]

    A --> I[YouTube Videos]
    I --> I1[On-Demand Video Cache]

    A --> J{User Actions}
    J --> J1[Add to Stash]
    J --> J2[Toggle Favorite ❤️]
    J --> J3[Set Collection Status]
    J --> J4[Start ELO Comparison]
    J --> J5[Ask AI About This Strain]
    J --> J6[Share Strain]
```

## Discovery to Action Flow

```mermaid theme={null}
graph TD
    A[User Discovers Strain] --> B{Interest Level}

    B -->|Want to remember| C[Favorite It]
    C --> C1[Appears in Favorites List]
    C --> C2[Improves AI Recommendations]
    C --> C3[Collection Curator Achievement]

    B -->|Want to try| D[Add to Wishlist]
    D --> D1[Collection Status: Wanted]
    D --> D2[Shopping Agent Watches For It]

    B -->|Currently have it| E[Add to Stash]
    E --> E1[Active Inventory Entry]
    E --> E2[Collection Status: Owned]
    E --> E3[Available for Notebook Analysis]

    B -->|Previously tried| F[Mark as Tasted]
    F --> F1[Collection Status: Tasted]
    F --> F2[Available for Rankings]

    B -->|Didn't enjoy| G[Mark as Disliked]
    G --> G1[Collection Status: Disliked]
    G --> G2[Warning in Future Recommendations]

    B -->|Want to learn more| H[Ask AI About It]
    H --> H1[Professor High Deep Dive]
```

## Trending Strains Flow

```mermaid theme={null}
graph TD
    A[Dashboard Loads] --> B[Fetch Trending Strains]
    B --> C[API: Popular Strains Endpoint]
    C --> D[Horizontal Carousel]
    D --> E[User Scrolls Through]
    E --> F[Tap Strain Card]
    F --> G[Full Strain Profile]
    G --> H{Action}
    H --> I[Add to Stash]
    H --> J[Favorite]
    H --> K[Add to Wishlist]
    H --> L[Continue Browsing]
```

## Edge Cases

| Scenario                                     | Behavior                                              |
| -------------------------------------------- | ----------------------------------------------------- |
| Search returns 0 results                     | "No strains found" with suggestions to check spelling |
| Strain has no terpene data                   | Terpene section hidden, note about missing data       |
| Strain has no image                          | Default mascot illustration used                      |
| Strain page loads slowly                     | Skeleton loading state shown                          |
| User offline                                 | Cached strains available, search disabled             |
| Strain has been removed from DB              | 404 with "strain not found" message                   |
| Very long strain name                        | Truncated with ellipsis on cards, full on profile     |
| Duplicate strain names (different cultivars) | Differentiated by breeder/lineage info                |
| User favorites 50+ strains                   | All maintained, scrollable list                       |

## Related Flows

<CardGroup cols={2}>
  <Card title="Collection & Rankings" icon="trophy" href="/help/user-flows/collection-rankings">
    Building and ranking your strain collection.
  </Card>

  <Card title="Shopping Agent" icon="cart-shopping" href="/help/user-flows/shopping-agent">
    Finding discovered strains at dispensaries.
  </Card>

  <Card title="Ask AI" icon="comments" href="/help/user-flows/ask-ai">
    Researching strains with Professor High.
  </Card>

  <Card title="Stash Management" icon="box" href="/help/user-flows/stash-management">
    Adding discovered strains to your stash.
  </Card>
</CardGroup>
