Skip to content

Latest commit

 

History

History
520 lines (414 loc) · 11 KB

File metadata and controls

520 lines (414 loc) · 11 KB

Premium Dashboard Implementation - Phase 2 Roadmap 🗺️

Complete roadmap for applying premium components to all dashboard pages


Overview

Phase 1 is complete. We've built a professional component library. Now we need to apply it to all dashboard pages to create a cohesive, premium experience across the entire app.

Timeline: 2-3 hours
Effort: Medium (repetitive but straightforward)
Impact: High (transforms entire app)


Phase 2 Tasks

Task 1: Admin Dashboard (30 min)

File: src/app/admin/dashboard/page.tsx

Changes:

  1. Import premium components
  2. Replace stat cards with StatCard
  3. Replace buttons with PremiumButton
  4. Replace cards with PremiumCard
  5. Update color scheme to Indigo
  6. Apply typography hierarchy
  7. Improve spacing

Before:

<div className="bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-2xl p-4 sm:p-5">
  <p className="text-sm text-gray-500 dark:text-gray-400">Total Queries</p>
  <p className="text-2xl font-bold text-gray-900 dark:text-white">1,247</p>
</div>

After:

<StatCard
  label="Total Queries"
  value={1247}
  icon={<BarChart3 className="h-5 w-5" />}
  color="indigo"
  trend={{ value: 12, isPositive: true }}
/>

Task 2: Contract Analyzer (30 min)

File: src/app/contract-analyzer/page.tsx

Changes:

  1. Import premium components
  2. Update file upload card styling
  3. Replace result cards with PremiumCard
  4. Update buttons with PremiumButton
  5. Apply Indigo color scheme
  6. Improve typography
  7. Better spacing

Before:

<div className="bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-2xl p-4 sm:p-5">
  <h3 className="font-semibold text-gray-900 dark:text-white">Upload Contract</h3>
  {/* Upload area */}
</div>

After:

<PremiumCard title="Upload Contract" description="PDF or text file">
  {/* Upload area */}
</PremiumCard>

Task 3: Pricing Page (20 min)

File: src/app/pricing/page.tsx

Changes:

  1. Import premium components
  2. Update pricing cards with PremiumCard
  3. Replace buttons with PremiumButton
  4. Apply Indigo color scheme
  5. Improve typography
  6. Better spacing

Before:

<div className="bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-2xl p-6">
  <h3 className="text-lg font-semibold text-gray-900 dark:text-white">Pro</h3>
  <p className="text-2xl font-bold text-gray-900 dark:text-white">$29/mo</p>
</div>

After:

<PremiumCard title="Pro" hoverable>
  <p className="text-premium-h2 text-indigo-600">$29/mo</p>
  {/* Features */}
</PremiumCard>

Task 4: Cases Page (20 min)

File: src/app/cases/page.tsx

Changes:

  1. Import premium components
  2. Update case cards with PremiumCard
  3. Replace buttons with PremiumButton
  4. Apply Indigo color scheme
  5. Improve typography
  6. Better spacing

Task 5: Drafts Page (20 min)

File: src/app/drafts/page.tsx

Changes:

  1. Import premium components
  2. Update draft cards with PremiumCard
  3. Replace buttons with PremiumButton
  4. Apply Indigo color scheme
  5. Improve typography
  6. Better spacing

Task 6: Summarizer Page (20 min)

File: src/app/summarizer/page.tsx

Changes:

  1. Import premium components
  2. Update summary cards with PremiumCard
  3. Replace buttons with PremiumButton
  4. Apply Indigo color scheme
  5. Improve typography
  6. Better spacing

Task 7: Case Tracker Page (20 min)

File: src/app/case-tracker/page.tsx

Changes:

  1. Import premium components
  2. Update tracker cards with PremiumCard
  3. Replace buttons with PremiumButton
  4. Apply Indigo color scheme
  5. Improve typography
  6. Better spacing

Task 8: CRM Page (20 min)

File: src/app/crm/page.tsx

Changes:

  1. Import premium components
  2. Update client cards with PremiumCard
  3. Replace buttons with PremiumButton
  4. Apply Indigo color scheme
  5. Improve typography
  6. Better spacing

Task 9: News Page (15 min)

File: src/app/news/page.tsx

Changes:

  1. Import premium components
  2. Update news cards with PremiumCard
  3. Replace buttons with PremiumButton
  4. Apply Indigo color scheme
  5. Improve typography

Task 10: Acts Page (15 min)

File: src/app/acts/page.tsx

Changes:

  1. Import premium components
  2. Update act cards with PremiumCard
  3. Replace buttons with PremiumButton
  4. Apply Indigo color scheme
  5. Improve typography

Task 11: Notices Page (15 min)

File: src/app/notices/page.tsx

Changes:

  1. Import premium components
  2. Update notice cards with PremiumCard
  3. Replace buttons with PremiumButton
  4. Apply Indigo color scheme
  5. Improve typography

Task 12: Research Page (15 min)

File: src/app/research/page.tsx

Changes:

  1. Import premium components
  2. Update research cards with PremiumCard
  3. Replace buttons with PremiumButton
  4. Apply Indigo color scheme
  5. Improve typography

Phase 3: Testing & Polish (1-2 hours)

Testing Tasks

Mobile Responsiveness

  • Test all pages on mobile (< 768px)
  • Verify 2-column grids work
  • Check full-width cards
  • Test drawer sidebar
  • Verify floating action buttons

Dark Mode

  • Test all pages in dark mode
  • Verify color contrast
  • Check smooth transitions
  • No flashing or glitches

Accessibility

  • Keyboard navigation (Tab, Shift+Tab)
  • Focus states visible
  • ARIA labels present
  • Color contrast (4.5:1)
  • Screen reader compatible

