Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save crixlet/d3217f14ca751aa34e89b09cef315327 to your computer and use it in GitHub Desktop.
Save crixlet/d3217f14ca751aa34e89b09cef315327 to your computer and use it in GitHub Desktop.
PRD: Authentication, Dashboard & Demo Functionality Implementation for Link Visualizer

PRD: Authentication, Dashboard & Demo Functionality Implementation

Overview

Transform the Link Visualizer from a session-based tool to a fully authenticated application with proper user management, leveraging the existing FlowProof user base through Supabase Auth integration. Includes implementation of an interactive demo page with simulated link visualization functionality.

Problem Statement

Currently, the Link Visualizer uses cookie-based session management which limits functionality and user experience. The dashboard, which is the core power of the application, is buried and difficult to access. Users need proper authentication to fully utilize the tool's capabilities.

Goals

Primary Goals

  • Implement proper user authentication using existing FlowProof user base
  • Make the dashboard the primary interface for authenticated users
  • Improve navigation and user flow throughout the application
  • Enhance email management with better metadata display
  • Create interactive demo page with simulated link visualization functionality

Success Metrics

  • Users can seamlessly authenticate using FlowProof credentials
  • Dashboard becomes the central hub for all user activities
  • Improved user retention through better navigation flow
  • Reduced confusion about application structure

User Stories

Authentication Flow

  • As a new user, I want to sign up using my FlowProof credentials so I can access the full Link Visualizer functionality
  • As a returning user, I want to be automatically logged in and directed to my dashboard
  • As an authenticated user, I want clear navigation between different parts of the application

Dashboard Experience

  • As an authenticated user, I want my dashboard to show my unique proof email address prominently
  • As a user, I want to see my saved HTML visualizations with meaningful titles (page titles from HTML)
  • As a user, I want to click on email titles to open the visualization directly
  • As a user, I want to easily create new visualizations from the dashboard

Navigation Improvements

  • As a user, I want clear navigation back to the dashboard from any visualization page
  • As a user, I want the FlowProof link to take me to Link Visualizer homepage, not FlowProof site
  • As a user, I want consistent navigation that doesn't confuse me about where I am

Demo Experience

  • As a demo user, I want to click a button and see a realistic link visualization without waiting for API calls
  • As a demo user, I want to interact with the visualization (click links, see connections) just like the real product
  • As a demo user, I want clear calls-to-action to sign up and try it with my own data
  • As a demo user, I want to be encouraged to sign up through strategically placed CTAs

Technical Requirements

Authentication Implementation

  • Integrate Supabase Auth with existing FlowProof user base
  • Implement proper session management
  • Add authentication guards to protected routes
  • Handle authentication state throughout the application

Dashboard Enhancements

  • Move proof email address display to dashboard (remove from homepage)
  • Add HTML input functionality to dashboard
  • Display saved visualizations with HTML page titles as email titles
  • Make email titles clickable to open visualizations
  • Show created and last updated dates for each visualization

Navigation Structure Updates

  • Add dashboard link to visualization page header
  • Fix FlowProof link to point to Link Visualizer homepage
  • Remove or restructure confusing three-dot menu navigation
  • Ensure consistent header navigation across all pages

Data Model Updates

  • Store HTML page titles when creating visualizations
  • Associate visualizations with authenticated users
  • Maintain backward compatibility with existing data

Demo Implementation

  • Static/simulated link visualization (no API calls)
  • Pre-loaded sample HTML email with realistic links
  • Functional connection lines and interactions
  • Sample screenshot images (static assets)
  • Realistic loading animations (but fast/fake)
  • CTA modal implementation within demo
  • Demo data structure with curated sample content

Implementation Details

Pages to Modify

  • src/app/page.tsx - Remove dashboard functionality, redirect authenticated users
  • src/app/visualizations/page.tsx - Enhance with new features
  • src/app/v/[slug]/page.tsx - Add navigation improvements
  • Create new authenticated dashboard route
  • src/app/demo/page.tsx - Create simulated visualization experience

Components to Update

  • src/components/Header.tsx - Fix navigation links
  • Update visualization actions to include dashboard link
  • Create authenticated user context/provider
  • DemoVisualization.tsx - Simulated version of main visualization
  • CTAModal.tsx - Signup encouragement modal for demo
  • DemoConnectionLines.tsx - Static version of connection animations
  • src/lib/demoData.ts - Static sample data file

Database Changes

  • Add user association to visualizations table
  • Add title field to visualizations table
  • Create user authentication tables if needed

Environment Variables

  • Ensure Supabase Auth configuration is complete
  • Add any additional FlowProof integration keys needed

User Flow Changes

Before (Current State)

  1. User lands on homepage
  2. User chooses between "Generate Proof Email" or "Add HTML"
  3. Dashboard functionality mixed with homepage
  4. Navigation unclear between pages

After (Target State)

  1. User lands on homepage (marketing/demo focused)
  2. User signs up/logs in
  3. Authenticated user directed to dashboard
  4. Dashboard serves as central hub for all functionality
  5. Clear navigation between dashboard and visualizations

Dependencies

External Services

  • Supabase Auth integration
  • FlowProof user base access
  • Existing HCTI API for screenshots
  • Existing database schema

Internal Dependencies

  • Current visualization functionality must remain intact
  • Existing user data should be preserved where possible
  • Mobile responsiveness requirements maintained

Acceptance Criteria

Authentication

  • Users can sign up using FlowProof credentials
  • Users can log in and are redirected to dashboard
  • Authentication state persists across sessions
  • Unauthenticated users are properly redirected

Dashboard Functionality

  • Dashboard displays user's unique proof email address
  • Dashboard allows HTML input for new visualizations
  • Saved visualizations show HTML page titles as email titles
  • Clicking email titles opens the visualization
  • Created and updated dates are displayed

Navigation

  • FlowProof link navigates to Link Visualizer homepage
  • Visualization pages have clear path back to dashboard
  • Header navigation is consistent across all pages
  • Three-dot menu confusion is resolved

Data Integrity

  • Existing visualizations are preserved
  • HTML page titles are extracted and stored
  • User associations are properly maintained

Demo Experience

  • Realistic link visualization loads instantly
  • All interactive elements work (hover, click, connections)
  • Sample email looks professional and realistic
  • CTA modal appears at appropriate times
  • Demo showcases key product benefits
  • No actual API calls during demo
  • Smooth transition from demo to authentication

Technical Risks

High Risk

  • FlowProof user base integration complexity
  • Potential data migration issues
  • Authentication flow disruption

Medium Risk

  • Navigation changes affecting user experience
  • Mobile responsiveness with new layout
  • Performance impact of additional database queries

Mitigation Strategies

  • Implement authentication in phases
  • Maintain backward compatibility during transition
  • Test thoroughly with existing user data
  • Create rollback plan for navigation changes

Timeline Considerations

Phase 1: Authentication Foundation

  • Set up Supabase Auth integration
  • Create user authentication flow
  • Implement protected routes

Phase 2: Dashboard Enhancement

  • Move functionality from homepage to dashboard
  • Add HTML page title extraction
  • Improve visualization management

Phase 3: Navigation Cleanup

  • Fix header navigation issues
  • Clean up confusing menu structures
  • Optimize user flow

Success Metrics

Quantitative

  • Authentication success rate > 95%
  • Dashboard engagement time increase
  • Reduced support queries about navigation
  • User retention improvement

Qualitative

  • Users can easily find and access their visualizations
  • Clear understanding of application structure
  • Positive feedback on improved navigation flow
  • Reduced confusion about where to find features
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment