Files
SanatiLeads/docs/phase-2-onboarding-and-dashboard.md

1.7 KiB

Phase 2 — Onboarding Persistence & Dashboard

Goals

  • Persist analysis results in Convex instead of localStorage.
  • Connect onboarding to project + data source records.
  • Build a functional dashboard that renders saved analysis.

Scope

  • Update onboarding flow to create or select a project.
  • Save analysis results to Convex and store IDs.
  • Render dashboard from Convex queries with empty/loading states.

Detailed Tasks

  1. Onboarding persistence

    • When analysis completes:
      • Ensure a default project exists (create if missing).
      • Create a dataSources entry for the URL or manual input.
      • Insert a new analyses record linked to project + data source.
    • Stop using localStorage as the source of truth (can keep as cache if needed).
    • Store analysisId in router state or query param if useful.
  2. Manual input integration

    • Same persistence path as URL analysis.
    • Mark data source type + metadata to indicate manual origin.
  3. Dashboard implementation

    • Fetch latest analysis for selected project.
    • Render:
      • Product name + tagline + description.
      • Summary cards (features, keywords, personas, competitors, use cases).
      • Top features list + top problems solved.
    • Add empty state if no analysis exists.
  4. Project selection behavior

    • When project changes in sidebar, dashboard should re-query and update.

Dependencies

  • Requires Phase 1 schema and layout decisions.

Acceptance Criteria

  • Onboarding persists analysis to Convex.
  • Dashboard displays real data from Convex.
  • Refreshing the page keeps data intact.

Risks

  • Larger analysis objects may need pagination/partial display.

Notes

  • Keep UI fast by showing a small, curated subset of analysis data.