Performance

  • Bundle size check
  • Load time measurement
  • Animation FPS (60fps)
  • Memory usage
  • No console errors

Cross-Browser

  • Chrome/Edge
  • Firefox
  • Safari
  • Mobile browsers

Phase 4: Documentation (30 min)

Documentation Tasks

  • Component storybook
  • Usage examples
  • Design tokens documentation
  • Migration guide
  • Best practices guide

Implementation Checklist

Phase 2: Apply to All Pages

  • Admin Dashboard
  • Contract Analyzer
  • Pricing Page
  • Cases Page
  • Drafts Page
  • Summarizer Page
  • Case Tracker Page
  • CRM Page
  • News Page
  • Acts Page
  • Notices Page
  • Research Page

Phase 3: Testing & Polish

  • Mobile responsiveness
  • Dark mode
  • Accessibility
  • Performance
  • Cross-browser

Phase 4: Documentation

  • Component storybook
  • Usage examples
  • Design tokens
  • Migration guide
  • Best practices

Quick Reference: Common Patterns

Pattern 1: Page Header

<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
  <div>
    <h1 className="text-premium-h1">Page Title</h1>
    <p className="text-premium-body text-slate-600 dark:text-slate-400 mt-2">
      Description
    </p>
  </div>
  <PremiumButton size="lg">
    <Plus className="h-4 w-4" />
    Action
  </PremiumButton>
</div>

Pattern 2: Stats Grid

<div className="grid grid-cols-2 lg:grid-cols-4 gap-4">
  {stats.map((stat) => (
    <StatCard
      key={stat.label}
      label={stat.label}
      value={stat.value}
      icon={stat.icon}
      color="indigo"
      trend={stat.trend}
    />
  ))}
</div>

Pattern 3: Card Grid

<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
  {items.map((item) => (
    <PremiumCard key={item.id} title={item.title} hoverable>
      {/* Content */}
    </PremiumCard>
  ))}
</div>

Pattern 4: Loading State

{loading ? (
  <SkeletonLoader count={4} height="h-32" />
) : (
  <div>Content</div>
)}

Pattern 5: Button Group

<div className="flex gap-3">
  <PremiumButton variant="primary">Primary</PremiumButton>
  <PremiumButton variant="secondary">Secondary</PremiumButton>
  <PremiumButton variant="ghost">Ghost</PremiumButton>
</div>

Common Mistakes to Avoid

Don't: Mix old and new components

// Bad - mixing styles
<div className="bg-gray-100 rounded-2xl p-4">
  <StatCard />
</div>

Do: Use PremiumCard wrapper

// Good - consistent
<PremiumCard>
  <StatCard />
</PremiumCard>

Don't: Use random colors

// Bad
<div className="bg-blue-200 text-purple-600">

Do: Use design system colors

// Good
<StatCard color="indigo" />

Don't: Inconsistent spacing

// Bad
<div className="p-2 m-8 gap-3">

Do: Use spacing classes

// Good
<div className="space-premium-lg">

Testing Checklist Per Page

For each page, verify:

  • Components render without errors
  • Dark mode works correctly
  • Mobile responsive (< 768px)
  • Tablet responsive (768px - 1024px)
  • Desktop responsive (> 1024px)
  • Hover states work
  • Loading states work
  • Accessibility (keyboard navigation)
  • No console errors
  • Build passes

Performance Targets

  • Bundle size: < 50KB (gzipped)
  • Load time: < 2s (3G)
  • Animation FPS: 60fps
  • Lighthouse score: > 90
  • Core Web Vitals: All green

Timeline Estimate

Phase Task Time Status
1 Components 1h ✅ Complete
2 Admin Dashboard 30m ⏳ Next
2 Contract Analyzer 30m ⏳ Next
2 Pricing Page 20m ⏳ Next
2 Cases Page 20m ⏳ Next
2 Drafts Page 20m ⏳ Next
2 Summarizer Page 20m ⏳ Next
2 Case Tracker Page 20m ⏳ Next
2 CRM Page 20m ⏳ Next
2 News Page 15m ⏳ Next
2 Acts Page 15m ⏳ Next
2 Notices Page 15m ⏳ Next
2 Research Page 15m ⏳ Next
3 Testing & Polish 1-2h ⏳ Next
4 Documentation 30m ⏳ Next
Total 5-6h

Success Criteria

✅ All pages use premium components
✅ Consistent Indigo color scheme
✅ Proper typography hierarchy
✅ 24-32px spacing between sections
✅ Hover elevation effects
✅ Dark mode support
✅ Mobile responsive
✅ WCAG AA accessible
✅ Build passing
✅ No console errors


Next Steps

  1. Start with Admin Dashboard (highest impact)
  2. Apply to Contract Analyzer (monetization feature)
  3. Apply to Pricing Page (customer-facing)
  4. Apply to remaining pages (in order of importance)
  5. Test thoroughly (mobile, dark mode, accessibility)
  6. Document (for future reference)

Support

  • Quick Reference: PREMIUM_COMPONENTS_QUICK_REFERENCE.md
  • Implementation Guide: PREMIUM_COMPONENTS_IMPLEMENTATION.md
  • Visual Guide: COMPONENT_LIBRARY_VISUAL_GUIDE.md
  • Example: src/app/dashboard/page.tsx

Summary

Phase 2 will transform the entire app to use premium components. Each page follows the same pattern:

  1. Import components
  2. Replace old cards with PremiumCard
  3. Replace old buttons with PremiumButton
  4. Replace old stats with StatCard
  5. Apply Indigo color scheme
  6. Improve typography
  7. Better spacing

Estimated time: 2-3 hours
Impact: High (entire app feels premium)
Difficulty: Low (repetitive, straightforward)


Last Updated: February 20, 2026