flowchart TD
    subgraph Phase1[Phase 1: Ideation & Research]
        A1[Define Idea Sources] --> A2[Select Initial Idea]
        A2 --> A3[Research Competitors]
        A3 --> A4[Identify Core Features]
        A4 --> A5[Define Target Audience]
        A5 --> A6[Validate Demand]
    end

    subgraph Phase2[Phase 2: Documentation & Planning]
        B1[Create Implementation Plan] --> B2[Map User Journey]
        B2 --> B3[Create Design Guidelines]
        B3 --> B4[Set up GitHub Repository]
        B4 --> B5[Connect Lovable to GitHub]
        B5 --> B6[Upload Documentation]
    end

    subgraph Phase3[Phase 3: Building Core Functionality]
        C1[Select Tech Stack] --> C2[Connect to Supabase]
        C2 --> C3[Design Database Schema]
        C3 --> C4[Implement Authentication]
        C4 --> C5[Create Basic Page Structures]
        C5 --> C6[Implement Core Functionality]
    end

    subgraph Phase4[Phase 4: Debugging & Fixing Bugs]
        D1[Test Each Feature] --> D2[Identify Bugs]
        D2 --> D3[Use Try to Fix It Button]
        D3 --> D4[Structure Complex Bug Prompts]
        D4 --> D5[Leverage ChatGPT for Stubborn Bugs]
        D5 --> D6[Document Lessons Learned]
    end

    subgraph Phase5[Phase 5: Design & Polish]
        E1[Review Design Guidelines] --> E2[Find Design Inspiration]
        E2 --> E3[Use the Select Tool]
        E3 --> E4[Implement Screenshot Approach]
        E4 --> E5[Create Sketches When Needed]
        E5 --> E6[Test Responsive Design]
    end

    subgraph Phase6[Phase 6: Launch Preparation]
        F1[Conduct Full QA Testing] --> F2[Update SEO Settings]
        F2 --> F3[Create Social Sharing Images]
        F3 --> F4[Set Up Analytics]
        F4 --> F5[Configure Email System]
        F5 --> F6[Update Supabase Site URL]
    end

    subgraph Phase7[Phase 7: Post-Launch & Feedback]
        G1[Deploy to Production] --> G2[Submit to Lovable Launch]
        G2 --> G3[Share on Social Media]
        G3 --> G4[Create Demo Video]
        G4 --> G5[Set Up Feedback System]
        G5 --> G6[Monitor Metrics]
        G6 --> G7[Analyze Feedback]
        G7 --> G8[Plan Next Iteration]
    end

    %% Phase connections
    A6 --> B1
    B6 --> C1
    C6 --> D1
    D6 --> E1
    E6 --> F1
    F6 --> G1
    G8 -.-> A1

    %% Key dependencies
    C2 -.-> F6
    F5 -.-> G5
    E1 -.-> B3
    B1 -.-> C6
    
    classDef phaseClass fill:#f9f9f9,stroke:#333,stroke-width:2px;
    class Phase1,Phase2,Phase3,Phase4,Phase5,Phase6,Phase7 phaseClass;